Skip to content

Commit

Permalink
Update the GCC toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
adonis0147 committed Dec 10, 2024
1 parent 1b2ca95 commit 52bd7c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion toolchain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
15 changes: 11 additions & 4 deletions toolchain/generate_toolchan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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}" \
Expand All @@ -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"

Expand Down

0 comments on commit 52bd7c9

Please sign in to comment.