summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md23
-rw-r--r--conf/nonclangable.conf22
2 files changed, 9 insertions, 36 deletions
diff --git a/README.md b/README.md
index 7792280..5d6c081 100644
--- a/README.md
+++ b/README.md
@@ -83,27 +83,21 @@ compiler, switching to use LLVM runtime is done via a config metadata knob
83TC_CXX_RUNTIME = "llvm" 83TC_CXX_RUNTIME = "llvm"
84``` 84```
85 85
86TC_CXX_RUNTIME variable influences individual runtime elements and can be set explicitly as well 86TC_CXX_RUNTIME variable influences individual runtime elements for C runtime
87e.g. `LIBCPLUSPLUS` `COMPILER_RT` and `UNWINDLIB`. 87C++ runtime and unwinding support.
88 88
89Please note that this will still use crt files from GNU compiler always, while llvm now 89Please note that this will still use crt files from GNU compiler, while LLVM
90do provide crt files, they have not been yet integrated into the toolchain. 90does provide crt files, they have not been yet integrated into the toolchain.
91 91
92# Default C++ Standard Library Switch 92# Default C++ Standard Library Switch
93 93
94Using TC_CXX_RUNTIME variable will select which C++ runtime is used, however it can be overridden 94Using TC_CXX_RUNTIME variable will select which C++ runtime is used.
95if needed to by modifying `LIBCPLUSPLUS` variable, usually defaults used by `TC_CXX_RUNTIME` are
96best fit. e.g. below we select LLVM C++ as default C++ runtime.
97
98```shell
99LIBCPLUSPLUS = "-stdlib=libc++"
100```
101 95
102in `local.conf`. 96in `local.conf`.
103You can select libstdc++ per package too by writing bbappends for them containing 97You can select a C++ runtime per package by writing bbappends for them containing
104 98
105```shell 99```shell
106LIBCPLUSPLUS:toolchain-clang:pn-<recipe> = "-stdlib=libc++" 100TC_CXX_RUNTIME:toolchain-clang:pn-<recipe> = "llvm"
107``` 101```
108Defaults are chosen to be GNU for maximum compatibility with existing GNU systems. It's always 102Defaults are chosen to be GNU for maximum compatibility with existing GNU systems. It's always
109good to use single runtime on a system, mixing runtimes can cause complications during 103good to use single runtime on a system, mixing runtimes can cause complications during
@@ -187,7 +181,8 @@ and OE will start using gcc to cross compile that recipe.
187If a component does not build with libc++, you can add it to `conf/nonclangable.inc` e.g. 181If a component does not build with libc++, you can add it to `conf/nonclangable.inc` e.g.
188 182
189```shell 183```shell
190CXX:remove:pn-<recipe>:toolchain-clang = " -stdlib=libc++ " 184CXXFLAGS:append:pn-<recipe>:toolchain-clang = " -stdlib=libstdc++ "
185LDFLAGS:append:pn-<recipe>:toolchain-clang = " -stdlib=libstdc++ "
191``` 186```
192 187
193# compiler-rt failing in do_configure with custom TARGET_VENDOR 188# compiler-rt failing in do_configure with custom TARGET_VENDOR
diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf
index 4465ec6..d0ca639 100644
--- a/conf/nonclangable.conf
+++ b/conf/nonclangable.conf
@@ -21,8 +21,6 @@ TOOLCHAIN:pn-grub:riscv64 = "gcc"
21TOOLCHAIN:pn-grub:aarch64 = "gcc" 21TOOLCHAIN:pn-grub:aarch64 = "gcc"
22# crash embeds version of gdb which is not buildable with clang 22# crash embeds version of gdb which is not buildable with clang
23TOOLCHAIN:pn-crash = "gcc" 23TOOLCHAIN:pn-crash = "gcc"
24# See https://github.com/llvm/llvm-project/issues/71925
25LIBCPLUSPLUS:pn-elfutils:toolchain-clang = "-stdlib=libstdc++"
26#| erl_bits.c:(.text+0xc2a): undefined reference to `__extendhfsf2' 24#| erl_bits.c:(.text+0xc2a): undefined reference to `__extendhfsf2'
27#| erl_bits.c:(.text+0x1bfa): undefined reference to `__truncsfhf2' 25#| erl_bits.c:(.text+0x1bfa): undefined reference to `__truncsfhf2'
28#| clang-15: error: linker command failed with exit code 1 (use -v to see invocation) 26#| clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
@@ -429,26 +427,6 @@ COMPILER_RT:pn-ostree:libc-glibc:toolchain-clang:x86-64 = "-rtlib=libgcc --unwin
429#clang-8: error: linker command failed with exit code 1 (use -v to see invocation) 427#clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
430COMPILER_RT:pn-libhugetlbfs:libc-glibc:toolchain-clang:arm = "--unwindlib=libgcc" 428COMPILER_RT:pn-libhugetlbfs:libc-glibc:toolchain-clang:arm = "--unwindlib=libgcc"
431 429
432# Does not compile with libc++ from clang 17+ anymore see
433# https://github.com/llvm/llvm-project/issues/63743
434LIBCPLUSPLUS:pn-apt:toolchain-clang = "-stdlib=libstdc++"
435
436# All following need to use libstdc++ with clang-19
437# see https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals
438LIBCPLUSPLUS:pn-pbzip2:toolchain-clang = "-stdlib=libstdc++"
439LIBCPLUSPLUS:pn-nlohmann-json:toolchain-clang = "-stdlib=libstdc++"
440LIBCPLUSPLUS:pn-paho-mqtt-cpp:toolchain-clang = "-stdlib=libstdc++"
441LIBCPLUSPLUS:pn-poco:toolchain-clang = "-stdlib=libstdc++"
442LIBCPLUSPLUS:pn-netdata:toolchain-clang = "-stdlib=libstdc++"
443LIBCPLUSPLUS:pn-cpp-netlib:toolchain-clang = "-stdlib=libstdc++"
444LIBCPLUSPLUS:pn-cpprest:toolchain-clang = "-stdlib=libstdc++"
445# See https://lists.openembedded.org/g/openembedded-devel/topic/meta_oe_patch_2_3/108964413
446LIBCPLUSPLUS:pn-tomlplusplus:toolchain-clang = "-stdlib=libstdc++"
447LIBCPLUSPLUS:pn-doxygen:toolchain-clang = "-stdlib=libstdc++"
448# https://www.mail-archive.com/freebsd-pkg-fallout@freebsd.org/msg2394451.html
449LIBCPLUSPLUS:pn-snort3:toolchain-clang = "-stdlib=libstdc++"
450LIBCPLUSPLUS:pn-libdaq:toolchain-clang = "-stdlib=libstdc++"
451
452# Uses gcc for native tools, e.g. nsinstall and passes clang options which fails so 430# Uses gcc for native tools, e.g. nsinstall and passes clang options which fails so
453# let same compiler ( gcc or clang) be native/cross compiler 431# let same compiler ( gcc or clang) be native/cross compiler
454# | gcc: error: unrecognized command line option ‘-Qunused-arguments’ 432# | gcc: error: unrecognized command line option ‘-Qunused-arguments’