Message ID | 20250707125819.4058560-1-richard.purdie@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | libcxx: Work around native compiles for some gcc configs | expand |
diff --git a/meta/recipes-devtools/clang/clang-native-opts.inc b/meta/recipes-devtools/clang/clang-native-opts.inc new file mode 100644 index 00000000000..f068e63933c --- /dev/null +++ b/meta/recipes-devtools/clang/clang-native-opts.inc @@ -0,0 +1,2 @@ +BUILD_CFLAGS:append:class-native = " --gcc-install-dir=$(dirname $(gcc -print-libgcc-file-name))" +BUILD_CXXFLAGS:append:class-native = " --gcc-install-dir=$(dirname $(gcc -print-libgcc-file-name))" diff --git a/meta/recipes-devtools/clang/libcxx_git.bb b/meta/recipes-devtools/clang/libcxx_git.bb index d355fc3a0f8..70511f02bd7 100644 --- a/meta/recipes-devtools/clang/libcxx_git.bb +++ b/meta/recipes-devtools/clang/libcxx_git.bb @@ -7,6 +7,7 @@ SECTION = "base" require common-clang.inc require common-source.inc +require clang-native-opts.inc inherit cmake python3native
Some systems can have mixed development headers, such as pieces of both gcc 13 and 14 which can cause build failures, particularly if libgcc and libstdc++ for gcc 13 are present but only libgcc for gcc 14 and not libstdc++ when the gcc version is gcc 13. This patch forces clang to use the full toolchain rather than any partial incomplete version. It is only necessary in the native case and should also be applicable to compiler-rt in due source, hence making it an inc file. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- meta/recipes-devtools/clang/clang-native-opts.inc | 2 ++ meta/recipes-devtools/clang/libcxx_git.bb | 1 + 2 files changed, 3 insertions(+) create mode 100644 meta/recipes-devtools/clang/clang-native-opts.inc