diff options
author | dzwdz | 2023-02-23 15:38:17 +0100 |
---|---|---|
committer | dzwdz | 2023-02-23 15:38:17 +0100 |
commit | c9daa8909313b020df57605d0bd50ac48b208d58 (patch) | |
tree | 7051752002999e648619bc91e4d99edfda7b9f01 /tools/dep_builders/gcc | |
parent | 5715a511fcd0490dfc74579ee95f88ef1877f021 (diff) |
toolchain: update, move to a Camellia-specific toolchain
Diffstat (limited to 'tools/dep_builders/gcc')
-rwxr-xr-x | tools/dep_builders/gcc | 55 |
1 files changed, 15 insertions, 40 deletions
diff --git a/tools/dep_builders/gcc b/tools/dep_builders/gcc index 6813abe..302bfdc 100755 --- a/tools/dep_builders/gcc +++ b/tools/dep_builders/gcc @@ -1,54 +1,29 @@ #!/bin/sh set -eu -TOOL="gcc" -VER="11.2.0" -# this is ugly -{ HASHES=$(cat) ; } <<'HASHES' -f0837f1bf8244a5cc23bd96ff6366712a791cfae01df8e25b137698aca26efc1 toolchain/cache/gcc-11.2.0.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/gcc-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/$TOOL-$VER.tar.gz" -tools/dep_builders/dl "https://ftp.gnu.org/gnu/$TOOL/$TOOL-$VER/$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 $CACHE - -echo "downloading required libraries..." -cd $CACHE/$TOOL-$VER -./contrib/download_prerequisites - -echo "building..." -rm -rf $CACHE/$TOOL-$VER/builddir -mkdir $CACHE/$TOOL-$VER/builddir -cd $CACHE/$TOOL-$VER/builddir +cd $BUILDDIR -../configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c --without-headers +../gcc/configure \ + --target=x86_64-camellia \ + --prefix="$PREFIX" \ + --disable-nls \ + --without-headers \ + --enable-languages=c,c++ \ + --disable-werror make -j4 all-gcc make -j4 all-target-libgcc -make -j4 install-gcc -make -j4 install-target-libgcc +make install-gcc +make install-target-libgcc |