From 8e9c05ddfcd74be3b53c7c4c2fbc799a9ab7fa61 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 14 Jun 2023 01:39:07 +0100 Subject: llvm.eclass: export LLVM_CONFIG if not cross-compiling Set LLVM_CONFIG to help Meson (bug #907965) but only do it for empty ESYSROOT (as a proxy for "are we cross-compiling?"). Closes: https://bugs.gentoo.org/907965 Signed-off-by: Sam James Closes: https://github.com/gentoo/gentoo/pull/31429 Signed-off-by: Sam James --- eclass/llvm.eclass | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'eclass/llvm.eclass') diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass index 022820d012d5..223e2a15baf4 100644 --- a/eclass/llvm.eclass +++ b/eclass/llvm.eclass @@ -250,6 +250,12 @@ llvm_pkg_setup() { llvm_fix_tool_path ADDR2LINE AR AS LD NM OBJCOPY OBJDUMP RANLIB llvm_fix_tool_path READELF STRINGS STRIP + # Set LLVM_CONFIG to help Meson (bug #907965) but only do it + # for empty ESYSROOT (as a proxy for "are we cross-compiling?"). + if [[ -z ${ESYSROOT} ]] ; then + llvm_fix_tool_path LLVM_CONFIG + fi + local prefix=${ESYSROOT} local llvm_path=${prefix}/usr/lib/llvm/${LLVM_SLOT}/bin local IFS=: -- cgit v1.2.3-65-gdbad