From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: <Harish.Sadineni@windriver.com>,
<openembedded-core@lists.openembedded.org>
Cc: <Sundeep.Kokkonda@windriver.com>, <raj.khem@gmail.com>,
<tgamblin@baylibre.com>
Subject: Re: [OE-core] [PATCH 2/4] kernel-yocto-rust: use clang toolchain for riscv64 when Rust is enabled
Date: Tue, 07 Jul 2026 09:37:13 +0200 [thread overview]
Message-ID: <DJS60V3OTZ8P.1G7BQBL5EUH7G@bootlin.com> (raw)
In-Reply-To: <20260706112905.41381-2-Harish.Sadineni@windriver.com>
On Mon Jul 6, 2026 at 1:29 PM CEST, Harish via lists.openembedded.org Sadineni wrote:
> From: Harish Sadineni <Harish.Sadineni@windriver.com>
>
> Enable LLVM/Clang toolchain for riscv64 kernel builds when Rust support
> is enabled, as Rust is only supported with LLVM toolchains for this
> architecture.
>
> This aligns with upstream kernel Rust architecture requirements as
> documented in:
> https://docs.kernel.org/rust/arch-support.html
>
> Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
> ---
Hi Harish,
Thanks for your patch.
> meta/recipes-kernel/linux/linux-yocto.inc | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
> index 4e230d405a..ee0d5abaeb 100644
> --- a/meta/recipes-kernel/linux/linux-yocto.inc
> +++ b/meta/recipes-kernel/linux/linux-yocto.inc
> @@ -91,3 +91,7 @@ do_devshell:prepend() {
> d.setVar("HOSTPKG_CONFIG", "pkg-config-native")
> d.appendVar("OE_TERMINAL_EXPORTS", " HOSTPKG_CONFIG")
> }
> +
> +# For riscv64, Rust support in kernel only works with LLVM/Clang only.
> +# https://docs.kernel.org/rust/arch-support.html
> +TOOLCHAIN:riscv64 = "${@bb.utils.contains('KERNEL_FEATURES', 'rust', 'clang', '', d)}"
So I believe this is wrong, as you are setting TOOLCHAIN to nothing if
rust is not in KERNEL_FEATURES.
This is failing on the autobuilder with:
Parsing recipes...ERROR: ParseError at /srv/pokybuild/yocto-worker/qemuriscv64/build/layers/openembedded-core/meta/classes-global/base.bbclass:36: Could not inherit file classes/toolchain/.bbclass
ERROR: Parsing halted due to errors, see error messages above
https://autobuilder.yoctoproject.org/valkyrie/#/builders/45/builds/1836
Can you have a look at the issue?
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-07-07 7:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 11:29 [PATCH 1/4] kernel-arch: Add clang toolchain support Harish.Sadineni
2026-07-06 11:29 ` [PATCH 2/4] kernel-yocto-rust: use clang toolchain for riscv64 when Rust is enabled Harish.Sadineni
2026-07-07 7:37 ` Mathieu Dubois-Briand [this message]
2026-07-07 8:35 ` [OE-core] " Harish Sadineni
2026-07-06 11:29 ` [PATCH 3/4] kernel-yocto-rust: Add lld-native to DEPENDS Harish.Sadineni
2026-07-06 11:29 ` [PATCH 4/4] kernel-yocto: Set CLANG_FLAGS for kernel config checks when using clang 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=DJS60V3OTZ8P.1G7BQBL5EUH7G@bootlin.com \
--to=mathieu.dubois-briand@bootlin.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 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.