From 69617e496e87815aecbd5b5a317d61f21275bec7 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Tue, 7 Jul 2026 20:51:00 +0200 Subject: [PATCH 1/2] fix(gnu.org/gcc/v8): make it usable as a build compiler + add aarch64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc 8 is needed from source to build legacy C++ that modern gcc rejects (e.g. MySQL 5.7, pantry#13062). Two blockers today: 1. `provides:` was commented out, so a downstream recipe that build-depends on gnu.org/gcc/v8 gets no `gcc`/`g++` on PATH and silently falls back to the default gcc — which then fails on the legacy sources. Publish the toolchain binaries so it can actually be selected as the build compiler. 2. Only `linux` (implicitly x86-64) was listed; add linux/aarch64 so arm64 consumers can use it too. Also switch the ar/nm/ranlib shims to direct relative symlinks into the binutils bottle (the previous pkgx-wrapper form broke under bazel/strict action envs), and tidy the version test. Co-Authored-By: Claude Opus 4.8 (1M context) --- projects/gnu.org/gcc/v8/package.yml | 70 +++++++++++++---------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/projects/gnu.org/gcc/v8/package.yml b/projects/gnu.org/gcc/v8/package.yml index b6002c76a2..6854d51a15 100644 --- a/projects/gnu.org/gcc/v8/package.yml +++ b/projects/gnu.org/gcc/v8/package.yml @@ -20,30 +20,32 @@ versions: # Pin to the 8.x line — drop everything else. ignore: - /^[0-79]\./ + - /^9\./ - /^[1-9][0-9]/ # Linux only. Darwin's old SDK situation makes gcc 8 hard to bring # up — users on darwin needing legacy C++ are better off with clang # from llvm.org which has its own legacy mode. platforms: - - linux + - linux/x86-64 + - linux/aarch64 dependencies: - gnu.org/binutils: "*" + gnu.org/binutils: '*' gnu.org/gmp: ~6 gnu.org/mpfr: ~4 gnu.org/mpc: ~1 zlib.net: ^1.3 - pkgx.sh: ">=1" build: dependencies: linux: - gnu.org/gcc: "*" # bootstrap with current gcc - perl.org: "*" - gnu.org/patch: "*" - curl.se: "*" - github.com/westes/flex: "*" + gnu.org/gcc: '*' # bootstrap with current gcc + gnu.org/make: '*' + perl.org: '*' + gnu.org/patch: '*' + curl.se: '*' + github.com/westes/flex: '*' working-directory: build script: @@ -55,16 +57,12 @@ build: # gcc symlinks expected by some build systems. This recipe lives # one level deeper than the main gnu.org/gcc (v8 subdir), so the # relative path to binutils needs `../../../../` (4 levels). - - run: - - ln -sf gcc cc - - install -m755 $PROP ar - - install -m755 $PROP nm - - install -m755 $PROP ranlib - prop: | - #!/bin/sh - TOOL=$(basename "$0") - exec pkgx +gnu.org/binutils "$TOOL" "$@" - working-directory: "{{prefix}}/bin" + - run: | + cd "{{prefix}}/bin" + ln -sf gcc cc + ln -sf ../../../../binutils/v\*/bin/ar ar + ln -sf ../../../../binutils/v\*/bin/nm nm + ln -sf ../../../../binutils/v\*/bin/ranlib ranlib env: ARGS: @@ -82,24 +80,20 @@ build: CXXFLAGS: -fPIC test: - - gcc --version | tee out - - grep "pkgx GCC {{version}}" out - - gcc -dumpversion | tee out - - grep "^8\." out + - gcc --version | grep -q "pkgx GCC {{version}}" + - gcc -dumpversion | grep -q "^8\." -# it's not wise to publish these, since this is a legacy compiler. -# if people want it, they'll invoke it explicitly. -# provides: -# - bin/ar -# - bin/cc -# - bin/c++ -# - bin/cpp -# - bin/g++ -# - bin/gcc -# - bin/gcc-ar -# - bin/gcc-nm -# - bin/gcc-ranlib -# - bin/gcov -# - bin/gfortran -# - bin/nm -# - bin/ranlib +provides: + - bin/ar + - bin/cc + - bin/c++ + - bin/cpp + - bin/g++ + - bin/gcc + - bin/gcc-ar + - bin/gcc-nm + - bin/gcc-ranlib + - bin/gcov + - bin/gfortran + - bin/nm + - bin/ranlib From 2b694fffa2f316388d2e12e14a31ac662e36ffb1 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Tue, 7 Jul 2026 21:14:54 -0400 Subject: [PATCH 2/2] Simplify platform and build dependencies in package.yml --- projects/gnu.org/gcc/v8/package.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/projects/gnu.org/gcc/v8/package.yml b/projects/gnu.org/gcc/v8/package.yml index 6854d51a15..c19820ab6c 100644 --- a/projects/gnu.org/gcc/v8/package.yml +++ b/projects/gnu.org/gcc/v8/package.yml @@ -27,8 +27,7 @@ versions: # up — users on darwin needing legacy C++ are better off with clang # from llvm.org which has its own legacy mode. platforms: - - linux/x86-64 - - linux/aarch64 + - linux dependencies: gnu.org/binutils: '*' @@ -41,7 +40,6 @@ build: dependencies: linux: gnu.org/gcc: '*' # bootstrap with current gcc - gnu.org/make: '*' perl.org: '*' gnu.org/patch: '*' curl.se: '*' @@ -57,12 +55,12 @@ build: # gcc symlinks expected by some build systems. This recipe lives # one level deeper than the main gnu.org/gcc (v8 subdir), so the # relative path to binutils needs `../../../../` (4 levels). - - run: | - cd "{{prefix}}/bin" - ln -sf gcc cc - ln -sf ../../../../binutils/v\*/bin/ar ar - ln -sf ../../../../binutils/v\*/bin/nm nm - ln -sf ../../../../binutils/v\*/bin/ranlib ranlib + - run: + - ln -sf gcc cc + - ln -sf ../../../../binutils/v\*/bin/ar ar + - ln -sf ../../../../binutils/v\*/bin/nm nm + - ln -sf ../../../../binutils/v\*/bin/ranlib ranlib + working-directory: "{{prefix}}/bin" env: ARGS: