sys-devel/llvm: backport LTO filtering

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2024-03-27 06:25:18 +00:00
parent 2af06d2df0
commit f62844d3af
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 9 additions and 1 deletions

View File

@ -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)

View File

@ -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