From: Michał Górny Date: Sat, 14 Jan 2017 14:51:21 +0000 (+0100) Subject: sys-libs/compiler-rt-sanitizers: Obtain version from llvm-config X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=c3db0f88fca16c72a0c8503260f6fdf9574cfc9f;p=gentoo.git sys-libs/compiler-rt-sanitizers: Obtain version from llvm-config Obtain the clang version that is used to build paths from llvm-config, instead of hardcoding it in ebuild. This matches the method used in upstream code (obtaining it from CMake files), and works both for release and live ebuilds. It is fine to rely on llvm-config since we need it for LLVM macros anyway. --- diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild index 6b075cdac023..c933e5339044 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild @@ -56,7 +56,8 @@ src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/${P}_build - local clang_version=4.0.0 + local llvm_version=$(llvm-config --version) || die + local clang_version=$(get_version_component_range 1-3 "${llvm_version}") local libdir=$(get_libdir) local mycmakeargs=( # used to find cmake modules