aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-04-08 10:13:15 +0100
committerfanquake <fanquake@gmail.com>2022-05-12 08:21:15 +0100
commitc9c5b3060d2edb47ebfa7974fdde3154036717c2 (patch)
tree63f3d3a6b2b78956e762242817f3082b4563ed80 /contrib
parente3bab43329e78e93e13b8f55330b183c3a3c954e (diff)
downloadbitcoin-c9c5b3060d2edb47ebfa7974fdde3154036717c2.tar.xz
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.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/guix/manifest.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm
index b61c2b8899..1b2590013e 100644
--- a/contrib/guix/manifest.scm
+++ b/contrib/guix/manifest.scm
@@ -150,7 +150,7 @@ chain for " target " development."))
#:key
(base-gcc-for-libc gcc-7)
(base-kernel-headers base-linux-kernel-headers)
- (base-libc (make-glibc-without-ssp glibc-2.24))
+ (base-libc (make-glibc-without-ssp (make-glibc-without-werror glibc-2.24)))
(base-gcc (make-gcc-rpath-link base-gcc)))
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
desirable for building Bitcoin Core release binaries."
@@ -518,6 +518,9 @@ and endian independent.")
inspecting signatures in Mach-O binaries.")
(license license:expat))))
+(define (make-glibc-without-werror glibc)
+ (package-with-extra-configure-variable glibc "enable_werror" "no"))
+
(define-public glibc-2.24
(package
(inherit glibc-2.31)
@@ -604,7 +607,7 @@ inspecting signatures in Mach-O binaries.")
(list gcc-toolchain-7 "static")
(cond ((string-contains target "riscv64-")
(make-bitcoin-cross-toolchain target
- #:base-libc glibc-2.27/bitcoin-patched
+ #:base-libc (make-glibc-without-werror glibc-2.27/bitcoin-patched)
#:base-kernel-headers base-linux-kernel-headers))
(else
(make-bitcoin-cross-toolchain target)))))