From 43a9b93192e1149d62e104e380a3eada12ce80ce Mon Sep 17 00:00:00 2001 From: Drew Galbraith Date: Tue, 13 Jun 2023 23:32:01 -0700 Subject: [PATCH] Fix? toolchain --- scripts/build_toolchain.sh | 8 +++++++- toolchain/patches/binutils/00-first.patch | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/build_toolchain.sh b/scripts/build_toolchain.sh index 0dc4f75..5c5312f 100755 --- a/scripts/build_toolchain.sh +++ b/scripts/build_toolchain.sh @@ -23,7 +23,7 @@ NEWLIB_NAME="newlib-$NEWLIB_VERSION" NEWLIB_PKG="${NEWLIB_NAME}.tar.gz" NEWLIB_BASE_URL="ftp://sourceware.org/pub/newlib" -GCC_VERSION="13.1.0" +GCC_VERSION="12.3.0" GCC_NAME="gcc-$GCC_VERSION" GCC_PKG="${GCC_NAME}.tar.xz" GCC_BASE_URL="https://ftp.gnu.org/gnu/gcc" @@ -37,6 +37,9 @@ pushd "$TOOLCHAIN/srcs" if [ ! -d "$BINUTILS_NAME" ]; then tar -xJf ${BINUTILS_PKG} + pushd $BINUTILS_NAME + patch -p1 <$TOOLCHAIN/patches/binutils/00-first.patch + popd fi if [ ! -e $NEWLIB_PKG ]; then @@ -53,6 +56,9 @@ pushd "$TOOLCHAIN/srcs" if [ ! -d "$GCC_NAME" ]; then tar -xJf $GCC_PKG + pushd $GCC_NAME + patch -p1 <$TOOLCHAIN/patches/gcc/00-first.patch + popd fi diff --git a/toolchain/patches/binutils/00-first.patch b/toolchain/patches/binutils/00-first.patch index ed88cd0..f5f19ec 100644 --- a/toolchain/patches/binutils/00-first.patch +++ b/toolchain/patches/binutils/00-first.patch @@ -115,3 +115,10 @@ index de04a44b..b1f3f26b 100644 x86_64-*-rdos*) targ_emul=elf64rdos ;; x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi +diff --git a/ld/emulparams/elf_x86_64_acadia.sh b/ld/emulparams/elf_x86_64_acadia.sh +new file mode 100644 +index 00000000..59e7df71 +--- /dev/null ++++ b/ld/emulparams/elf_x86_64_acadia.sh +@@ -0,0 +1 @@ ++source_sh ${srcdir}/emulparams/elf_x86_64.sh