summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-06-26 23:27:57 +0200
committerMichał Górny <mgorny@gentoo.org>2017-06-26 23:35:14 +0200
commit2b646d380fc697aeaa6279e22163f7fdb3fea9c2 (patch)
tree5bdba76a5938ed253a7529013a7ba9d904a08c77 /dev-libs/libclc
parentdev-util/drone: Version bump to 0.7.3 (diff)
downloadgentoo-2b646d380fc697aeaa6279e22163f7fdb3fea9c2.tar.gz
gentoo-2b646d380fc697aeaa6279e22163f7fdb3fea9c2.tar.bz2
gentoo-2b646d380fc697aeaa6279e22163f7fdb3fea9c2.zip
dev-libs/libclc: Fix possible llvm/clang slot mismatch, #615754
Ensure that the LLVM slot with matching clang version is always used. Otherwise, if you have a newer LLVM slot without clang, and an older slot with clang, libclc got paths from the newer llvm-config and was unable to find clang. Now the ebuild finds clang first, and uses the llvm-config installed alongside it.
Diffstat (limited to 'dev-libs/libclc')
-rw-r--r--dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild6
1 files changed, 5 insertions, 1 deletions
diff --git a/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild b/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
index 7243a9d9279e..c0ac06980cb4 100644
--- a/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
+++ b/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild
@@ -39,9 +39,13 @@ DEPEND="${RDEPEND}
${PYTHON_DEPS}"
src_configure() {
+ # we need to find llvm with matching clang version, so look for
+ # clang first, and then use llvm-config from the same location
+ local clang_path=$(type -P clang) || die
+
./configure.py \
--with-cxx-compiler="$(tc-getCXX)" \
- --with-llvm-config="$(type -P llvm-config)" \
+ --with-llvm-config="${clang_path%/*}/llvm-config" \
--prefix="${EPREFIX}/usr" || die
}