diff options
author | James Le Cuirot <chewi@gentoo.org> | 2023-01-08 15:19:49 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2023-01-08 15:20:14 +0000 |
commit | 10f162c781a6eebf80e0aa91f54089d6d803b19d (patch) | |
tree | 0ed28d49e7c295d81f9cc84e54b6ee84aa9e447b /sys-devel | |
parent | dev-db/mongodb: Stabilize 5.0.5-r2 amd64, #888928 (diff) | |
download | gentoo-10f162c781a6eebf80e0aa91f54089d6d803b19d.tar.gz gentoo-10f162c781a6eebf80e0aa91f54089d6d803b19d.tar.bz2 gentoo-10f162c781a6eebf80e0aa91f54089d6d803b19d.zip |
sys-devel/clang: Fix cross-compiling clang after the first time
I was only half right before. LLVM_TOOLS_BINARY_DIR is only used to find
llvm-tblgen, not clang-tblgen. The latter is found on the PATH, but we
cannot rely on that because llvm.eclass adds ESYSROOT's LLVM bin to the
PATH, and that breaks cross-compiling after the time time. Instead, we
must override the location with CLANG_TABLEGEN, as we did previously.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/clang/clang-16.0.0.9999.ebuild | 4 | ||||
-rw-r--r-- | sys-devel/clang/clang-16.0.0_pre20230101.ebuild | 4 | ||||
-rw-r--r-- | sys-devel/clang/clang-16.0.0_pre20230107.ebuild | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/sys-devel/clang/clang-16.0.0.9999.ebuild b/sys-devel/clang/clang-16.0.0.9999.ebuild index 34eba8f9bc95..b3eeacb43e1d 100644 --- a/sys-devel/clang/clang-16.0.0.9999.ebuild +++ b/sys-devel/clang/clang-16.0.0.9999.ebuild @@ -331,8 +331,10 @@ multilib_src_configure() { if tc-is-cross-compiler; then has_version -b sys-devel/clang:${LLVM_MAJOR} || die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin mycmakeargs+=( - -DLLVM_TOOLS_BINARY_DIR="${BROOT}"/usr/lib/llvm/${LLVM_MAJOR}/bin + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen ) fi diff --git a/sys-devel/clang/clang-16.0.0_pre20230101.ebuild b/sys-devel/clang/clang-16.0.0_pre20230101.ebuild index 1ffc67b58c67..15f87c70e26c 100644 --- a/sys-devel/clang/clang-16.0.0_pre20230101.ebuild +++ b/sys-devel/clang/clang-16.0.0_pre20230101.ebuild @@ -331,8 +331,10 @@ multilib_src_configure() { if tc-is-cross-compiler; then has_version -b sys-devel/clang:${LLVM_MAJOR} || die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin mycmakeargs+=( - -DLLVM_TOOLS_BINARY_DIR="${BROOT}"/usr/lib/llvm/${LLVM_MAJOR}/bin + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen ) fi diff --git a/sys-devel/clang/clang-16.0.0_pre20230107.ebuild b/sys-devel/clang/clang-16.0.0_pre20230107.ebuild index 34eba8f9bc95..b3eeacb43e1d 100644 --- a/sys-devel/clang/clang-16.0.0_pre20230107.ebuild +++ b/sys-devel/clang/clang-16.0.0_pre20230107.ebuild @@ -331,8 +331,10 @@ multilib_src_configure() { if tc-is-cross-compiler; then has_version -b sys-devel/clang:${LLVM_MAJOR} || die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin mycmakeargs+=( - -DLLVM_TOOLS_BINARY_DIR="${BROOT}"/usr/lib/llvm/${LLVM_MAJOR}/bin + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen ) fi |