From ee31a3458d4d0e6db6af6aead2e704058b420170 Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 2 Oct 2022 19:58:52 +0200 Subject: [PATCH] Fix setup-binutils and setup-gcc --- tools/setup-binutils.sh | 6 ++++++ tools/setup-gcc.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tools/setup-binutils.sh b/tools/setup-binutils.sh index 0b4e16ea..6955f0fb 100755 --- a/tools/setup-binutils.sh +++ b/tools/setup-binutils.sh @@ -13,6 +13,9 @@ if [ ! -f toolchain/tarballs/binutils-$LUNA_BINUTILS_VERSION_REQUIRED.tar.xz ]; wget -Otoolchain/tarballs/binutils-$LUNA_BINUTILS_VERSION_REQUIRED.tar.xz https://ftp.gnu.org/gnu/binutils/binutils-$LUNA_BINUTILS_VERSION_REQUIRED.tar.xz fi +rm -rf toolchain/build/binutils +rm -rf toolchain/build/binutils-$LUNA_BINUTILS_VERSION_REQUIRED + echo Extracting Binutils... tar xf toolchain/tarballs/binutils-$LUNA_BINUTILS_VERSION_REQUIRED.tar.xz -C toolchain/build/ @@ -31,6 +34,9 @@ mkdir -p toolchain/build/binutils cd toolchain/build/binutils +unset CC +unset CXX + ../binutils-$LUNA_BINUTILS_VERSION_REQUIRED/configure --prefix="$BUILD_PREFIX" --target=$BUILD_TARGET --disable-nls --with-sysroot=$BUILD_SYSROOT --disable-werror echo Building Binutils... diff --git a/tools/setup-gcc.sh b/tools/setup-gcc.sh index ba87e638..e5e5b783 100755 --- a/tools/setup-gcc.sh +++ b/tools/setup-gcc.sh @@ -21,6 +21,9 @@ if [ ! -f toolchain/tarballs/gcc-$LUNA_GCC_VERSION_REQUIRED.tar.xz ]; then wget -Otoolchain/tarballs/gcc-$LUNA_GCC_VERSION_REQUIRED.tar.xz https://ftp.gnu.org/gnu/gcc/gcc-$LUNA_GCC_VERSION_REQUIRED/gcc-$LUNA_GCC_VERSION_REQUIRED.tar.xz fi +rm -rf toolchain/build/gcc +rm -rf toolchain/build/gcc-$LUNA_GCC_VERSION_REQUIRED + echo Extracting GCC... tar xf toolchain/tarballs/gcc-$LUNA_GCC_VERSION_REQUIRED.tar.xz -C toolchain/build/ @@ -39,6 +42,9 @@ mkdir -p toolchain/build/gcc cd toolchain/build/gcc +unset CC +unset CXX + ../gcc-$LUNA_GCC_VERSION_REQUIRED/configure --prefix="$BUILD_PREFIX" --target=$BUILD_TARGET --disable-nls --with-sysroot=$BUILD_SYSROOT --enable-languages=c,c++ --without-headers echo Building GCC...