From 03b620673a2e0bc9047533d71c45d7c8867ff75c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 8 Dec 2018 23:17:58 -0800 Subject: clang-cross: symlink cross versions of lto tools llvm-ar llvm-ranlib and llvm-nm are often used during LTO if enabled. These tools are currently not being found and some build systems e.g. cmake disables them which then affects -flto with clang. Enabling cross versions of them makes sure they get detected properly during cross compile Signed-off-by: Khem Raj --- recipes-devtools/clang/clang-cross_git.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'recipes-devtools') diff --git a/recipes-devtools/clang/clang-cross_git.bb b/recipes-devtools/clang/clang-cross_git.bb index 2aa67f0..083acb5 100644 --- a/recipes-devtools/clang/clang-cross_git.bb +++ b/recipes-devtools/clang/clang-cross_git.bb @@ -20,6 +20,10 @@ do_install() { ln -sf ../clang ${D}${bindir}/${TARGET_PREFIX}clang ln -sf ../clang++ ${D}${bindir}/${TARGET_PREFIX}clang++ ln -sf ../llvm-profdata ${D}${bindir}/${TARGET_PREFIX}llvm-profdata + for tool in llvm-ar llvm-ranlib llvm-nm + do + ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool + done } SYSROOT_PREPROCESS_FUNCS += "clangcross_sysroot_preprocess" @@ -27,5 +31,6 @@ SYSROOT_PREPROCESS_FUNCS += "clangcross_sysroot_preprocess" clangcross_sysroot_preprocess () { sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir} } -SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata" +SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \ + *-llvm-ranlib *-llvm-nm" PACKAGES = "" -- cgit v1.2.3-54-g00ecf