commit:     f62844d3afbaf4594846499e8b8bc2d8a7bd25ec
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 27 06:25:18 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 27 06:25:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f62844d3

sys-devel/llvm: backport LTO filtering

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/llvm/llvm-15.0.7-r3.ebuild | 5 +++++
 sys-devel/llvm/llvm-16.0.6.ebuild    | 5 ++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

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

Reply via email to