From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4082E158041 for ; Wed, 27 Mar 2024 06:26:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 54C58E2A66; Wed, 27 Mar 2024 06:26:29 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3602AE2A66 for ; Wed, 27 Mar 2024 06:26:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2A1CF3430BC for ; Wed, 27 Mar 2024 06:26:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 43DF3B29 for ; Wed, 27 Mar 2024 06:26:26 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1711520682.2af06d2df0b0d41594490a46fb239b1ed587a76d.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/llvm/llvm-15.0.7-r3.ebuild sys-devel/llvm/llvm-16.0.6.ebuild sys-devel/llvm/llvm-17.0.6.ebuild sys-devel/llvm/llvm-18.1.2.ebuild sys-devel/llvm/llvm-19.0.0.9999.ebuild sys-devel/llvm/llvm-19.0.0_pre20240316.ebuild sys-devel/llvm/llvm-19.0.0_pre20240322.ebuild X-VCS-Directories: sys-devel/llvm/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 2af06d2df0b0d41594490a46fb239b1ed587a76d X-VCS-Branch: master Date: Wed, 27 Mar 2024 06:26:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cd6232b3-2252-4113-a1df-fc60de9d8e11 X-Archives-Hash: 70172c1d793a88022401c09272ef4ff6 commit: 2af06d2df0b0d41594490a46fb239b1ed587a76d Author: Sam James gentoo org> AuthorDate: Wed Mar 27 06:21:13 2024 +0000 Commit: Sam James gentoo org> CommitDate: Wed Mar 27 06:24:42 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2af06d2d sys-devel/llvm: add workaround for ppc with < GCC 14 Pass -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf on ppc with < GCC 14. We know the problem is related to IPA and these 3 together help. Someone is welcome to spend the time trying to narrow it down more, but applying this as a bandaid which is better than nothing. GCC 14 seems fine without this, but the "fix" bisects to something odd just like the original "break" commit, so... Bug: https://gcc.gnu.org/PR108250 Bug: https://bugs.gentoo.org/914888 Closes: https://bugs.gentoo.org/880677 Closes: https://bugs.gentoo.org/875776 Signed-off-by: Sam James gentoo.org> sys-devel/llvm/llvm-15.0.7-r3.ebuild | 7 ++++++- sys-devel/llvm/llvm-16.0.6.ebuild | 5 +++++ sys-devel/llvm/llvm-17.0.6.ebuild | 5 +++++ sys-devel/llvm/llvm-18.1.2.ebuild | 5 +++++ sys-devel/llvm/llvm-19.0.0.9999.ebuild | 5 +++++ sys-devel/llvm/llvm-19.0.0_pre20240316.ebuild | 5 +++++ sys-devel/llvm/llvm-19.0.0_pre20240322.ebuild | 5 +++++ 7 files changed, 36 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 438fd4add8ae..8dd8837831a9 100644 --- a/sys-devel/llvm/llvm-15.0.7-r3.ebuild +++ b/sys-devel/llvm/llvm-15.0.7-r3.ebuild @@ -4,7 +4,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..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 \ toolchain-funcs DESCRIPTION="Low Level Virtual Machine" @@ -321,6 +321,11 @@ get_distribution_components() { } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + 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 809dbc7f3b8c..ab3f64bf71cd 100644 --- a/sys-devel/llvm/llvm-16.0.6.ebuild +++ b/sys-devel/llvm/llvm-16.0.6.ebuild @@ -324,6 +324,11 @@ get_distribution_components() { } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + 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 local ffi_cflags ffi_ldflags diff --git a/sys-devel/llvm/llvm-17.0.6.ebuild b/sys-devel/llvm/llvm-17.0.6.ebuild index 1bcff3456a9b..c32eee3908c7 100644 --- a/sys-devel/llvm/llvm-17.0.6.ebuild +++ b/sys-devel/llvm/llvm-17.0.6.ebuild @@ -338,6 +338,11 @@ get_distribution_components() { } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + 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). diff --git a/sys-devel/llvm/llvm-18.1.2.ebuild b/sys-devel/llvm/llvm-18.1.2.ebuild index af10d82f811a..8c3d70f01423 100644 --- a/sys-devel/llvm/llvm-18.1.2.ebuild +++ b/sys-devel/llvm/llvm-18.1.2.ebuild @@ -346,6 +346,11 @@ get_distribution_components() { } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + 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). diff --git a/sys-devel/llvm/llvm-19.0.0.9999.ebuild b/sys-devel/llvm/llvm-19.0.0.9999.ebuild index b4633658a186..8624219a7e20 100644 --- a/sys-devel/llvm/llvm-19.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-19.0.0.9999.ebuild @@ -345,6 +345,11 @@ get_distribution_components() { } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + 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). diff --git a/sys-devel/llvm/llvm-19.0.0_pre20240316.ebuild b/sys-devel/llvm/llvm-19.0.0_pre20240316.ebuild index b4633658a186..8624219a7e20 100644 --- a/sys-devel/llvm/llvm-19.0.0_pre20240316.ebuild +++ b/sys-devel/llvm/llvm-19.0.0_pre20240316.ebuild @@ -345,6 +345,11 @@ get_distribution_components() { } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + 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). diff --git a/sys-devel/llvm/llvm-19.0.0_pre20240322.ebuild b/sys-devel/llvm/llvm-19.0.0_pre20240322.ebuild index b4633658a186..8624219a7e20 100644 --- a/sys-devel/llvm/llvm-19.0.0_pre20240322.ebuild +++ b/sys-devel/llvm/llvm-19.0.0_pre20240322.ebuild @@ -345,6 +345,11 @@ get_distribution_components() { } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + 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).