commit:     a6fe92df26942f6c6293008dbd45b509d5038814
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  3 14:48:10 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug  3 14:48:10 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6fe92df

sys-apps/util-linux: pass -fno-ipa-pta for GCC 15 before 15.2

This was fixed upstream a little while ago and first fixed in a keyworded
GCC 15 version in ::gentoo in 41c9bccb13b963c3bdd6d22f26dc8b141b257ee1
(i.e. 15.1.1_p20250705-r1), but the window between 15.1 being out & keyworded
and 41c9bccb13b963c3bdd6d22f26dc8b141b257ee1 is a bit larger than I'd like
given this, so let's add -fno-ipa-pta for GCC 15 before 15.2 (for simplicity)
as a workaround.

Bug: https://gcc.gnu.org/PR120006
Closes: https://bugs.gentoo.org/961040
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{util-linux-2.41.1.ebuild => util-linux-2.41.1-r1.ebuild}       | 6 ++++++
 sys-apps/util-linux/util-linux-9999.ebuild                          | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/sys-apps/util-linux/util-linux-2.41.1.ebuild 
b/sys-apps/util-linux/util-linux-2.41.1-r1.ebuild
similarity index 98%
rename from sys-apps/util-linux/util-linux-2.41.1.ebuild
rename to sys-apps/util-linux/util-linux-2.41.1-r1.ebuild
index 364132e10a27..96bcf9e9b25d 100644
--- a/sys-apps/util-linux/util-linux-2.41.1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.41.1-r1.ebuild
@@ -353,6 +353,12 @@ multilib_src_configure() {
 
 src_configure() {
        append-lfs-flags
+
+       # Workaround for bug #961040 (gcc PR120006)
+       if tc-is-gcc && [[ $(gcc-major-version) == 15 && $(gcc-minor-version) 
-lt 2 ]] ; then
+               append-flags -fno-ipa-pta
+       fi
+
        multilib-minimal_src_configure
 }
 

diff --git a/sys-apps/util-linux/util-linux-9999.ebuild 
b/sys-apps/util-linux/util-linux-9999.ebuild
index 90bee97edbb2..7049afbd6d23 100644
--- a/sys-apps/util-linux/util-linux-9999.ebuild
+++ b/sys-apps/util-linux/util-linux-9999.ebuild
@@ -128,6 +128,11 @@ src_unpack() {
 src_prepare() {
        default
 
+       # Workaround for bug #961040 (gcc PR120006)
+       if tc-is-gcc && [[ $(gcc-major-version) == 15 && $(gcc-minor-version) 
-lt 2 ]] ; then
+               append-flags -fno-ipa-pta
+       fi
+
        if use test ; then
                # Known-failing tests
                local known_failing_tests=(

Reply via email to