commit:     b00d86046fa4b65d76e564503de56b97f3e3d23e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  4 04:36:19 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun  4 04:36:41 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b00d8604

sys-devel/llvm: restore filter-lto for 16.x for now

We've reverted it upstream for 16.x, but will be fixed for 17.

Thanks to Holger Hoffstätte for pointing this out.

Bug: https://bugs.gentoo.org/873670
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/llvm/llvm-16.0.4.ebuild      | 4 +++-
 sys-devel/llvm/llvm-16.0.5.9999.ebuild | 4 +++-
 sys-devel/llvm/llvm-16.0.5.ebuild      | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sys-devel/llvm/llvm-16.0.4.ebuild 
b/sys-devel/llvm/llvm-16.0.4.ebuild
index 2d844e82840c..c72c4d351e80 100644
--- a/sys-devel/llvm/llvm-16.0.4.ebuild
+++ b/sys-devel/llvm/llvm-16.0.4.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{9..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
 inherit toolchain-funcs
 
 DESCRIPTION="Low Level Virtual Machine"
@@ -325,6 +325,8 @@ get_distribution_components() {
 }
 
 multilib_src_configure() {
+       tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670
+
        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.5.9999.ebuild 
b/sys-devel/llvm/llvm-16.0.5.9999.ebuild
index 840748f0601b..7898a8cd400c 100644
--- a/sys-devel/llvm/llvm-16.0.5.9999.ebuild
+++ b/sys-devel/llvm/llvm-16.0.5.9999.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{9..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
 inherit toolchain-funcs
 
 DESCRIPTION="Low Level Virtual Machine"
@@ -325,6 +325,8 @@ get_distribution_components() {
 }
 
 multilib_src_configure() {
+       tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670
+
        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.5.ebuild 
b/sys-devel/llvm/llvm-16.0.5.ebuild
index 2d844e82840c..c72c4d351e80 100644
--- a/sys-devel/llvm/llvm-16.0.5.ebuild
+++ b/sys-devel/llvm/llvm-16.0.5.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{9..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
 inherit toolchain-funcs
 
 DESCRIPTION="Low Level Virtual Machine"
@@ -325,6 +325,8 @@ get_distribution_components() {
 }
 
 multilib_src_configure() {
+       tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670
+
        local ffi_cflags ffi_ldflags
        if use libffi; then
                ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)

Reply via email to