1 |
commit: 2b646d380fc697aeaa6279e22163f7fdb3fea9c2 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 26 21:27:57 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 26 21:35:14 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b646d38 |
7 |
|
8 |
dev-libs/libclc: Fix possible llvm/clang slot mismatch, #615754 |
9 |
|
10 |
Ensure that the LLVM slot with matching clang version is always used. |
11 |
Otherwise, if you have a newer LLVM slot without clang, and an older |
12 |
slot with clang, libclc got paths from the newer llvm-config and was |
13 |
unable to find clang. Now the ebuild finds clang first, and uses |
14 |
the llvm-config installed alongside it. |
15 |
|
16 |
dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild | 6 +++++- |
17 |
1 file changed, 5 insertions(+), 1 deletion(-) |
18 |
|
19 |
diff --git a/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild b/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild |
20 |
index 7243a9d9279..c0ac06980cb 100644 |
21 |
--- a/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild |
22 |
+++ b/dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild |
23 |
@@ -39,9 +39,13 @@ DEPEND="${RDEPEND} |
24 |
${PYTHON_DEPS}" |
25 |
|
26 |
src_configure() { |
27 |
+ # we need to find llvm with matching clang version, so look for |
28 |
+ # clang first, and then use llvm-config from the same location |
29 |
+ local clang_path=$(type -P clang) || die |
30 |
+ |
31 |
./configure.py \ |
32 |
--with-cxx-compiler="$(tc-getCXX)" \ |
33 |
- --with-llvm-config="$(type -P llvm-config)" \ |
34 |
+ --with-llvm-config="${clang_path%/*}/llvm-config" \ |
35 |
--prefix="${EPREFIX}/usr" || die |
36 |
} |