Skip to content

Commit 3897a13

Browse files
committed
guix: enable SSP for RISC-V glibc (2.27)
Pass `--enable-stack-protector=all` when building the glibc used for the RISC-V toolchain, to enable stack smashing protection on all functions, in the glibc code.
1 parent 62c8646 commit 3897a13

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contrib/guix/manifest.scm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,9 @@ inspecting signatures in Mach-O binaries.")
520520
(define (make-glibc-without-werror glibc)
521521
(package-with-extra-configure-variable glibc "enable_werror" "no"))
522522

523+
(define (make-glibc-with-stack-protector glibc)
524+
(package-with-extra-configure-variable glibc "--enable-stack-protector" "all"))
525+
523526
(define-public glibc-2.24
524527
(package
525528
(inherit glibc-2.31)
@@ -607,7 +610,7 @@ inspecting signatures in Mach-O binaries.")
607610
((string-contains target "-linux-")
608611
(list (cond ((string-contains target "riscv64-")
609612
(make-bitcoin-cross-toolchain target
610-
#:base-libc (make-glibc-without-werror glibc-2.27/bitcoin-patched)))
613+
#:base-libc (make-glibc-with-stack-protector (make-glibc-without-werror glibc-2.27/bitcoin-patched))))
611614
(else
612615
(make-bitcoin-cross-toolchain target)))))
613616
((string-contains target "darwin")

0 commit comments

Comments
 (0)