summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorNaveen Saini <naveen.kumar.saini@intel.com>2023-06-21 11:12:34 +0800
committerKhem Raj <raj.khem@gmail.com>2023-06-22 07:54:05 -0700
commitd73932ba992935bfbd7da35c933ce38440521352 (patch)
treee12e64bcb0d9d158f69f69c5e8f804dd7882a15e /recipes-devtools
parent91776cbcac27742b5f64f4cfd8085c54e135c3ea (diff)
downloadmeta-clang-d73932ba992935bfbd7da35c933ce38440521352.tar.gz
llvm-config: fix script for multilib build
From multilib build: | CMake Error at cmake/FindLLVM.cmake:79 (message): | Failed running | tmp-glibc/work/x86-64-v3-oe-linux/ispc/1.20.0-r0/recipe-sysroot/usr/bin/crossscripts/llvm-config;--libfiles;engine;ipo;bitreader;bitwriter;instrumentation;linker;option;frontendopenmp;windowsdriver;x86 | Call Stack (most recent call first): | cmake/FindLLVM.cmake:116 (run_llvm_config) | CMakeLists.txt:377 (get_llvm_libfiles) Currently hardcoded to /lib, which causing multilib build failure. An easy solution could be set and export YOCTO_ALTERNATE_LIBDIR to $baselib in recipe, but it would require to add this in all affected recipes. Other approach is to handle in llvm-config script itself. Unfortunately $baselib is not available in env for the llvm-config script, so extracting baselib value from $base_libdir as its being exported and available in env and then set YOCTO_ALTERNATE_LIBDIR accordingly. Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/clang/clang/llvm-config6
1 files changed, 5 insertions, 1 deletions
diff --git a/recipes-devtools/clang/clang/llvm-config b/recipes-devtools/clang/clang/llvm-config
index a9876a2..bfdc61a 100644
--- a/recipes-devtools/clang/clang/llvm-config
+++ b/recipes-devtools/clang/clang/llvm-config
@@ -8,7 +8,11 @@
8SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" 8SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
9NEXT_LLVM_CONFIG="$(which -a llvm-config | sed -n 2p)" 9NEXT_LLVM_CONFIG="$(which -a llvm-config | sed -n 2p)"
10export YOCTO_ALTERNATE_EXE_PATH="${YOCTO_ALTERNATE_EXE_PATH:="$(readlink -f "$SCRIPT_DIR/../llvm-config")"}" 10export YOCTO_ALTERNATE_EXE_PATH="${YOCTO_ALTERNATE_EXE_PATH:="$(readlink -f "$SCRIPT_DIR/../llvm-config")"}"
11export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib"}" 11if [ -n "$( echo $base_libdir | sed -n '/lib64/p')" ]; then
12 export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib64"}"
13else
14 export YOCTO_ALTERNATE_LIBDIR="${YOCTO_ALTERNATE_LIBDIR:="/lib"}"
15fi
12if [[ $# == 0 ]]; then 16if [[ $# == 0 ]]; then
13 exec "$NEXT_LLVM_CONFIG" 17 exec "$NEXT_LLVM_CONFIG"
14fi 18fi