diff options
author | dzwdz | 2021-08-07 15:34:03 +0200 |
---|---|---|
committer | dzwdz | 2021-08-07 15:34:03 +0200 |
commit | bd50355d96bb081394f01c7d8e89debd1c040cd4 (patch) | |
tree | 50a98524b707f31a43a70ca225a83a0e762cfad7 /tools/dep_builders/binutils | |
parent | e2b9d3d34b54767e01c8555e7e672e7ce2dc400c (diff) |
build all parts of the toolchain to the same $PREFIX
If gcc is built with a different $PREFIX than binutils, it won't even
attempt using them - it will use the system assembler instead, which
fails for obvious reasons.
Diffstat (limited to 'tools/dep_builders/binutils')
-rwxr-xr-x | tools/dep_builders/binutils | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/dep_builders/binutils b/tools/dep_builders/binutils index 65d97be..210c13b 100755 --- a/tools/dep_builders/binutils +++ b/tools/dep_builders/binutils @@ -8,7 +8,9 @@ VER="2.37" c44968b97cd86499efbc4b4ab7d98471f673e5414c554ef54afa930062dbbfcb toolchain/cache/binutils-2.37.tar.gz HASHES -export PREFIX="$(pwd)/toolchain/$TOOL-$VER/" +export PREFIX="$(pwd)/toolchain/" +export CACHE="$(pwd)/toolchain/cache/" +export PATH="$(pwd)/toolchain/bin/:$PATH" export TARGET=i686-elf @@ -18,8 +20,7 @@ if [ ! -d .git ]; then exit fi -mkdir -p $PREFIX/build - +mkdir -p $PREFIX echo "downloading missing files..." tools/dep_builders/dl "https://ftp.gnu.org/gnu/$TOOL/$TOOL-$VER.tar.gz" @@ -27,7 +28,7 @@ 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 toolchain/cache/$TOOL-$VER.tar.gz.sig +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 @@ -38,7 +39,9 @@ echo "unpacking the tarball..." tar xf toolchain/cache/$TOOL-$VER.tar.gz -C toolchain/cache echo "building..." -cd $PREFIX/build -../../cache/$TOOL-$VER/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror +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 make install |