commit: d7800c9177982ef129da5e7a144cd280217f08e6 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Feb 5 15:14:36 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Feb 5 15:16:18 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7800c91
llvm-core/clang: build with -fno-tree-vectorize with GCC 16 to workaround miscomp Workaround libclang being miscompiled by GCC 16's uncountable loop vectorisation changes. I've kept the main bug (bug #968756) open to track removing the workaround once fixed upstream. Bug: https://gcc.gnu.org/PR123588 Bug: https://bugs.gentoo.org/968756 Closes: https://bugs.gentoo.org/915000 Closes: https://bugs.gentoo.org/967934 Closes: https://bugs.gentoo.org/968163 Signed-off-by: Sam James <sam <AT> gentoo.org> llvm-core/clang/clang-15.0.7-r3.ebuild | 5 ++++- llvm-core/clang/clang-16.0.6-r1.ebuild | 5 ++++- llvm-core/clang/clang-17.0.6-r1.ebuild | 5 ++++- llvm-core/clang/clang-18.1.8-r7.ebuild | 5 ++++- llvm-core/clang/clang-19.1.7-r1.ebuild | 5 ++++- llvm-core/clang/clang-20.1.8.ebuild | 5 ++++- llvm-core/clang/clang-21.1.8.ebuild | 5 ++++- llvm-core/clang/clang-22.1.0_rc1.ebuild | 3 +++ llvm-core/clang/clang-22.1.0_rc2.ebuild | 3 +++ llvm-core/clang/clang-23.0.0.9999.ebuild | 3 +++ llvm-core/clang/clang-23.0.0_pre20260125.ebuild | 3 +++ llvm-core/clang/clang-23.0.0_pre20260131.ebuild | 3 +++ 12 files changed, 43 insertions(+), 7 deletions(-) diff --git a/llvm-core/clang/clang-15.0.7-r3.ebuild b/llvm-core/clang/clang-15.0.7-r3.ebuild index f774f4bee33f..9e0a74b24c8d 100644 --- a/llvm-core/clang/clang-15.0.7-r3.ebuild +++ b/llvm-core/clang/clang-15.0.7-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -345,6 +345,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-16.0.6-r1.ebuild b/llvm-core/clang/clang-16.0.6-r1.ebuild index c5b318397ded..fc8fdef9c952 100644 --- a/llvm-core/clang/clang-16.0.6-r1.ebuild +++ b/llvm-core/clang/clang-16.0.6-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -353,6 +353,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-17.0.6-r1.ebuild b/llvm-core/clang/clang-17.0.6-r1.ebuild index 4f079ee1a3b5..e793bf6b8dd0 100644 --- a/llvm-core/clang/clang-17.0.6-r1.ebuild +++ b/llvm-core/clang/clang-17.0.6-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -350,6 +350,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-18.1.8-r7.ebuild b/llvm-core/clang/clang-18.1.8-r7.ebuild index 12f696d65781..f0db93e3d3cb 100644 --- a/llvm-core/clang/clang-18.1.8-r7.ebuild +++ b/llvm-core/clang/clang-18.1.8-r7.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -353,6 +353,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-19.1.7-r1.ebuild b/llvm-core/clang/clang-19.1.7-r1.ebuild index fcebb83af201..fab6921ce3d9 100644 --- a/llvm-core/clang/clang-19.1.7-r1.ebuild +++ b/llvm-core/clang/clang-19.1.7-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -341,6 +341,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-20.1.8.ebuild b/llvm-core/clang/clang-20.1.8.ebuild index afbbedde4cf1..e54241e6eb98 100644 --- a/llvm-core/clang/clang-20.1.8.ebuild +++ b/llvm-core/clang/clang-20.1.8.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -343,6 +343,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-21.1.8.ebuild b/llvm-core/clang/clang-21.1.8.ebuild index 87c0dee1c521..4f5350f885c1 100644 --- a/llvm-core/clang/clang-21.1.8.ebuild +++ b/llvm-core/clang/clang-21.1.8.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -343,6 +343,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-22.1.0_rc1.ebuild b/llvm-core/clang/clang-22.1.0_rc1.ebuild index b2375a3d744a..ef8718bccf34 100644 --- a/llvm-core/clang/clang-22.1.0_rc1.ebuild +++ b/llvm-core/clang/clang-22.1.0_rc1.ebuild @@ -344,6 +344,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-22.1.0_rc2.ebuild b/llvm-core/clang/clang-22.1.0_rc2.ebuild index b2375a3d744a..ef8718bccf34 100644 --- a/llvm-core/clang/clang-22.1.0_rc2.ebuild +++ b/llvm-core/clang/clang-22.1.0_rc2.ebuild @@ -344,6 +344,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-23.0.0.9999.ebuild b/llvm-core/clang/clang-23.0.0.9999.ebuild index b2375a3d744a..ef8718bccf34 100644 --- a/llvm-core/clang/clang-23.0.0.9999.ebuild +++ b/llvm-core/clang/clang-23.0.0.9999.ebuild @@ -344,6 +344,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-23.0.0_pre20260125.ebuild b/llvm-core/clang/clang-23.0.0_pre20260125.ebuild index b2375a3d744a..ef8718bccf34 100644 --- a/llvm-core/clang/clang-23.0.0_pre20260125.ebuild +++ b/llvm-core/clang/clang-23.0.0_pre20260125.ebuild @@ -344,6 +344,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" diff --git a/llvm-core/clang/clang-23.0.0_pre20260131.ebuild b/llvm-core/clang/clang-23.0.0_pre20260131.ebuild index b2375a3d744a..ef8718bccf34 100644 --- a/llvm-core/clang/clang-23.0.0_pre20260131.ebuild +++ b/llvm-core/clang/clang-23.0.0_pre20260131.ebuild @@ -344,6 +344,9 @@ multilib_src_configure() { ) fi + # Workaround for bug #968756 (gcc PR123588) + tc-is-gcc && [[ $(gcc-major-version) -eq 16 ]] && local -x CXXFLAGS="${CXXFLAGS} -fno-tree-vectorize" + # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
