All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Kiernan <alex.kiernan@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Subject: [OE-Core][PATCH 1/2] rust: Install target.json for target rustc
Date: Fri, 16 Dec 2022 12:06:31 +0000	[thread overview]
Message-ID: <20221216120632.5804-1-alex.kiernan@gmail.com> (raw)

As part of the merging builds, installation of target.json was lost
causing `rustc` to fail on startup with:

  error: Error loading target specification: Could not find specification for target "aarch64-poky-linux-gnu". Run `rustc --print target-list` for a list of built-in targets

We know the full target specification, so just install it directly
rather than using the glob approach from previously.

Fixes: b9b0cd99cdc7 ("rust: Enable nativesdk and target builds + replace rust-tools-cross-canadian")
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
 meta/recipes-devtools/rust/rust_1.65.0.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/rust/rust_1.65.0.bb b/meta/recipes-devtools/rust/rust_1.65.0.bb
index dbf74cec8feb..b39f772c5fe1 100644
--- a/meta/recipes-devtools/rust/rust_1.65.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.65.0.bb
@@ -68,6 +68,9 @@ rust_do_install:class-target() {
         chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i
     done
 
+    install -d ${D}${libdir}/rustlib/${RUST_HOST_SYS}
+    install -m 0644 ${WORKDIR}/rust-targets/${RUST_HOST_SYS}.json ${D}${libdir}/rustlib/${RUST_HOST_SYS}/target.json
+
     chown root:root ${D}/ -R
     rm ${D}${libdir}/rustlib/uninstall.sh
     rm ${D}${libdir}/rustlib/install.log
-- 
2.39.0



             reply	other threads:[~2022-12-16 12:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 12:06 Alex Kiernan [this message]
2022-12-16 12:06 ` [OE-Core][PATCH 2/2] rust: update 1.65.0 -> 1.66.0 Alex Kiernan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221216120632.5804-1-alex.kiernan@gmail.com \
    --to=alex.kiernan@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.