From 0666cc02c2666d9b71559c92d3b8f0e95905cb10 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 23 Mar 2018 10:34:43 +0100 Subject: sys-libs/compiler-rt-sanitizers: Fix LLVM_MAX_SLOT -> CLANG_SLOT The variable was intentionally chosen not to use the eclass, and its my mistake of conflating the two. Name it CLANG_SLOT to make it look more purposeful. Closes: https://bugs.gentoo.org/650750 Fixes: e5afd9d0759d (sys-libs/compiler-rt-sanitizers: LLVM_SLOT -> ...) --- .../compiler-rt-sanitizers-9999.ebuild | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild') 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 b232680519be..8b127c7f41aa 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild @@ -24,7 +24,7 @@ KEYWORDS="" IUSE="+clang test elibc_glibc" RESTRICT="!test? ( test ) !clang? ( test )" -LLVM_MAX_SLOT=${SLOT%%.*} +CLANG_SLOT=${SLOT%%.*} # llvm-6 for new lit options DEPEND=" >=sys-devel/llvm-6 @@ -32,7 +32,7 @@ DEPEND=" test? ( !=dev-python/lit-5[\${PYTHON_USEDEP}]") - =sys-devel/clang-${PV%_*}*:${LLVM_MAX_SLOT} + =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} sys-libs/compiler-rt:${SLOT} ) ${PYTHON_DEPS}" @@ -116,14 +116,14 @@ src_configure() { -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" # they are created during src_test() - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAX_SLOT}/bin/clang" - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAX_SLOT}/bin/clang++" + -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" + -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" ) # same flags are passed for build & tests, so we need to strip # them down to a subset supported by clang - CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAX_SLOT}/bin/clang \ - CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAX_SLOT}/bin/clang++ \ + CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ + CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ strip-unsupported-flags fi @@ -143,17 +143,17 @@ src_configure() { # copy clang over since resource_dir is located relatively to binary # therefore, we can put our new libraries in it - mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAX_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die - cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAX_SLOT}/bin/clang{,++} \ - "${BUILD_DIR}"/lib/llvm/${LLVM_MAX_SLOT}/bin/ || die + mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die + cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ + "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die cp "${sys_dir}"/*builtins*.a \ "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die # we also need LLVMgold.so for gold-based tests - if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAX_SLOT}/$(get_libdir)/LLVMgold.so ]]; then - ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAX_SLOT}/$(get_libdir)/LLVMgold.so \ - "${BUILD_DIR}"/lib/llvm/${LLVM_MAX_SLOT}/$(get_libdir)/ || die + if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then + ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ + "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die fi fi } -- cgit v1.2.3-65-gdbad