commit:     6d992feaa6205ba648ae07cedd39c944362fbab3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 11 08:35:02 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 11 08:35:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d992fea

sys-devel/binutils: workaround ifcombine bug

Bug: https://gcc.gnu.org/PR118409
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/binutils/binutils-2.43-r2.ebuild | 5 ++++-
 sys-devel/binutils/binutils-9999.ebuild    | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils/binutils-2.43-r2.ebuild 
b/sys-devel/binutils/binutils-2.43-r2.ebuild
index ec5d17d21413..92f81b799d4b 100644
--- a/sys-devel/binutils/binutils-2.43-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.43-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -185,6 +185,9 @@ src_configure() {
        use cet && filter-flags -mindirect-branch -mindirect-branch=*
        use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
 
+       # Workaround for gcc PR118409
+       tc-is-gcc && [[ $(gcc-major-version) -eq 15 ]] && append-flags 
-fdisable-tree-ifcombine
+
        # https://sourceware.org/PR32372
        append-cflags $(test-flags-CC -std=gnu17)
 

diff --git a/sys-devel/binutils/binutils-9999.ebuild 
b/sys-devel/binutils/binutils-9999.ebuild
index b262083b7c2f..0104b56227f6 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -192,6 +192,9 @@ src_configure() {
        use cet && filter-flags -mindirect-branch -mindirect-branch=*
        use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
 
+       # Workaround for gcc PR118409
+       tc-is-gcc && [[ $(gcc-major-version) -eq 15 ]] && append-flags 
-fdisable-tree-ifcombine
+
        local x
        echo
        for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do

Reply via email to