From c3db0f88fca16c72a0c8503260f6fdf9574cfc9f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 14 Jan 2017 15:51:21 +0100 Subject: [PATCH] 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. --- .../compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.26.2