Skip to content

Commit c9c5b30

Browse files
committed
guix: compile glibc without -werror
Compiling glibc 2.24 and 2.27 with the new GCC 10 results in a number of new warnings, i.e: ```bash libc-tls.c: In function ‘__libc_setup_tls’: libc-tls.c:208:30: error: array subscript 1 is outside the bounds of an interior zero-length array ‘struct dtv_slotinfo[0]’ [-Werror=zero-length-bounds] 208 | static_slotinfo.si.slotinfo[1].map = main_map; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from ../sysdeps/x86_64/ldsodefs.h:54, from ../sysdeps/gnu/ldsodefs.h:46, from ../sysdeps/unix/sysv/linux/ldsodefs.h:25, from libc-tls.c:20: ../sysdeps/generic/ldsodefs.h:398:7: note: while referencing ‘slotinfo’ 398 | } slotinfo[0]; | ^~~~~~~~ ``` While we could try and backport all the patches required to fix these up, it would currently seem easier to disable -Werror, which Guix uses by default when building glibc.
1 parent e3bab43 commit c9c5b30

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

contrib/guix/manifest.scm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ chain for " target " development."))
150150
#:key
151151
(base-gcc-for-libc gcc-7)
152152
(base-kernel-headers base-linux-kernel-headers)
153-
(base-libc (make-glibc-without-ssp glibc-2.24))
153+
(base-libc (make-glibc-without-ssp (make-glibc-without-werror glibc-2.24)))
154154
(base-gcc (make-gcc-rpath-link base-gcc)))
155155
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
156156
desirable for building Bitcoin Core release binaries."
@@ -518,6 +518,9 @@ and endian independent.")
518518
inspecting signatures in Mach-O binaries.")
519519
(license license:expat))))
520520

521+
(define (make-glibc-without-werror glibc)
522+
(package-with-extra-configure-variable glibc "enable_werror" "no"))
523+
521524
(define-public glibc-2.24
522525
(package
523526
(inherit glibc-2.31)
@@ -604,7 +607,7 @@ inspecting signatures in Mach-O binaries.")
604607
(list gcc-toolchain-7 "static")
605608
(cond ((string-contains target "riscv64-")
606609
(make-bitcoin-cross-toolchain target
607-
#:base-libc glibc-2.27/bitcoin-patched
610+
#:base-libc (make-glibc-without-werror glibc-2.27/bitcoin-patched)
608611
#:base-kernel-headers base-linux-kernel-headers))
609612
(else
610613
(make-bitcoin-cross-toolchain target)))))

0 commit comments

Comments
 (0)