Skip to content

Commit 4becee3

Browse files
committed
guix: combine and document enable_werror
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.
1 parent e352f5a commit 4becee3

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."
@@ -530,15 +530,16 @@ and endian independent.")
530530
inspecting signatures in Mach-O binaries.")
531531
(license license:expat))))
532532

533-
(define (make-glibc-without-werror glibc)
534-
(package-with-extra-configure-variable glibc "enable_werror" "no"))
535-
536533
;; https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
534+
;; We don't use --disable-werror directly, as that would be passed through to bash,
535+
;; and cause it's build to fail.
537536
(define (hardened-glibc glibc)
538537
(package-with-extra-configure-variable (
539-
package-with-extra-configure-variable glibc
540-
"--enable-stack-protector" "all")
541-
"--enable-bind-now" "yes"))
538+
package-with-extra-configure-variable (
539+
package-with-extra-configure-variable glibc
540+
"enable_werror" "no")
541+
"--enable-stack-protector" "all")
542+
"--enable-bind-now" "yes"))
542543

543544
(define-public glibc-2.27
544545
(package

0 commit comments

Comments
 (0)