Skip to content

Commit de6ca41

Browse files
committed
guix: no-longer pass --enable-glibc-back-compat to Guix
Now that our Guix builds are performed on glibc 2.24 and 2.27 (RISCV), we no-longer need to pass the --enable-glibc-back-compat option. Replace it with --disable-threadlocal, to prevent the usage of symbols from glibc 2.18. None of the binaries produced required symbols later than 2.17, and 2.27 (RISCV).
1 parent 84dd81f commit de6ca41

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

contrib/guix/libexec/build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ mkdir -p "$OUTDIR"
240240
# CONFIGFLAGS
241241
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary"
242242
case "$HOST" in
243-
*linux*) CONFIGFLAGS+=" --enable-glibc-back-compat" ;;
243+
*linux*) CONFIGFLAGS+=" --disable-threadlocal" ;;
244244
esac
245245

246246
# CFLAGS
@@ -260,6 +260,13 @@ case "$HOST" in
260260
*mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
261261
esac
262262

263+
# Using --no-tls-get-addr-optimize retains compatibility with glibc 2.17, by
264+
# avoiding a PowerPC64 optimisation available in glibc 2.22 and later.
265+
# https://sourceware.org/binutils/docs-2.35/ld/PowerPC64-ELF64.html
266+
case "$HOST" in
267+
*powerpc64*) HOST_LDFLAGS="${HOST_LDFLAGS} -Wl,--no-tls-get-addr-optimize" ;;
268+
esac
269+
263270
case "$HOST" in
264271
powerpc64-linux-*|riscv64-linux-*) HOST_LDFLAGS="${HOST_LDFLAGS} -Wl,-z,noexecstack" ;;
265272
esac

0 commit comments

Comments
 (0)