]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
packagegroup-rust-cross-canadian: add native compiler environment
authorPeter Bergin <peter@berginkonsult.se>
Tue, 23 Aug 2022 08:56:35 +0000 (10:56 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Sep 2022 07:51:32 +0000 (08:51 +0100)
When building rust crates it is quite common to have a build script [1]
that is compiled for the host machine and then used during build for target.
Currently when adding packagegroup-rust-cross-canadian this does not work
without having the native compiler and linker added to the SDK.
Add those packages to the packagegroup to make it easier to handle.

The reason for having glibc-dev and libgcc-dev is to have version match
with the used tools. Otherwise it will work on hosts that have compatible
gcc and glibc versions but not on all.

[1] https://doc.rust-lang.org/cargo/reference/build-scripts.html

Signed-off-by: Peter Bergin <peter@berginkonsult.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/packagegroups/packagegroup-rust-cross-canadian.bb

index 42f85f0eb3863c8ca05e6f8005132418719d1116..bb10a2d34f26a0af1eb96103fb4b946f3500f7e5 100644 (file)
@@ -9,6 +9,10 @@ RUST="rust-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
 RDEPENDS:${PN} = " \
     ${@all_multilib_tune_values(d, 'RUST')} \
+    nativesdk-binutils \
+    nativesdk-gcc \
+    nativesdk-glibc-dev \
+    nativesdk-libgcc-dev \
     nativesdk-rust \
     nativesdk-cargo \
     nativesdk-rust-tools-clippy \