commit: 7e88be51d33474f705aad33812d1368373f5bf7b
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 3 07:34:43 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul 3 08:19:07 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e88be51
sys-devel/llvm: Improve cross-compiler support, #442958
sys-devel/llvm/llvm-3.8.0-r3.ebuild | 17 +++++++++++++++++
sys-devel/llvm/llvm-9999.ebuild | 17 +++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/sys-devel/llvm/llvm-3.8.0-r3.ebuild
b/sys-devel/llvm/llvm-3.8.0-r3.ebuild
index 31be20b..98b01a8 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 745d373..cb77817 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
}