From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: openembedded-core@lists.openembedded.org, Harish.Sadineni@windriver.com
Cc: Sundeep.Kokkonda@windriver.com, raj.khem@gmail.com,
tgamblin@baylibre.com
Subject: Re: [OE-core] [PATCH v2 1/4] kernel-arch: Add clang toolchain support
Date: Tue, 07 Jul 2026 19:19:21 -0700 (PDT) [thread overview]
Message-ID: <6a4db3a9.bb1272e9.250696.19ba@mx.google.com> (raw)
In-Reply-To: <20260707085552.981820-1-Harish.Sadineni@windriver.com>
On Mon, Jul 7, 2026, Harish Sadineni wrote:
> Convert the existing GCC tool definitions to use the `:toolchain-gcc`
> override so they only apply when `TOOLCHAIN = "gcc"` (the default).
I went through the series with a focus on making sure it's a no-op for the
common gcc / non-riscv64 kernel build, and it checks out:
- toolchain-gcc lands in OVERRIDES for a default build (base.bbclass does
inherit_defer toolchain/${TOOLCHAIN}, gcc.bbclass sets
TCOVERRIDE = "toolchain-gcc", and OVERRIDES carries ${TCOVERRIDE}), so
KERNEL_CC:toolchain-gcc et al resolve to exactly what the unconditional
assignments produced before.
- The KERNEL_CC:append:{aarch64,nios2,arc} appends in linux-yocto.inc still
stack correctly on top of the :toolchain-gcc value, so the arch-specific
TOOLCHAIN_OPTIONS aren't lost.
- Patches 2-4 are gated to riscv64 and/or the rust KERNEL_FEATURE
(kernel-yocto-rust.bbclass is only inherited when 'rust' is set), so
they're inert everywhere else.
For the whole series:
Acked-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Two things worth noting, neither blocking:
- One behavioural subtlety from this conversion: a KERNEL_CC:toolchain-gcc
assignment now outranks any *unconditional* KERNEL_CC = "..." a downstream
BSP might set, where previously it was a plain last-assignment-wins. No
in-tree machine/recipe does that today, so there's no regression, but it's
a change in precedence worth being aware of if a BSP overrides these.
- In patch 4, `if 'clang' in toolchain:` will throw if TOOLCHAIN is ever
unset (getVar returns None). It's always set for kernel recipes today so
it's fine, but `d.getVar('TOOLCHAIN') or ''` would be a touch more robust.
Bruce
next prev parent reply other threads:[~2026-07-08 2:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 8:55 [PATCH v2 1/4] kernel-arch: Add clang toolchain support Harish.Sadineni
2026-07-07 8:55 ` [PATCH v2 2/4] kernel-yocto-rust: use clang toolchain for riscv64 when Rust is enabled Harish.Sadineni
2026-07-07 8:55 ` [PATCH v2 3/4] kernel-yocto-rust: Add lld-native to DEPENDS Harish.Sadineni
2026-07-07 8:55 ` [PATCH v2 4/4] kernel-yocto: Set CLANG_FLAGS for kernel config checks when using clang Harish.Sadineni
2026-07-08 2:19 ` Bruce Ashfield [this message]
2026-07-08 15:25 ` [OE-core] [PATCH v2 1/4] kernel-arch: Add clang toolchain support Harish Sadineni
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=6a4db3a9.bb1272e9.250696.19ba@mx.google.com \
--to=bruce.ashfield@gmail.com \
--cc=Harish.Sadineni@windriver.com \
--cc=Sundeep.Kokkonda@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
--cc=tgamblin@baylibre.com \
/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