From: mark.yang@lge.com
To: openembedded-core@lists.openembedded.org
Cc: "mark.yang" <mark.yang@lge.com>
Subject: [OE-core][PATCH 2/3] kernel-yocto: export CLANG_FLAGS for the kconfiglib config audit
Date: Wed, 8 Jul 2026 11:28:55 +0900 [thread overview]
Message-ID: <20260708022856.2087339-3-mark.yang@lge.com> (raw)
In-Reply-To: <20260708022856.2087339-1-mark.yang@lge.com>
From: "mark.yang" <mark.yang@lge.com>
do_kernel_configcheck evaluates Kconfig with kconfiglib instead of
kbuild make, so scripts/Makefile.clang never sets CLANG_FLAGS and the
compiler checks in scripts/Kconfig.include pick it up from the
environment. With TOOLCHAIN = "clang" the audit fails:
Sorry, this assembler is not supported.
as-version.sh needs -fintegrated-as in the arguments to recognize the
integrated assembler. Export the flags kbuild would use, with gcc this
expands to nothing.
Signed-off-by: mark.yang <mark.yang@lge.com>
---
meta/classes-recipe/kernel-yocto.bbclass | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta/classes-recipe/kernel-yocto.bbclass b/meta/classes-recipe/kernel-yocto.bbclass
index e7fdeb5d4b..46ccc69e75 100644
--- a/meta/classes-recipe/kernel-yocto.bbclass
+++ b/meta/classes-recipe/kernel-yocto.bbclass
@@ -578,6 +578,13 @@ python do_config_analysis() {
bb.warn( analysis )
}
+# The kconfiglib audit evaluates Kconfig's compiler checks outside kbuild make,
+# where scripts/Makefile.clang would normally set CLANG_FLAGS, so provide it
+# via the environment.
+CLANG_FLAGS ?= ""
+CLANG_FLAGS:toolchain-clang = "--target=${HOST_SYS} -fintegrated-as"
+export CLANG_FLAGS
+
python do_kernel_configcheck() {
import re, string, sys, subprocess
next prev parent reply other threads:[~2026-07-08 2:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 2:28 [OE-core][PATCH 0/3] kernel: make the kernel toolchain switchable to clang mark.yang
2026-07-08 2:28 ` [OE-core][PATCH 1/3] module.bbclass/make-mod-scripts: inhibit default dependencies mark.yang
2026-07-08 2:28 ` mark.yang [this message]
2026-07-08 2:28 ` [OE-core][PATCH 3/3] kernel-arch: add KERNEL_TOOLCHAIN for building the kernel with clang mark.yang
2026-07-08 2:37 ` [OE-core][PATCH 0/3] kernel: make the kernel toolchain switchable to clang Bruce Ashfield
2026-07-08 2:44 ` [PATCH " mark.yang
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=20260708022856.2087339-3-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 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.