summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-01-25 14:57:03 -0800
committerKhem Raj <raj.khem@gmail.com>2024-03-06 19:18:22 -0800
commit1f3c19e07c378a3ec01e91ffb4b98e9c8be21c66 (patch)
tree6d03b9ee5abe3a7cd8c02d1a99b8735e6a413864
parent292506c431f2037d35ccb7f4f957ce143b617450 (diff)
downloadmeta-clang-1f3c19e07c378a3ec01e91ffb4b98e9c8be21c66.tar.gz
libcxx: Pass LLVM_RUNTIME_TARGETS
LLVM_RUNTIME_TARGETS will define the location of triple for target correctly. This is an effort to fix the case where cross compiler will lurk into host libc++ header if libcxx-native is staged for a given recipe e.g. graphviz, it works ok if --sysroot is specified because thats how it tries to find if its a cross sysroot or not but without that it has mind of its own. e.g. try x86_64-yoe-linux-musl-clang++ -stdlib=libc++ ~/tests/iosfd.cpp -v -c ... clang -cc1 version 18.1.0 based upon LLVM 18.1.0 default target x86_64-unknown-linux-gnu ignoring nonexistent directory "/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../x86_64-pc-linux-gnu/include" ignoring nonexistent directory "/include" /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/graphviz/8.1.0/recipe-sysroot-native/usr/bin/../include/c++/v1 /usr/local/include /usr/include /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/graphviz/8.1.0/recipe-sysroot-native/usr/lib/clang/18/include End of search list. ... See where it is looking for c++ headers. Its not an issue for OE right now, since we always specify --sysroot in CC but still would be good to handle it amicably if possible Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-devtools/clang/libcxx_git.bb1
1 files changed, 1 insertions, 0 deletions
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb
index 3d5ce54..9d4f033 100644
--- a/recipes-devtools/clang/libcxx_git.bb
+++ b/recipes-devtools/clang/libcxx_git.bb
@@ -69,6 +69,7 @@ EXTRA_OECMAKE += "\
69 -DLIBCXX_CXX_ABI_LIBRARY_PATH=${B}/lib${LLVM_LIBDIR_SUFFIX} \ 69 -DLIBCXX_CXX_ABI_LIBRARY_PATH=${B}/lib${LLVM_LIBDIR_SUFFIX} \
70 -S ${S}/runtimes \ 70 -S ${S}/runtimes \
71 -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi;libunwind' \ 71 -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi;libunwind' \
72 -DLLVM_RUNTIME_TARGETS=${HOST_SYS} \
72 -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ 73 -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
73 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ 74 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
74" 75"