summaryrefslogtreecommitdiff
path: root/sys-devel/llvm/llvm-15.0.7-r3.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/llvm/llvm-15.0.7-r3.ebuild')
-rw-r--r--sys-devel/llvm/llvm-15.0.7-r3.ebuild12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys-devel/llvm/llvm-15.0.7-r3.ebuild b/sys-devel/llvm/llvm-15.0.7-r3.ebuild
index 438fd4add8ae..6306ee2107c0 100644
--- a/sys-devel/llvm/llvm-15.0.7-r3.ebuild
+++ b/sys-devel/llvm/llvm-15.0.7-r3.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..11} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
+inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 \
toolchain-funcs
DESCRIPTION="Low Level Virtual Machine"
@@ -321,6 +321,16 @@ 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).
+ tc-is-gcc && filter-lto
+
local ffi_cflags ffi_ldflags
if use libffi; then
ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)