summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/clang_git.bb
diff options
context:
space:
mode:
authorMing Liu <peter.x.liu@external.atlascopco.com>2017-08-23 09:26:13 +0200
committerKhem Raj <raj.khem@gmail.com>2017-08-23 09:10:29 -0700
commit0ce41d411f9fd8213584e2b9fdc1cbb99910c330 (patch)
tree02fc33a23e2944e0302f8cfb7f0630476466ca1f /recipes-devtools/clang/clang_git.bb
parent4510752f044a5461e126d370aac0ca646d94d857 (diff)
downloadmeta-clang-0ce41d411f9fd8213584e2b9fdc1cbb99910c330.tar.gz
clang: fix nativesdk build
I could not manage to build nativesdk-clang, I encountered errors as follows: (trimmed for purpose) | ../gcc/x86_64-pokysdk-linux/6.3.0/ld:: | cannot find crt1.o: No such file or directory | cannot find crtbegin.o: No such file or directory | cannot find -lgcc | cannot find -lgcc_s After some investigation, I found it's caused by the llvm native tools could not compile with crosssdk toolchains. (special linking flags are needed) So we introduce a cmake-native class with a task to generate a native toolchain file, it will be used to build llvm native tools by passed with CROSS_TOOLCHAIN_FLAGS_NATIVE. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang/clang_git.bb')
-rw-r--r--recipes-devtools/clang/clang_git.bb3
1 files changed, 2 insertions, 1 deletions
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb
index fb7854c..c226093 100644
--- a/recipes-devtools/clang/clang_git.bb
+++ b/recipes-devtools/clang/clang_git.bb
@@ -27,7 +27,7 @@ INHIBIT_DEFAULT_DEPS = "1"
27 27
28S = "${WORKDIR}/git" 28S = "${WORKDIR}/git"
29 29
30inherit cmake 30inherit cmake cmake-native
31 31
32OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH" 32OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH"
33 33
@@ -85,6 +85,7 @@ EXTRA_OECMAKE_append_class-native = "\
85" 85"
86EXTRA_OECMAKE_append_class-nativesdk = "\ 86EXTRA_OECMAKE_append_class-nativesdk = "\
87 -DCMAKE_CROSSCOMPILING:BOOL=ON \ 87 -DCMAKE_CROSSCOMPILING:BOOL=ON \
88 -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
88 -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS_TO_BUILD}' \ 89 -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS_TO_BUILD}' \
89 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ 90 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
90 -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ 91 -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \