For qemuppc/mips, rustfmt isn't being built so check
that it and related tools exist before copying them.
qemuppc/mips are not well-supported in the Rust world
but will work to get the build to fixed later.

Signed-off-by: Randy MacLeod <randy.macl...@windriver.com>
---
 meta/recipes-devtools/rust/rust_1.63.0.bb | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/rust/rust_1.63.0.bb 
b/meta/recipes-devtools/rust/rust_1.63.0.bb
index 3081cd5ef3..050f398794 100644
--- a/meta/recipes-devtools/rust/rust_1.63.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.63.0.bb
@@ -43,8 +43,10 @@ rust_do_install:class-nativesdk() {
 
     install -d ${D}${bindir}
     for i in cargo-clippy clippy-driver rustfmt; do
-        cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i 
${D}${bindir}
-        chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i
+        if [ -e 
build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ]; then
+            cp 
build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir}
+            chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i
+        fi
     done
 
     chown root:root ${D}/ -R
@@ -60,8 +62,10 @@ rust_do_install:class-target() {
 
     install -d ${D}${bindir}
     for i in cargo-clippy clippy-driver rustfmt; do
-        cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i 
${D}${bindir}
-        chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i
+        if [ -e 
build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ]; then
+            cp 
build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir}
+            chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i
+        fi
     done
 
     chown root:root ${D}/ -R
-- 
2.35.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169646): 
https://lists.openembedded.org/g/openembedded-core/message/169646
Mute This Topic: https://lists.openembedded.org/mt/93137855/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to