commit:     3c279c7734179483274ddd919d9d21c561f854cc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 11 07:32:13 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 11 07:48:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c279c77

sys-apps/systemd: drop FORTIFY_SOURCE=3 hacks in 9999, add note to 252.4-r1

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

 sys-apps/systemd/systemd-252.4-r1.ebuild |  9 +++++++++
 sys-apps/systemd/systemd-9999.ebuild     | 18 ++----------------
 2 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/sys-apps/systemd/systemd-252.4-r1.ebuild 
b/sys-apps/systemd/systemd-252.4-r1.ebuild
index ff03afa3b8cf..6391f42dbf34 100644
--- a/sys-apps/systemd/systemd-252.4-r1.ebuild
+++ b/sys-apps/systemd/systemd-252.4-r1.ebuild
@@ -4,6 +4,15 @@
 EAPI=7
 PYTHON_COMPAT=( python3_{8..11} )
 
+if [[ ${PV} != 252.* ]] ; then
+       # The F_S=3 issues should be fixed in 253.
+       # - https://github.com/systemd/systemd/issues/22801
+       # - https://github.com/systemd/systemd/pull/25967
+       # - 
https://github.com/systemd/systemd/commit/7929e180aa47a2692ad4f053afac2857d7198758
+       # - 
https://github.com/systemd/systemd/commit/4f79f545b3c46c358666c9f5f2b384fe50aac4b4
+       die "Please remove the FORTIFY_SOURCE hacks in src_configure."
+fi
+
 # Avoid QA warnings
 TMPFILES_OPTIONAL=1
 UDEV_OPTIONAL=1

diff --git a/sys-apps/systemd/systemd-9999.ebuild 
b/sys-apps/systemd/systemd-9999.ebuild
index 6a423f8c5593..9e93b8d36e1b 100644
--- a/sys-apps/systemd/systemd-9999.ebuild
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2011-2022 Gentoo Authors
+# Copyright 2011-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -26,7 +26,7 @@ else
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86"
 fi
 
-inherit bash-completion-r1 flag-o-matic linux-info meson-multilib pam
+inherit bash-completion-r1 linux-info meson-multilib pam
 inherit python-any-r1 systemd toolchain-funcs udev usr-ldscript
 
 DESCRIPTION="System and service manager for Linux"
@@ -251,20 +251,6 @@ src_configure() {
        # Prevent conflicts with i686 cross toolchain, bug 559726
        tc-export AR CC NM OBJCOPY RANLIB
 
-       # Broken with FORTIFY_SOURCE=3: bug #841770.
-       #
-       # Our toolchain sets F_S=2 by default w/ >= -O2, so we need
-       # to unset F_S first, then explicitly set 2, to negate any default
-       # and anything set by the user if they're choosing 3 (or if they've
-       # modified GCC to set 3).
-       #
-       if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
-               # We can't unconditionally do this b/c we fortify needs
-               # some level of optimisation.
-               filter-flags -D_FORTIFY_SOURCE=3
-               append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
-       fi
-
        python_setup
 
        multilib-minimal_src_configure

Reply via email to