commit: 4aa715f19c2aa05665adc6fbcb9a0521032d4846
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 15 08:43:59 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Apr 15 10:15:25 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aa715f1
llvm-runtimes/compiler-rt-sanitizers: Update resource dir search
Update clang resource dir search logic to handle additional directories
created by flang-runtime. Rather than expecting a single directory
to exist in /usr/lib/clang/*/lib, determine the correct subdirectory
by looking at the build directory prepared by CMake.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../compiler-rt-sanitizers-21.0.0.9999.ebuild | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git
a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0.9999.ebuild
b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0.9999.ebuild
index 09cf1645bd1a..4e87f3ac02fa 100644
---
a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0.9999.ebuild
+++
b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0.9999.ebuild
@@ -189,9 +189,11 @@ src_configure() {
cmake_src_configure
if use test; then
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic
compiler-rt install: ${sys_dir[*]}"
+ local sys_dest=( "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/lib/* )
+ [[ ! -e ${sys_dest} ]] && die "Unable to find ${sys_dest}"
+ [[ ${#sys_dest[@]} -ne 1 ]] && die "Non-deterministic
compiler-rt install: ${sys_dest[*]}"
+ local sys_dir=(
"${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}/lib/${sys_dest##*/}" )
+ [[ ! -e ${sys_dir} ]] && die "${sys_dir} is missing"
# copy clang over since resource_dir is located relatively to
binary
# therefore, we can put our new libraries in it
@@ -200,8 +202,7 @@ src_configure() {
"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
- cp "${sys_dir}"/*builtins*.a \
-
"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+ cp "${sys_dir}"/*builtins*.a "${sys_dest}/" || die
# we also need LLVMgold.so for gold-based tests
if [[ -f
${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
ln -s
"${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \