summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-03-27 06:25:18 +0000
committerSam James <sam@gentoo.org>2024-03-27 06:25:37 +0000
commitf62844d3afbaf4594846499e8b8bc2d8a7bd25ec (patch)
tree7b4a34ef192ba21cb2572a834ee506889d5c5a64 /sys-devel
parentsys-devel/llvm: add workaround for ppc with < GCC 14 (diff)
downloadgentoo-f62844d3afbaf4594846499e8b8bc2d8a7bd25ec.tar.gz
gentoo-f62844d3afbaf4594846499e8b8bc2d8a7bd25ec.tar.bz2
gentoo-f62844d3afbaf4594846499e8b8bc2d8a7bd25ec.zip
sys-devel/llvm: backport LTO filtering
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/llvm/llvm-15.0.7-r3.ebuild5
-rw-r--r--sys-devel/llvm/llvm-16.0.6.ebuild5
2 files changed, 9 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 8dd8837831a9..6306ee2107c0 100644
--- a/sys-devel/llvm/llvm-15.0.7-r3.ebuild
+++ b/sys-devel/llvm/llvm-15.0.7-r3.ebuild
@@ -326,6 +326,11 @@ multilib_src_configure() {
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)
diff --git a/sys-devel/llvm/llvm-16.0.6.ebuild b/sys-devel/llvm/llvm-16.0.6.ebuild
index ab3f64bf71cd..aa171c1cd361 100644
--- a/sys-devel/llvm/llvm-16.0.6.ebuild
+++ b/sys-devel/llvm/llvm-16.0.6.ebuild
@@ -329,7 +329,10 @@ multilib_src_configure() {
append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf)
fi
- tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670
+ # 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