From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH v5 2/5] base.bbclass: Deferred inherit native toolchain class
Date: Tue, 1 Jul 2025 22:32:17 -0700 [thread overview]
Message-ID: <20250702053220.4104358-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20250702053220.4104358-1-raj.khem@gmail.com>
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 <raj.khem@gmail.com>
---
meta/classes-global/base.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index ac145d9fd64..6be1f5c2df2 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):
next prev parent reply other threads:[~2025-07-02 5:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 5:32 [PATCH v5 1/5] clang-native: Add class to use clang as native compiler Khem Raj
2025-07-02 5:32 ` Khem Raj [this message]
2025-07-02 5:32 ` [PATCH v5 3/5] compiler-rt,libcxx: Use clang for native versions as well Khem Raj
2025-07-02 5:32 ` [PATCH v5 4/5] sanity/utils: Directly use gcc, not BUILD_CC Khem Raj
2025-07-02 5:48 ` Patchtest results for " patchtest
2025-07-02 5:32 ` [PATCH v5 5/5] sanity/utils: Directly use gcc instead of BUILD_CC in host_gcc_version Khem Raj
2025-07-02 10:33 ` [OE-core] " Antonin Godard
2025-07-02 10:37 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250702053220.4104358-2-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.