]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
meta: Enable clang as default native compiler kraj/clang-as-hostcc
authorKhem Raj <raj.khem@gmail.com>
Wed, 22 Oct 2025 06:07:26 +0000 (23:07 -0700)
committerKhem Raj <raj.khem@gmail.com>
Fri, 31 Oct 2025 18:57:23 +0000 (11:57 -0700)
commit95ed0e9103abbe36ad4f7a91a6abd5d2472ecb1e
treed34a8600208b94070f18b77e19cd648d89983642
parentfc483067e4061a28bb52dc87ec11704d27df5ba4
meta: Enable clang as default native compiler

Fix few packages which do not yet build with clang
There is one issue to tackle, when using clang for cross compiler
it also installs native clang which is then picked by the build system
if a package's build system has pieces to build for native build host
There are only handful of such packages but there are few e.g.
gmp, nettle which check for CC_FOR_BUILD during configure and it ends
up using clang from own build and does not find right libraries in
native sysroot, maybe we should add libcxx-native and compiler-rt-native
to DEFAULT_DEPENDENCIES list when llvm runtime is used.

gobject-introspection uses gcc for native builds

Its fails when built with clang

FileNotFoundError: [Errno 2] No such file or directory: 'ldd'
...

| FAILED: [code=1] gir/GLib-2.0.gir

Signed-off-by: Khem Raj <raj.khem@gmail.com>
meta/classes/toolchain/clang-native.bbclass
meta/conf/bitbake.conf
meta/recipes-devtools/clang/common-clang.inc
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.84.0.bb
meta/recipes-support/gmp/gmp_6.3.0.bb
meta/recipes-support/nettle/nettle_3.10.2.bb