summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Rostecki <vadorovsky@protonmail.com>2024-11-10 13:06:29 +0100
committerMichał Górny <mgorny@gentoo.org>2024-11-10 18:42:41 +0100
commit066df5677a706878b18665db183c72bac6302030 (patch)
treef559202e230fa8f5fb33594dfc3e401c96e46483 /sys-libs
parentapp-shells/nushell: drop 0.95.0 (diff)
downloadgentoo-066df5677a706878b18665db183c72bac6302030.tar.gz
gentoo-066df5677a706878b18665db183c72bac6302030.tar.bz2
gentoo-066df5677a706878b18665db183c72bac6302030.zip
sys-libs/compiler-rt: Provide `atomic-builtins` IUSE flag
Atomic builtins fail to build with GCC. Furthermore, they are not needed on systems with GCC, because libatomic can be used on them. Atomic builtins are mostly useful on LLVM-based systems. Guard them behind the `atomic-builtins` IUSE flag. That flag depends on `clang`. Bug: https://bugs.gentoo.org/943129 Signed-off-by: Michal Rostecki <vadorovsky@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/39260 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/compiler-rt/compiler-rt-15.0.7-r2.ebuild5
-rw-r--r--sys-libs/compiler-rt/compiler-rt-16.0.6-r6.ebuild5
-rw-r--r--sys-libs/compiler-rt/compiler-rt-17.0.6-r2.ebuild5
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.1.8-r2.ebuild5
-rw-r--r--sys-libs/compiler-rt/compiler-rt-19.1.3-r1.ebuild5
-rw-r--r--sys-libs/compiler-rt/compiler-rt-20.0.0.9999.ebuild5
-rw-r--r--sys-libs/compiler-rt/metadata.xml11
7 files changed, 27 insertions, 14 deletions
diff --git a/sys-libs/compiler-rt/compiler-rt-15.0.7-r2.ebuild b/sys-libs/compiler-rt/compiler-rt-15.0.7-r2.ebuild
index 830a5dc0145e..cc7d61a7cc6d 100644
--- a/sys-libs/compiler-rt/compiler-rt-15.0.7-r2.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-15.0.7-r2.ebuild
@@ -12,7 +12,8 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="${LLVM_VERSION}"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+IUSE="+abi_x86_32 abi_x86_64 +atomic-builtins +clang debug test"
+REQUIRED_USE="atomic-builtins? ( clang )"
RESTRICT="!test? ( test ) !clang? ( test )"
DEPEND="
@@ -97,7 +98,7 @@ src_configure() {
local mycmakeargs=(
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_VERSION}"
- -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF
+ -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=$(usex !atomic-builtins)
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
-DCOMPILER_RT_BUILD_MEMPROF=OFF
diff --git a/sys-libs/compiler-rt/compiler-rt-16.0.6-r6.ebuild b/sys-libs/compiler-rt/compiler-rt-16.0.6-r6.ebuild
index e43bba60aa8b..d3db4884f451 100644
--- a/sys-libs/compiler-rt/compiler-rt-16.0.6-r6.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.6-r6.ebuild
@@ -12,7 +12,8 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="${LLVM_MAJOR}"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+IUSE="+abi_x86_32 abi_x86_64 +atomic-builtins +clang debug test"
+REQUIRED_USE="atomic-builtins? ( clang )"
RESTRICT="!test? ( test ) !clang? ( test )"
DEPEND="
@@ -105,7 +106,7 @@ src_configure() {
local mycmakeargs=(
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
- -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF
+ -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=$(usex !atomic-builtins)
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
-DCOMPILER_RT_BUILD_MEMPROF=OFF
diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.6-r2.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.6-r2.ebuild
index c5c7bdc62a1b..5d7323b2da07 100644
--- a/sys-libs/compiler-rt/compiler-rt-17.0.6-r2.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-17.0.6-r2.ebuild
@@ -12,7 +12,8 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="${LLVM_MAJOR}"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+IUSE="+abi_x86_32 abi_x86_64 +atomic-builtins +clang debug test"
+REQUIRED_USE="atomic-builtins? ( clang )"
RESTRICT="!test? ( test ) !clang? ( test )"
DEPEND="
@@ -105,7 +106,7 @@ src_configure() {
local mycmakeargs=(
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
- -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF
+ -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=$(usex !atomic-builtins)
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
-DCOMPILER_RT_BUILD_MEMPROF=OFF
diff --git a/sys-libs/compiler-rt/compiler-rt-18.1.8-r2.ebuild b/sys-libs/compiler-rt/compiler-rt-18.1.8-r2.ebuild
index 6fae972ab61d..d216f08f0c74 100644
--- a/sys-libs/compiler-rt/compiler-rt-18.1.8-r2.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-18.1.8-r2.ebuild
@@ -13,7 +13,8 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="${LLVM_MAJOR}"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+IUSE="+abi_x86_32 abi_x86_64 +atomic-builtins +clang debug test"
+REQUIRED_USE="atomic-builtins? ( clang )"
RESTRICT="!test? ( test ) !clang? ( test )"
DEPEND="
@@ -100,7 +101,7 @@ src_configure() {
local mycmakeargs=(
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
- -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF
+ -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=$(usex !atomic-builtins)
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
-DCOMPILER_RT_BUILD_MEMPROF=OFF
diff --git a/sys-libs/compiler-rt/compiler-rt-19.1.3-r1.ebuild b/sys-libs/compiler-rt/compiler-rt-19.1.3-r1.ebuild
index 0e331798f968..88726a8977e1 100644
--- a/sys-libs/compiler-rt/compiler-rt-19.1.3-r1.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-19.1.3-r1.ebuild
@@ -13,7 +13,8 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="${LLVM_MAJOR}"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+IUSE="+abi_x86_32 abi_x86_64 +atomic-builtins +clang debug test"
+REQUIRED_USE="atomic-builtins? ( clang )"
RESTRICT="!test? ( test ) !clang? ( test )"
DEPEND="
@@ -101,7 +102,7 @@ src_configure() {
local mycmakeargs=(
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
- -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF
+ -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=$(usex !atomic-builtins)
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_CTX_PROFILE=OFF
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
diff --git a/sys-libs/compiler-rt/compiler-rt-20.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-20.0.0.9999.ebuild
index e8c984678e90..92b6059c1ee7 100644
--- a/sys-libs/compiler-rt/compiler-rt-20.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-20.0.0.9999.ebuild
@@ -12,7 +12,8 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+IUSE="+abi_x86_32 abi_x86_64 +atomic-builtins +clang +debug test"
+REQUIRED_USE="atomic-builtins? ( clang )"
RESTRICT="!test? ( test ) !clang? ( test )"
DEPEND="
@@ -100,7 +101,7 @@ src_configure() {
local mycmakeargs=(
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
- -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF
+ -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=$(usex !atomic-builtins)
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-DCOMPILER_RT_BUILD_CTX_PROFILE=OFF
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF
diff --git a/sys-libs/compiler-rt/metadata.xml b/sys-libs/compiler-rt/metadata.xml
index 1167201f29f0..efc089d5845f 100644
--- a/sys-libs/compiler-rt/metadata.xml
+++ b/sys-libs/compiler-rt/metadata.xml
@@ -5,8 +5,15 @@
<email>llvm@gentoo.org</email>
</maintainer>
<use>
- <flag name="clang">Force building using installed clang (rather
- than the default CC/CXX).</flag>
+ <flag name="atomic-builtins">
+ Compile atomic builtins into compiler-rt.builtins. This is
+ needed on systems without GCC/libatomic, but requires using
+ Clang to build.
+ </flag>
+ <flag name="clang">
+ Force building using installed clang (rather than
+ the default CC/CXX).
+ </flag>
</use>
<upstream>
<remote-id type="github">llvm/llvm-project</remote-id>