mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-30 01:38:56 +00:00
53bb0b0ac7
Signed-off-by: Trammell Hudson <trammell.hudson@twosigma.com>
29 lines
712 B
Bash
Executable File
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!"
|