summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-07-03 09:34:43 +0200
committerMichał Górny <mgorny@gentoo.org>2016-07-03 10:19:07 +0200
commit7e88be51d33474f705aad33812d1368373f5bf7b (patch)
tree3493f05afc51e625e3bbd2086b10e05ee9e7f636 /sys-devel/llvm
parentsys-devel/llvm: Use tc-is-gcc from toolchain-funcs (diff)
downloadgentoo-7e88be51d33474f705aad33812d1368373f5bf7b.tar.gz
gentoo-7e88be51d33474f705aad33812d1368373f5bf7b.tar.bz2
gentoo-7e88be51d33474f705aad33812d1368373f5bf7b.zip
sys-devel/llvm: Improve cross-compiler support, #442958
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/llvm-3.8.0-r3.ebuild17
-rw-r--r--sys-devel/llvm/llvm-9999.ebuild17
2 files changed, 34 insertions, 0 deletions
diff --git a/sys-devel/llvm/llvm-3.8.0-r3.ebuild b/sys-devel/llvm/llvm-3.8.0-r3.ebuild
index 31be20b9c065..98b01a89ef9f 100644
--- a/sys-devel/llvm/llvm-3.8.0-r3.ebuild
+++ b/sys-devel/llvm/llvm-3.8.0-r3.ebuild
@@ -368,6 +368,23 @@ multilib_src_configure() {
#filter-flags -msahf -frecord-gcc-switches
fi
+ if tc-is-cross-compiler; then
+ [[ -x "/usr/bin/llvm-tblgen" ]] \
+ || die "/usr/bin/llvm-tblgen not found or usable"
+ mycmakeargs+=(
+ -DCMAKE_CROSSCOMPILING=ON
+ -DLLVM_TABLEGEN=/usr/bin/llvm-tblgen
+ )
+
+ if use clang; then
+ [[ -x "/usr/bin/clang-tblgen" ]] \
+ || die "/usr/bin/clang-tblgen not found or usable"
+ mycmakeargs+=(
+ -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
+ )
+ fi
+ fi
+
cmake-utils_src_configure
}
diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
index 745d373ecc3f..cb7781714431 100644
--- a/sys-devel/llvm/llvm-9999.ebuild
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -343,6 +343,23 @@ multilib_src_configure() {
#filter-flags -msahf -frecord-gcc-switches
fi
+ if tc-is-cross-compiler; then
+ [[ -x "/usr/bin/llvm-tblgen" ]] \
+ || die "/usr/bin/llvm-tblgen not found or usable"
+ mycmakeargs+=(
+ -DCMAKE_CROSSCOMPILING=ON
+ -DLLVM_TABLEGEN=/usr/bin/llvm-tblgen
+ )
+
+ if use clang; then
+ [[ -x "/usr/bin/clang-tblgen" ]] \
+ || die "/usr/bin/clang-tblgen not found or usable"
+ mycmakeargs+=(
+ -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
+ )
+ fi
+ fi
+
cmake-utils_src_configure
}