linuxboot/bootstrap
Jason Blackwell 53bb0b0ac7
update musl-cross to github maintained mirror
Signed-off-by: Trammell Hudson <trammell.hudson@twosigma.com>
2017-01-31 13:11:58 -05:00

29 lines
712 B
Bash
Executable File

#!/bin/sh
# Download and build the musl-libc cross compiler.
# This should be worked around eventually to use the coreboot
# cross compile suite that we've already built, but for now
# we'll download yet another copy of gcc...
DIRNAME="`dirname $0`"
BASE="`cd "$DIRNAME" ; /bin/pwd `"
die() { echo >&2 "$@"; exit 1; }
if [ ! -d build/musl-cross ]; then
cd build
git clone https://github.com/GregorR/musl-cross.git \
|| die "clone failed"
cd musl-cross
patch -p1 < ../../patches/musl-cross.patch \
|| die "patch of configuration failed!"
else
cd build/musl-cross
fi
export CC_BASE_PREFIX="$BASE/crossgcc"
echo "export CC_BASE_PREFIX='$CC_BASE_PREFIX'"
./build.sh \
|| die "compiler build failed!"