($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Jose Quaresma <quaresma.jose@gmail.com>
To: yocto@lists.yoctoproject.org, scott.murray@konsulko.com
Cc: Yash Shinde <Yash.Shinde@windriver.com>,
	Richard Purdie <richard.purdie@linuxfoundation.org>,
	Jose Quaresma <jose.quaresma@foundries.io>
Subject: [meta-lts-mixins][kirkstone/rust][PATCH 04/11] rust: Fix assertion failure error on oe-selftest
Date: Mon, 11 Mar 2024 16:24:03 +0000	[thread overview]
Message-ID: <20240311162419.1138625-4-jose.quaresma@foundries.io> (raw)
In-Reply-To: <20240311162419.1138625-1-jose.quaresma@foundries.io>

From: Yash Shinde <Yash.Shinde@windriver.com>

Fixes: thread 'main' panicked at 'assertion failed: `(left == right)`
       left: `x86_64-unknown-linux-gnu`,
       right: `x86_64-poky-linux-gnu`: Cannot obtain compiler for non-native build triple at stage 0', compile.rs:1474:13

Add correct target value for cross-compiled targets on stage1 during rust oe-selfest.

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
 .../rust/files/target-build-value.patch       | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 recipes-devtools/rust/files/target-build-value.patch

diff --git a/recipes-devtools/rust/files/target-build-value.patch b/recipes-devtools/rust/files/target-build-value.patch
new file mode 100644
index 0000000..23e8c76
--- /dev/null
+++ b/recipes-devtools/rust/files/target-build-value.patch
@@ -0,0 +1,26 @@
+Add correct build value for cross-compiled targets on stage1 when
+bootstapping rustc.
+
+Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/119619/commits/b888e2f82b9dbe81875f50d13adbc0271a9401ff]
+
+Signed-off-by: onur-ozkan <work@onurozkan.dev>
+Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
+---
+diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
+--- a/src/bootstrap/test.rs
++++ b/src/bootstrap/test.rs
+@@ -1489,8 +1489,12 @@
+         // NOTE: Only stage 1 is special cased because we need the rustc_private artifacts to match the
+         // running compiler in stage 2 when plugins run.
+         let stage_id = if suite == "ui-fulldeps" && compiler.stage == 1 {
+-            compiler = builder.compiler(compiler.stage - 1, target);
+-            format!("stage{}-{}", compiler.stage + 1, target)
++            // At stage 0 (stage - 1) we are using the beta compiler. Using `self.target` can lead finding
++            // an incorrect compiler path on cross-targets, as the stage 0 beta compiler is always equal
++            // to `build.build` in the configuration.
++            let build = builder.build.build;
++            compiler = builder.compiler(compiler.stage - 1, build);
++            format!("stage{}-{}", compiler.stage + 1, build)
+         } else {
+             format!("stage{}-{}", compiler.stage, target)
+         };
-- 
2.44.0



  parent reply	other threads:[~2024-03-11 16:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 16:24 [meta-lts-mixins][kirkstone/rust][PATCH 01/11] rust: Fetch cargo from rust-snapshot dir Jose Quaresma
2024-03-11 16:24 ` [meta-lts-mixins][kirkstone/rust][PATCH 02/11] rust: detect user-specified custom targets in compiletest Jose Quaresma
2024-03-11 16:24 ` [meta-lts-mixins][kirkstone/rust][PATCH 03/11] rust: Enable RUSTC_BOOTSTRAP to use nightly features during rust oe-selftest Jose Quaresma
2024-03-11 16:24 ` Jose Quaresma [this message]
2024-03-11 16:24 ` [meta-lts-mixins][kirkstone/rust][PATCH 05/11] rust: Enable " Jose Quaresma
2024-03-11 16:24 ` [meta-lts-mixins][kirkstone/rust][PATCH 06/11] rust: Re-write RPATHs in the copies llvm-config Jose Quaresma
2024-03-11 16:24 ` [meta-lts-mixins][kirkstone/rust][PATCH 07/11] rust/cargo: Build fixes to rust for rv32 target Jose Quaresma
2024-03-11 16:24 ` [meta-lts-mixins][kirkstone/rust][PATCH 08/11] rust: Upgrade 1.74.1 -> 1.75.0 Jose Quaresma
2024-03-11 16:24 ` [meta-lts-mixins][kirkstone/rust][PATCH 09/11] rust: Revert PGO to it's default Jose Quaresma
2024-03-11 16:24 ` [meta-lts-mixins][kirkstone/rust][PATCH 10/11] rust: reproducibility issue fix with v1.75 Jose Quaresma
     [not found]   ` <bfbd5a23-720d-410b-a359-56c1822a0cf6@windriver.com>
2024-03-12 12:46     ` Jose Quaresma
2024-03-12 20:34       ` Scott Murray
2024-03-18  0:10         ` Scott Murray
2024-03-18 10:03           ` Jose Quaresma
2024-03-11 16:24 ` [meta-lts-mixins][kirkstone/rust][PATCH 11/11] rust: Fix build failure re-appeared on riscv32 Jose Quaresma

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=20240311162419.1138625-4-jose.quaresma@foundries.io \
    --to=quaresma.jose@gmail.com \
    --cc=Yash.Shinde@windriver.com \
    --cc=jose.quaresma@foundries.io \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=scott.murray@konsulko.com \
    --cc=yocto@lists.yoctoproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).