diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2021-01-25 16:50:38 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-01-25 15:40:54 -0800 |
commit | 39e9ec68cd97a059103c975aa785165c574e0aba (patch) | |
tree | 3b95dfd5410d1448b11186bbfb9f5e16a85b3111 /classes/clang.bbclass | |
parent | dca6dd429d046000ec8649ed57dca5193aeb6252 (diff) | |
download | meta-clang-39e9ec68cd97a059103c975aa785165c574e0aba.tar.gz |
clang: for x86_64, set Yocto GCC install search path
Under Yocto host, while using clang-native to build, it searches
install host gcc failed which causing include file not found
[snip]
|clang++ -target x86_64-linux -MMD -MF src/base/files/file_path_constants.o.d -I../../../tools/gn/src -I. \
-isystem/tmp-glibc/work/x86_64-linux/gn-native/87.0.4280.141-r0/recipe-sysroot-native/usr/include -O2 -pipe \
-std=c++17 -c ../../../tools/gn/src/base/files/file_path_constants.cc -o src/base/files/file_path_constants.o
|../../../tools/gn/src/base/files/file_path_constants.cc:7:10: fatal error: 'iterator' file not found
|#include <iterator>
| ^~~~~~~~
[snip]
Set three Yocto based GCC triple: poky, oe-core and wind river
Before aplly the patch
[snip]
$ ../recipe-sysroot-native/usr/bin/clang++ -v
clang version 11.0.1 (https://github.com/llvm/llvm-project 43ff75f2c3feef64f9d73328230d34dac8832a91)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/buildarea/raid5/hjia/wrlinux-20/build_master-wr_browser_2021012017/build-gn-native/tmp-glibc/work/x86_64-linux/gn-native/87.0.4280.141-r0/chromium-87.0.4280.141/../recipe-sysroot-native/usr/bin
[snip]
After aplly the patch:
[snip]
$ clang-11 -v
clang version 11.0.1 (https://github.com/llvm/llvm-project 22c3241ff9a6224261df48d0258957fd8acc3d64)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /buildarea/raid5/hjia/wrlinux-20/build_master-wr_browser_2021012017/build/tmp-glibc/work/x86_64-linux/clang-native/11.0.1-r0/build/bin
Found candidate GCC installation: /usr/lib//x86_64-wrs-linux/10.1.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-wrs-linux/10.1.0
Selected GCC installation: /usr/lib//x86_64-wrs-linux/10.1.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
[snip]
BTW, it is hardly to insert a triple by the replacement of TARGET_SYS
(=${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}), since TARGET_VENDOR
is different between clang and clang-native
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Diffstat (limited to 'classes/clang.bbclass')
0 files changed, 0 insertions, 0 deletions