Skip to content

Commit ac290a5

Browse files
committed
clang-cross: Create cross binary copies instead of symlinks
This ensures that search path for subsequent tools e.g. linker assembler are searched in the same dir where <cross>-clang is installed. If its a symlink to ../clang then the reference installation dir is ../ and all cross-tools are not there so clang may fail to find assembler/linker from cross staging area and use /usr/bin/ld or /usr/bin/as which we do not want Signed-off-by: Khem Raj <[email protected]>
1 parent fa7be0c commit ac290a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

recipes-devtools/clang/clang-cross_git.bb

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ require common-source.inc
1313
inherit cross
1414
DEPENDS += "clang-native virtual/cross-binutils"
1515

16+
#INHIBIT_PACKAGE_STRIP = "1"
17+
INHIBIT_SYSROOT_STRIP = "1"
1618
do_install() {
1719
install -d ${D}${bindir}
18-
for tool in clang clang++ clang-tidy lld ld.lld llvm-profdata \
20+
for tool in clang-tidy lld ld.lld llvm-profdata \
1921
llvm-nm llvm-ar llvm-as llvm-ranlib llvm-strip llvm-objcopy llvm-objdump llvm-readelf \
2022
llvm-addr2line llvm-dwp llvm-size llvm-strings llvm-cov
2123
do
2224
ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool
2325
done
26+
install -m 0755 ${STAGING_BINDIR_NATIVE}/clang ${D}${bindir}/${TARGET_PREFIX}clang
27+
install -m 0755 ${STAGING_BINDIR_NATIVE}/clang ${D}${bindir}/${TARGET_PREFIX}clang++
2428
}
2529
SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-lld *-ld.lld \
2630
*-llvm-nm *-llvm-ar *-llvm-as *-llvm-ranlib *-llvm-strip \

0 commit comments

Comments
 (0)