From 52bd7c98202957fc68c3f91413e8946841f1d67b Mon Sep 17 00:00:00 2001 From: Adonis Ling Date: Thu, 25 Apr 2024 11:08:46 +0800 Subject: [PATCH] Update the GCC toolchain --- toolchain/Dockerfile | 2 +- toolchain/generate_toolchan.sh | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index 03f75b5..86f3f6e 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 AS builder RUN apt update && apt upgrade --yes RUN DEBIAN_FRONTEND=noninteractive apt install --yes \ - build-essential texinfo bison git curl rsync gawk python-is-python3 help2man file autoconf libtool pkg-config + build-essential texinfo bison flex git curl rsync gawk python-is-python3 help2man file autoconf libtool pkg-config RUN mkdir -p /opt/patchelf RUN curl -L "https://github.com/NixOS/patchelf/releases/download/0.16.1/patchelf-0.16.1-$(uname -m).tar.gz" \ diff --git a/toolchain/generate_toolchan.sh b/toolchain/generate_toolchan.sh index 3483840..d5f6281 100755 --- a/toolchain/generate_toolchan.sh +++ b/toolchain/generate_toolchan.sh @@ -11,14 +11,14 @@ declare -r PACKAGES_PATH="${WORKSPACE_PATH}/packages" declare -r BINUTILS_PACKAGE_URL='https://ftpmirror.gnu.org/binutils/binutils-2.43.1.tar.xz' declare -r BINUTILS_MD5SUM='9202d02925c30969d1917e4bad5a2320' -declare -r LINUX_PACKAGE_URL='https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.11.2.tar.xz' -declare -r LINUX_MD5SUM='00b4181d5087910cecb81c281909beba' +declare -r LINUX_PACKAGE_URL='https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.12.4.tar.xz' +declare -r LINUX_MD5SUM='65af21bb8e024c2ef26c067d51d7f8f9' declare -r GLIBC_PACKAGE_URL='https://ftpmirror.gnu.org/glibc/glibc-2.39.tar.xz' declare -r GLIBC_MD5SUM='be81e87f72b5ea2c0ffe2bedfeb680c6' -declare -r GCC_PACKAGE_URL='https://ftpmirror.gnu.org/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz' -declare -r GCC_MD5SUM='2268420ba02dc01821960e274711bde0' +declare -r GCC_PACKAGE_URL='https://gcc.gnu.org/pub/gcc/snapshots/LATEST-15/gcc-15-20241208.tar.xz' +declare -r GCC_MD5SUM='b73c043092890f0fe0509b674a19928e' declare -r LIBXCRYPT_PACKAGE_URL='https://github.com/besser82/libxcrypt/releases/download/v4.4.36/libxcrypt-4.4.36.tar.xz' declare -r LIBXCRYPT_MD5SUM='b84cd4104e08c975063ec6c4d0372446' @@ -282,6 +282,10 @@ function build_binutils_final() { mkdir build cd build + # Prevent binutils from linking libfl.so + export LEX='missing lex' + export FLEX='missing flex' + LDFLAGS="-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib \ -Wl,-dynamic-linker,$(find "${PREFIX}/lib" -name 'ld-linux-*')" \ ../configure --prefix="${PREFIX}" \ @@ -293,6 +297,9 @@ function build_binutils_final() { make -j "$(nproc)" make install-strip + unset FLEX + unset LEX + # Remove the old files rm -rf "${PREFIX}/lib/ldscripts"