summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2023-01-02 22:42:23 +0000
committerJames Le Cuirot <chewi@gentoo.org>2023-01-03 08:54:21 +0000
commitecbd50481557ed916cd5f68d21acd2404d54fc24 (patch)
treee7a40cdf67fc13d7c1d54f86fd0fd9649652c54e /sys-devel
parentdev-python/pip-run: Keyword 10.0.2 riscv, #889038 (diff)
downloadgentoo-ecbd50481557ed916cd5f68d21acd2404d54fc24.tar.gz
gentoo-ecbd50481557ed916cd5f68d21acd2404d54fc24.tar.bz2
gentoo-ecbd50481557ed916cd5f68d21acd2404d54fc24.zip
sys-devel/llvm: Fix cross-compiling by applying the build environment
When you cross-compile LLVM, it invokes CMake a second time during src_compile to perform a "native" build. This invocation does not make use of a toolchain file and relies on environment variables such as CC and CXX to determine the compiler instead. These will often point to the cross-compiler rather than the native/build compiler, leading to a failure when it tries to link the build system's libzstd. The toolchain file provided in src_configure sets up the cross-compiler as necessary, so there is no harm in pointing CC and friends to the native/build compiler during src_compile. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/llvm/llvm-15.0.6.9999.ebuild2
-rw-r--r--sys-devel/llvm/llvm-15.0.6.ebuild2
-rw-r--r--sys-devel/llvm/llvm-16.0.0.9999.ebuild2
-rw-r--r--sys-devel/llvm/llvm-16.0.0_pre20221217.ebuild2
-rw-r--r--sys-devel/llvm/llvm-16.0.0_pre20221226.ebuild2
-rw-r--r--sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild2
6 files changed, 6 insertions, 6 deletions
diff --git a/sys-devel/llvm/llvm-15.0.6.9999.ebuild b/sys-devel/llvm/llvm-15.0.6.9999.ebuild
index 8f078936032b..da0c1604bb7f 100644
--- a/sys-devel/llvm/llvm-15.0.6.9999.ebuild
+++ b/sys-devel/llvm/llvm-15.0.6.9999.ebuild
@@ -452,7 +452,7 @@ multilib_src_configure() {
}
multilib_src_compile() {
- cmake_build distribution
+ tc-env_build cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
diff --git a/sys-devel/llvm/llvm-15.0.6.ebuild b/sys-devel/llvm/llvm-15.0.6.ebuild
index a0f90b636940..ea6bf123f308 100644
--- a/sys-devel/llvm/llvm-15.0.6.ebuild
+++ b/sys-devel/llvm/llvm-15.0.6.ebuild
@@ -452,7 +452,7 @@ multilib_src_configure() {
}
multilib_src_compile() {
- cmake_build distribution
+ tc-env_build cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
diff --git a/sys-devel/llvm/llvm-16.0.0.9999.ebuild b/sys-devel/llvm/llvm-16.0.0.9999.ebuild
index 5f54f11fe7fe..38faaf5b1adf 100644
--- a/sys-devel/llvm/llvm-16.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-16.0.0.9999.ebuild
@@ -455,7 +455,7 @@ multilib_src_configure() {
}
multilib_src_compile() {
- cmake_build distribution
+ tc-env_build cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
diff --git a/sys-devel/llvm/llvm-16.0.0_pre20221217.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20221217.ebuild
index 9b5f96110a1f..9a91d21695fd 100644
--- a/sys-devel/llvm/llvm-16.0.0_pre20221217.ebuild
+++ b/sys-devel/llvm/llvm-16.0.0_pre20221217.ebuild
@@ -455,7 +455,7 @@ multilib_src_configure() {
}
multilib_src_compile() {
- cmake_build distribution
+ tc-env_build cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
diff --git a/sys-devel/llvm/llvm-16.0.0_pre20221226.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20221226.ebuild
index 9b5f96110a1f..9a91d21695fd 100644
--- a/sys-devel/llvm/llvm-16.0.0_pre20221226.ebuild
+++ b/sys-devel/llvm/llvm-16.0.0_pre20221226.ebuild
@@ -455,7 +455,7 @@ multilib_src_configure() {
}
multilib_src_compile() {
- cmake_build distribution
+ tc-env_build cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
diff --git a/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild
index ecc7df9944c0..4798e7ef1858 100644
--- a/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild
+++ b/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild
@@ -455,7 +455,7 @@ multilib_src_configure() {
}
multilib_src_compile() {
- cmake_build distribution
+ tc-env_build cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli