dev-libs/libclc: Respect CXX to fix C++ stdlib incompat, #612582
authorMichał Górny <mgorny@gentoo.org>
Tue, 14 Mar 2017 17:31:50 +0000 (18:31 +0100)
committerMichał Górny <mgorny@gentoo.org>
Tue, 14 Mar 2017 17:38:09 +0000 (18:38 +0100)
Force using the correct C++ compiler via passing --with-cxx-compiler=
to the configure script. Otherwise, libclc defaults to using clang++
which can cause compatibility issues when clang++ defaults to libc++
and LLVM was built using gcc. This does not affect the compiler used
to build the runtime.

dev-libs/libclc/libclc-0.2.0_pre20170118.ebuild

index 016da1ccc2b4b5bd0800d512787364f9c852da47..a3f5bf3c2c7c85f3d5513e101123fdbeae3a7a86 100644 (file)
@@ -15,7 +15,7 @@ else
        GIT_ECLASS="vcs-snapshot"
 fi
 
-inherit python-any-r1 ${GIT_ECLASS}
+inherit python-any-r1 toolchain-funcs ${GIT_ECLASS}
 
 DESCRIPTION="OpenCL C library"
 HOMEPAGE="http://libclc.llvm.org/"
@@ -40,6 +40,7 @@ DEPEND="${RDEPEND}
 
 src_configure() {
        ./configure.py \
+               --with-cxx-compiler="$(tc-getCXX)" \
                --with-llvm-config="$(type -P llvm-config)" \
                --prefix="${EPREFIX}/usr" || die
 }