diff options
author | Sam James <sam@gentoo.org> | 2024-03-27 06:21:13 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-03-27 06:24:42 +0000 |
commit | 2af06d2df0b0d41594490a46fb239b1ed587a76d (patch) | |
tree | 91b787f9ddbc19c49e0d5596440a7f84b754c23e /sys-devel/llvm/llvm-17.0.6.ebuild | |
parent | media-sound/abcmidi: mark as LTO-unsafe (diff) | |
download | gentoo-2af06d2df0b0d41594490a46fb239b1ed587a76d.tar.gz gentoo-2af06d2df0b0d41594490a46fb239b1ed587a76d.tar.bz2 gentoo-2af06d2df0b0d41594490a46fb239b1ed587a76d.zip |
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 <sam@gentoo.org>
Diffstat (limited to 'sys-devel/llvm/llvm-17.0.6.ebuild')
-rw-r--r-- | sys-devel/llvm/llvm-17.0.6.ebuild | 5 |
1 files changed, 5 insertions, 0 deletions
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). |