commit:     d48b4e3e35ab368d7e219601194abd4b0ccd0a93
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue May 24 18:56:37 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 24 18:58:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d48b4e3e

dev-util/systemtap: don't force -D_FORTIFY_SOURCE=2

We already set it in the toolchain and forcing it (by default --enable-ssp)
has two problems:
1. It prevents upgrading to -D_FORTIFY_SOURCE=3;
2. It prevents builds with no optimisation (as fortify requires it).

--disable-ssp just disables *appending* -fstack-protector* and F_S=2,
it doesn't actually disable the features by passing the negated flags
like -fno* or -U*, so it's fine to do this.

Closes: https://bugs.gentoo.org/794667
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/systemtap/systemtap-4.5-r1.ebuild | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dev-util/systemtap/systemtap-4.5-r1.ebuild 
b/dev-util/systemtap/systemtap-4.5-r1.ebuild
index b11a0b1830c0..a4f2a7d2663b 100644
--- a/dev-util/systemtap/systemtap-4.5-r1.ebuild
+++ b/dev-util/systemtap/systemtap-4.5-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -96,6 +96,15 @@ src_configure() {
                --disable-grapher
                --disable-refdocs
                --disable-server
+               # Our toolchain sets this for us already and adding in
+               # -D_FORTIFY_SOURCE=2 breaks builds w/ no optimisation.
+               # This option (at least as of 4.5) doesn't pass -fno* etc,
+               # it just doesn't _add_ options, which is good. If it changes
+               # to actually pass -fno-stack-protector and friends, we'll
+               # need to change course. Forcing =2 also has problems for
+               # setting it to 3.
+               # bug #794667.
+               --disable-ssp
                --enable-pie
                --with-python3
                --without-java

Reply via email to