Skip to content

Commit aa87879

Browse files
committed
guix: pass enable-bind-now to glibc
Both glibcs we build support `--enable-bind-now`: Disable lazy binding for installed shared objects and programs. This provides additional security hardening because it enables full RELRO and a read-only global offset table (GOT), at the cost of slightly increased program load times. See: https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
1 parent 3897a13 commit aa87879

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

contrib/guix/manifest.scm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ chain for " target " development."))
136136
#:key
137137
(base-gcc-for-libc base-gcc)
138138
(base-kernel-headers base-linux-kernel-headers)
139-
(base-libc (make-glibc-without-werror glibc-2.24))
139+
(base-libc (make-glibc-with-bind-now (make-glibc-without-werror glibc-2.24)))
140140
(base-gcc (make-gcc-rpath-link base-gcc)))
141141
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
142142
desirable for building Bitcoin Core release binaries."
@@ -523,6 +523,9 @@ inspecting signatures in Mach-O binaries.")
523523
(define (make-glibc-with-stack-protector glibc)
524524
(package-with-extra-configure-variable glibc "--enable-stack-protector" "all"))
525525

526+
(define (make-glibc-with-bind-now glibc)
527+
(package-with-extra-configure-variable glibc "--enable-bind-now" "yes"))
528+
526529
(define-public glibc-2.24
527530
(package
528531
(inherit glibc-2.31)
@@ -610,7 +613,8 @@ inspecting signatures in Mach-O binaries.")
610613
((string-contains target "-linux-")
611614
(list (cond ((string-contains target "riscv64-")
612615
(make-bitcoin-cross-toolchain target
613-
#:base-libc (make-glibc-with-stack-protector (make-glibc-without-werror glibc-2.27/bitcoin-patched))))
616+
#:base-libc (make-glibc-with-stack-protector
617+
(make-glibc-with-bind-now (make-glibc-without-werror glibc-2.27/bitcoin-patched)))))
614618
(else
615619
(make-bitcoin-cross-toolchain target)))))
616620
((string-contains target "darwin")

0 commit comments

Comments
 (0)