Skip to content

Commit 5519584

Browse files
author
Sergei Trofimovich
committed
sys-libs/glibc: switch -fstack-protector-all to -strong, bug #712356
--enable-stack-protector=all adds protection to functions that don't have a chance to corrupt stack. On top of that glibc's own tests fail on static IFUNC resolver. Let's use -fstack-protector-strong which matches Gentoo's gcc default. Should fix at least the following test failures: FAIL: elf/ifuncmain9picstatic FAIL: elf/ifuncmain9static Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/712356 Bug: https://sourceware.org/PR25680 Package-Manager: Portage-2.3.94, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <[email protected]>
1 parent 7b04716 commit 5519584

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

sys-libs/glibc/glibc-2.31-r1.ebuild

+5-1
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,11 @@ glibc_do_configure() {
870870
myconf+=( --enable-stack-protector=no )
871871
;;
872872
*)
873-
myconf+=( --enable-stack-protector=$(usex ssp all no) )
873+
# Use '=strong' instead of '=all' to protect only functions
874+
# worth protecting from stack smashes.
875+
# '=all' is also known to have a problem in IFUNC resolution
876+
# tests: https://sourceware.org/PR25680, bug #712356.
877+
myconf+=( --enable-stack-protector=$(usex ssp strong no) )
874878
;;
875879
esac
876880
myconf+=( --enable-stackguard-randomization )

sys-libs/glibc/glibc-9999.ebuild

+5-1
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,11 @@ glibc_do_configure() {
869869
myconf+=( --enable-stack-protector=no )
870870
;;
871871
*)
872-
myconf+=( --enable-stack-protector=$(usex ssp all no) )
872+
# Use '=strong' instead of '=all' to protect only functions
873+
# worth protecting from stack smashes.
874+
# '=all' is also known to have a problem in IFUNC resolution
875+
# tests: https://sourceware.org/PR25680, bug #712356.
876+
myconf+=( --enable-stack-protector=$(usex ssp strong no) )
873877
;;
874878
esac
875879
myconf+=( --enable-stackguard-randomization )

0 commit comments

Comments
 (0)