summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-12-08 23:17:58 -0800
committerKhem Raj <raj.khem@gmail.com>2018-12-09 22:07:07 -0800
commit03b620673a2e0bc9047533d71c45d7c8867ff75c (patch)
treebc59b201b1225e56ad130c644654117755ad8aa4
parentf87d761db89a41a66cbc2507ebe651f4a995cd1a (diff)
downloadmeta-clang-03b620673a2e0bc9047533d71c45d7c8867ff75c.tar.gz
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 <raj.khem@gmail.com>
-rw-r--r--recipes-devtools/clang/clang-cross_git.bb7
1 files changed, 6 insertions, 1 deletions
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() {
20 ln -sf ../clang ${D}${bindir}/${TARGET_PREFIX}clang 20 ln -sf ../clang ${D}${bindir}/${TARGET_PREFIX}clang
21 ln -sf ../clang++ ${D}${bindir}/${TARGET_PREFIX}clang++ 21 ln -sf ../clang++ ${D}${bindir}/${TARGET_PREFIX}clang++
22 ln -sf ../llvm-profdata ${D}${bindir}/${TARGET_PREFIX}llvm-profdata 22 ln -sf ../llvm-profdata ${D}${bindir}/${TARGET_PREFIX}llvm-profdata
23 for tool in llvm-ar llvm-ranlib llvm-nm
24 do
25 ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool
26 done
23} 27}
24 28
25SYSROOT_PREPROCESS_FUNCS += "clangcross_sysroot_preprocess" 29SYSROOT_PREPROCESS_FUNCS += "clangcross_sysroot_preprocess"
@@ -27,5 +31,6 @@ SYSROOT_PREPROCESS_FUNCS += "clangcross_sysroot_preprocess"
27clangcross_sysroot_preprocess () { 31clangcross_sysroot_preprocess () {
28 sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir} 32 sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
29} 33}
30SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata" 34SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \
35 *-llvm-ranlib *-llvm-nm"
31PACKAGES = "" 36PACKAGES = ""