Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions projects/gnu.org/gcc/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ dependencies:
gnu.org/mpfr: ">=2.4.0"
gnu.org/mpc: ">=0.8.0"
zlib.net: ^1.3
linux:
# Bottle the libc the compiler targets so end-user `pkgx gcc test.c`
# finds stdlib.h + crt*.o + libc.so.6 from the pkgx-integrated bottle
# without needing host glibc-devel / libc6-dev. See #8423.
# gcc's spec file embeds these paths via --with-sysroot below.
#
# Pin <2.38: glibc 2.38 introduced C23 symbol redirects
# (__isoc23_strtoul, __isoc23_*scanf, …) that the runner's older
# glibc lacks, so native gcc's own fixincl.c link fails with
# `undefined reference to __isoc23_strtoul`. Cross-builds were
# unaffected because they link against the sysroot's libc directly.
gnu.org/glibc: "<2.38"
kernel.org/linux-headers: "*"
darwin/x86-64: # since 15.1.0
libisl.sourceforge.io: ^0

Expand Down Expand Up @@ -197,6 +210,16 @@ build:
linux:
ARGS:
- --disable-multilib
# Install-time sysroot only: the built gcc embeds pkgx glibc
# paths so end-user `pkgx gcc test.c` finds stdlib.h + crt*.o.
# --with-build-sysroot is intentionally NOT set: configure
# tests need to run compiled programs at build time, which
# requires the host's dynamic linker (sysroot's ld-linux is
# at /opt/.../glibc/v.../lib not /lib so an embedded /lib/
# interp path won't resolve).
- --with-sysroot={{deps.gnu.org/glibc.prefix}}
- --with-native-system-header-dir=/include
- --with-glibc-version=2.34
linux/x86-64:
LDFLAGS:
- -pie
Expand Down
Loading