From: Harish Sadineni <[email protected]> Kernel Rust support on riscv64 requires Clang. Wrynose doesn't provide a Clang toolchain for kernel builds, but downstream layers may add this support via a linux-yocto_%.bbappend. Rather than unconditionally skipping riscv64, check whether a Clang toolchain is available and only error out with a clear message when it isn't, so that users with Clang-enabled downstream configurations aren't broken.
Signed-off-by: Harish Sadineni <[email protected]> --- meta/classes-recipe/kernel-yocto-rust.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meta/classes-recipe/kernel-yocto-rust.bbclass b/meta/classes-recipe/kernel-yocto-rust.bbclass index 49f2bfc1ae..be85002903 100644 --- a/meta/classes-recipe/kernel-yocto-rust.bbclass +++ b/meta/classes-recipe/kernel-yocto-rust.bbclass @@ -25,3 +25,13 @@ 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' and d.getVar('TOOLCHAIN') != 'clang': + raise bb.parse.SkipRecipe( + "Rust support in the kernel on riscv64 requires kernel to be build with clang " + "toolchain, but the kernel is built with toolchian '%s'. See " + "https://docs.kernel.org/rust/arch-support.html for details." + % d.getVar('TOOLCHAIN') + ) +} -- 2.53.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#245626): https://lists.openembedded.org/g/openembedded-core/message/245626 Mute This Topic: https://lists.openembedded.org/mt/121195575/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
