diff options
Diffstat (limited to 'tools/dep_builders/binutils')
-rwxr-xr-x | tools/dep_builders/binutils | 47 |
1 files changed, 13 insertions, 34 deletions
diff --git a/tools/dep_builders/binutils b/tools/dep_builders/binutils index cd88f5c..3e6b7b7 100755 --- a/tools/dep_builders/binutils +++ b/tools/dep_builders/binutils @@ -1,47 +1,26 @@ #!/bin/sh set -eu -TOOL="binutils" -VER="2.37" -# this is ugly -{ HASHES=$(cat) ; } <<'HASHES' -c44968b97cd86499efbc4b4ab7d98471f673e5414c554ef54afa930062dbbfcb toolchain/cache/binutils-2.37.tar.gz -HASHES - -export PREFIX="$(pwd)/toolchain/" -export CACHE="$(pwd)/toolchain/cache/" -export PATH="$(pwd)/toolchain/bin/:$PATH" -export TARGET=x86_64-elf - - # ensure that we're in the repo root if [ ! -d .git ]; then echo please cd to the repo\'s main directory exit fi +export PREFIX="$(pwd)/toolchain/prefix/" +export PATH="$(pwd)/toolchain/prefix/bin/:$PATH" +BUILDDIR="$(pwd)/toolchain/binutils-build/" +SYSROOT="$(pwd)/sysroot/" mkdir -p $PREFIX +mkdir -p $BUILDDIR -echo "downloading missing files..." -tools/dep_builders/dl "https://ftp.gnu.org/gnu/$TOOL/$TOOL-$VER.tar.gz" -tools/dep_builders/dl "https://ftp.gnu.org/gnu/$TOOL/$TOOL-$VER.tar.gz.sig" -tools/dep_builders/dl "https://ftp.gnu.org/gnu/gnu-keyring.gpg" - -echo "verifying signatures..." -if ! gpg --verify --keyring toolchain/cache/gnu-keyring.gpg $CACHE/$TOOL-$VER.tar.gz.sig -then - echo "THE SIGNATURE COULDN'T BE VERIFIED. something's fishy." - exit -fi -echo "$HASHES" | sha256sum --check || exit - -echo "unpacking the tarball..." -tar xf toolchain/cache/$TOOL-$VER.tar.gz -C toolchain/cache +cd $BUILDDIR -echo "building..." -rm -rf $CACHE/$TOOL-$VER/builddir -mkdir $CACHE/$TOOL-$VER/builddir -cd $CACHE/$TOOL-$VER/builddir -../configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror -make +../binutils/configure \ + --target=x86_64-camellia \ + --prefix="$PREFIX" \ + --with-sysroot \ + --disable-nls \ + --disable-werror +make -j4 make install |