Skip to content

Commit 30f6c49

Browse files
fanquakePastaPastaPasta
authored andcommitted
Merge 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
1 parent 12afe0c commit 30f6c49

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

contrib/guix/manifest.scm

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ chain for " target " development."))
149149
#:key
150150
(base-gcc-for-libc base-gcc)
151151
(base-kernel-headers base-linux-kernel-headers)
152-
(base-libc (hardened-glibc (make-glibc-without-werror glibc-2.28)))
152+
(base-libc (hardened-glibc glibc-2.28))
153153
(base-gcc (make-gcc-rpath-link (hardened-gcc base-gcc))))
154154
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
155155
desirable for building Dash Core release binaries."
@@ -501,15 +501,16 @@ and endian independent.")
501501
inspecting signatures in Mach-O binaries.")
502502
(license license:expat))))
503503

504-
(define (make-glibc-without-werror glibc)
505-
(package-with-extra-configure-variable glibc "enable_werror" "no"))
506-
507504
;; https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
505+
;; We don't use --disable-werror directly, as that would be passed through to bash,
506+
;; and cause it's build to fail.
508507
(define (hardened-glibc glibc)
509508
(package-with-extra-configure-variable (
510-
package-with-extra-configure-variable glibc
511-
"--enable-stack-protector" "strong")
512-
"--enable-bind-now" "yes"))
509+
package-with-extra-configure-variable (
510+
package-with-extra-configure-variable glibc
511+
"enable_werror" "no")
512+
"--enable-stack-protector" "strong")
513+
"--enable-bind-now" "yes"))
513514

514515
(define-public glibc-2.28
515516
(package

0 commit comments

Comments
 (0)