From: Harish Sadineni <[email protected]>

Introduce packagegroup-core-buildessential-rust to provide the
on-target dependencies required for building Rust-based kernel
modules, including the Rust toolchain, bindgen, and libclang.

Set PACKAGE_ARCH to TUNE_PKGARCH instead of the packagegroup
default of "all", since libclang is dynamically renamed per
build (e.g. libclang22.1), which is incompatible with an
allarch packagegroup.

On riscv64, also pull in clang, lld, and llvm-bin, since rust
support in the kernel on riscv64 requires the LLVM/Clang
toolchain rather than gcc.

Signed-off-by: Harish Sadineni <[email protected]>
---
 .../packagegroup-core-buildessential-rust.bb  | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 
meta/recipes-core/packagegroups/packagegroup-core-buildessential-rust.bb

diff --git 
a/meta/recipes-core/packagegroups/packagegroup-core-buildessential-rust.bb 
b/meta/recipes-core/packagegroups/packagegroup-core-buildessential-rust.bb
new file mode 100644
index 0000000000..c1993af9aa
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-buildessential-rust.bb
@@ -0,0 +1,23 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+SUMMARY = "Essential build dependencies for building rust kernel modules in 
image"
+
+PACKAGE_ARCH = "${TUNE_PKGARCH}"
+
+inherit packagegroup
+
+RDEPENDS:${PN} = "\
+    bindgen-cli \
+    libclang \
+    rust \
+    rust-src-lib \
+    rust-tools-rustfmt \
+"
+
+RDEPENDS:${PN}:append:riscv64 = "\
+    clang \
+    lld \
+    llvm-bin \
+"
-- 
2.51.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#241164): 
https://lists.openembedded.org/g/openembedded-core/message/241164
Mute This Topic: https://lists.openembedded.org/mt/120313587/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to