From: Khem Raj Date: Fri, 4 Jul 2025 03:13:49 +0000 (-0700) Subject: base.bbclass: Deferred inherit native toolchain class X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=HEAD;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git base.bbclass: Deferred inherit native toolchain class use TOOLCHAIN_NATIVE variable for selecting native compiler Default it to PREFERRED_TOOLCHAIN_NATIVE, a recipe which wants to enforce a toolchain can do so with for cross toolchains ( e.g. target, nativesdk ) TOOLCHAIN = "gcc" For native TOOLCHAIN_NATIVE = "gcc" This helps build native recipe with clang as native compiler. Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index ac145d9fd6..6be1f5c2df 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass @@ -30,8 +30,9 @@ PREFERRED_TOOLCHAIN:class-crosssdk = "${PREFERRED_TOOLCHAIN_SDK}" PREFERRED_TOOLCHAIN:class-nativesdk = "${PREFERRED_TOOLCHAIN_SDK}" TOOLCHAIN ??= "${PREFERRED_TOOLCHAIN}" +TOOLCHAIN_NATIVE ??= "${PREFERRED_TOOLCHAIN_NATIVE}" -inherit toolchain/gcc-native +inherit_defer toolchain/${TOOLCHAIN_NATIVE}-native inherit_defer toolchain/${TOOLCHAIN} def lsb_distro_identifier(d):