From: mark.yang@lge.com
To: openembedded-core@lists.openembedded.org
Cc: "mark.yang" <mark.yang@lge.com>
Subject: [PATCH v2 3/3] kernel-arch: add KERNEL_TOOLCHAIN to switch the whole kernel toolchain
Date: Tue, 14 Jul 2026 22:26:42 +0900 [thread overview]
Message-ID: <20260714132642.2225115-4-mark.yang@lge.com> (raw)
In-Reply-To: <20260714132642.2225115-1-mark.yang@lge.com>
From: "mark.yang" <mark.yang@lge.com>
Setting TOOLCHAIN on the kernel recipe alone leaves modules and
make-mod-scripts running make against the shared build tree with gcc;
kbuild spots the CC_VERSION_TEXT mismatch and silently regenerates
the shared .config. Add a KERNEL_TOOLCHAIN switch covering all
kernel-arch recipes so they change toolchain together, gcc by default.
Signed-off-by: mark.yang <mark.yang@lge.com>
---
v2: rebased on the merged clang toolchain support which supersedes
the other v1 patches; dependency changes split out into patch 2
meta/classes-recipe/kernel-arch.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes-recipe/kernel-arch.bbclass b/meta/classes-recipe/kernel-arch.bbclass
index 321c9ed577..5f8dbacc0c 100644
--- a/meta/classes-recipe/kernel-arch.bbclass
+++ b/meta/classes-recipe/kernel-arch.bbclass
@@ -92,4 +92,5 @@ KERNEL_LD:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld'
KERNEL_AR:toolchain-clang = "llvm-ar ${HOST_AR_KERNEL_ARCH}"
KERNEL_OBJCOPY:toolchain-clang = "llvm-objcopy ${HOST_OBJCOPY_KERNEL_ARCH}"
KERNEL_STRIP:toolchain-clang = "llvm-strip"
-TOOLCHAIN = "gcc"
+KERNEL_TOOLCHAIN ?= "gcc"
+TOOLCHAIN = "${KERNEL_TOOLCHAIN}"
prev parent reply other threads:[~2026-07-14 13:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 13:26 [PATCH v2 0/3] kernel: make the kernel toolchain switchable to clang mark.yang
2026-07-14 13:26 ` [PATCH v2 1/3] kernel-arch: fall back to GNU ld unless ld-is-lld is in DISTRO_FEATURES mark.yang
2026-07-14 13:26 ` [PATCH v2 2/3] module.bbclass/make-mod-scripts: inhibit default dependencies mark.yang
2026-07-15 11:34 ` [OE-core] " Mathieu Dubois-Briand
2026-07-15 13:48 ` Mathieu Dubois-Briand
2026-07-16 6:40 ` mark.yang
2026-07-14 13:26 ` mark.yang [this message]
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=20260714132642.2225115-4-mark.yang@lge.com \
--to=mark.yang@lge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox