Skip to content

Commit b968424

Browse files
committed
Merge bitcoin/bitcoin#27326: guix: combine and document enable_werror
4becee3 guix: combine and document enable_werror (fanquake) Pull request description: Combine into `hardened-glibc`. Document why we don't use `--disable-werror` directly. https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html > By default, the GNU C Library is built with -Werror. If you wish > to build without this option (for example, if building with a > newer version of GCC than this version of the GNU C Library was > tested with, so new warnings cause the build with -Werror to fail), > you can configure with --disable-werror. ACKs for top commit: hebasto: ACK 4becee3, the diff is correct. TheCharlatan: ACK 4becee3 Tree-SHA512: 8724415f51b4d72d40c4e797faf52c93a81147fb629332b9388ffd7f113f2b16db3b7496bf3063dd978ac629fd5bde3ec7df4f1ff1ed714cb56f316a9334d119
2 parents 7fbc703 + 4becee3 commit b968424

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

contrib/guix/manifest.scm

+8-7
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ chain for " target " development."))
150150
#:key
151151
(base-gcc-for-libc base-gcc)
152152
(base-kernel-headers base-linux-kernel-headers)
153-
(base-libc (hardened-glibc (make-glibc-without-werror glibc-2.27)))
153+
(base-libc (hardened-glibc glibc-2.27))
154154
(base-gcc (make-gcc-rpath-link (hardened-gcc base-gcc))))
155155
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
156156
desirable for building Bitcoin Core release binaries."
@@ -535,15 +535,16 @@ and endian independent.")
535535
inspecting signatures in Mach-O binaries.")
536536
(license license:expat))))
537537

538-
(define (make-glibc-without-werror glibc)
539-
(package-with-extra-configure-variable glibc "enable_werror" "no"))
540-
541538
;; https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
539+
;; We don't use --disable-werror directly, as that would be passed through to bash,
540+
;; and cause it's build to fail.
542541
(define (hardened-glibc glibc)
543542
(package-with-extra-configure-variable (
544-
package-with-extra-configure-variable glibc
545-
"--enable-stack-protector" "all")
546-
"--enable-bind-now" "yes"))
543+
package-with-extra-configure-variable (
544+
package-with-extra-configure-variable glibc
545+
"enable_werror" "no")
546+
"--enable-stack-protector" "all")
547+
"--enable-bind-now" "yes"))
547548

548549
(define-public glibc-2.27
549550
(package

0 commit comments

Comments
 (0)