From 2af06d2df0b0d41594490a46fb239b1ed587a76d Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 27 Mar 2024 06:21:13 +0000 Subject: sys-devel/llvm: add workaround for ppc with < GCC 14 Pass -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf on ppc with < GCC 14. We know the problem is related to IPA and these 3 together help. Someone is welcome to spend the time trying to narrow it down more, but applying this as a bandaid which is better than nothing. GCC 14 seems fine without this, but the "fix" bisects to something odd just like the original "break" commit, so... Bug: https://gcc.gnu.org/PR108250 Bug: https://bugs.gentoo.org/914888 Closes: https://bugs.gentoo.org/880677 Closes: https://bugs.gentoo.org/875776 Signed-off-by: Sam James --- sys-devel/llvm/llvm-17.0.6.ebuild | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys-devel/llvm/llvm-17.0.6.ebuild') diff --git a/sys-devel/llvm/llvm-17.0.6.ebuild b/sys-devel/llvm/llvm-17.0.6.ebuild index 1bcff3456a9b..c32eee3908c7 100644 --- a/sys-devel/llvm/llvm-17.0.6.ebuild +++ b/sys-devel/llvm/llvm-17.0.6.ebuild @@ -338,6 +338,11 @@ get_distribution_components() { } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile # LLVM with LTO anyway (which is not necessarily its fault). -- cgit v1.2.3-65-gdbad