diff mbox series

[wrynose] kernel-yocto-rust: skip recipe for riscv64 when Rust support is enabled

Message ID 20260811115855.4033577-1-Harish.Sadineni@windriver.com
State New
Headers show
Series [wrynose] kernel-yocto-rust: skip recipe for riscv64 when Rust support is enabled | expand

Commit Message

Harish Sadineni Aug. 11, 2026, 11:58 a.m. UTC
From: Harish Sadineni <Harish.Sadineni@windriver.com>

Kernel Rust support on riscv64 requires building the kernel with Clang.
Since Wrynose does not provide Clang toolchian support for kernel
builds, skip the recipe when TARGET_ARCH is riscv64.

This avoids attempting an unsupported kernel Rust build and provides a
clear parse-time error explaining the limitation.

Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
 meta/classes-recipe/kernel-yocto-rust.bbclass | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/meta/classes-recipe/kernel-yocto-rust.bbclass b/meta/classes-recipe/kernel-yocto-rust.bbclass
index 49f2bfc1ae..6be97c2db8 100644
--- a/meta/classes-recipe/kernel-yocto-rust.bbclass
+++ b/meta/classes-recipe/kernel-yocto-rust.bbclass
@@ -25,3 +25,12 @@  do_kernel_configme:append () {
 # More details in: https://lists.openembedded.org/g/openembedded-core/message/229336
 # Disable ccache for kernel build if kernel rust support is enabled to workaround this.
 CCACHE_DISABLE ?= "1"
+
+python () {
+    if d.getVar('TARGET_ARCH') == 'riscv64' :
+        raise bb.parse.SkipRecipe(
+            "Rust support in the kernel on riscv64 requires kernel to build with clang, "
+            "Wrynose doesn't have clang toolchain support for kernel. See "
+            "https://docs.kernel.org/rust/arch-support.html for details."
+        )
+}