Skip to content

Commit d5d4b75

Browse files
committed
guix: combine glibc hardening options into hardened-glibc
1 parent c49f2b8 commit d5d4b75

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

contrib/guix/manifest.scm

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ chain for " target " development."))
147147
#:key
148148
(base-gcc-for-libc base-gcc)
149149
(base-kernel-headers base-linux-kernel-headers)
150-
(base-libc (make-glibc-with-stack-protector (make-glibc-with-bind-now (make-glibc-without-werror glibc-2.27))))
150+
(base-libc (hardened-glibc (make-glibc-without-werror glibc-2.27)))
151151
(base-gcc (make-gcc-rpath-link (hardened-gcc base-gcc))))
152152
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
153153
desirable for building Bitcoin Core release binaries."
@@ -537,11 +537,12 @@ inspecting signatures in Mach-O binaries.")
537537
(define (make-glibc-without-werror glibc)
538538
(package-with-extra-configure-variable glibc "enable_werror" "no"))
539539

540-
(define (make-glibc-with-stack-protector glibc)
541-
(package-with-extra-configure-variable glibc "--enable-stack-protector" "all"))
542-
543-
(define (make-glibc-with-bind-now glibc)
544-
(package-with-extra-configure-variable glibc "--enable-bind-now" "yes"))
540+
;; https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
541+
(define (hardened-glibc glibc)
542+
(package-with-extra-configure-variable (
543+
package-with-extra-configure-variable glibc
544+
"--enable-stack-protector" "all")
545+
"--enable-bind-now" "yes"))
545546

546547
(define-public glibc-2.27
547548
(package

0 commit comments

Comments
 (0)