0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

guix: combine glibc hardening options into hardened-glibc

This commit is contained in:
fanquake 2023-01-26 10:30:41 +00:00
parent c49f2b8eb5
commit d5d4b75840
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -147,7 +147,7 @@ chain for " target " development."))
#:key
(base-gcc-for-libc base-gcc)
(base-kernel-headers base-linux-kernel-headers)
(base-libc (make-glibc-with-stack-protector (make-glibc-with-bind-now (make-glibc-without-werror glibc-2.27))))
(base-libc (hardened-glibc (make-glibc-without-werror glibc-2.27)))
(base-gcc (make-gcc-rpath-link (hardened-gcc base-gcc))))
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
desirable for building Bitcoin Core release binaries."
@ -537,11 +537,12 @@ inspecting signatures in Mach-O binaries.")
(define (make-glibc-without-werror glibc)
(package-with-extra-configure-variable glibc "enable_werror" "no"))
(define (make-glibc-with-stack-protector glibc)
(package-with-extra-configure-variable glibc "--enable-stack-protector" "all"))
(define (make-glibc-with-bind-now glibc)
(package-with-extra-configure-variable glibc "--enable-bind-now" "yes"))
;; https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
(define (hardened-glibc glibc)
(package-with-extra-configure-variable (
package-with-extra-configure-variable glibc
"--enable-stack-protector" "all")
"--enable-bind-now" "yes"))
(define-public glibc-2.27
(package