summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorYash Shinde <Yash.Shinde@windriver.com>2024-01-25 05:16:00 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-26 14:06:55 +0000
commitac7375e02f63b89fcfd8581bae29f4022c4e9668 (patch)
tree118a258fb99e1a50d721be45e083b10495212762 /meta/recipes-devtools
parent208b3bee789337f4ca90e693fbc2b53ba036662a (diff)
downloadpoky-ac7375e02f63b89fcfd8581bae29f4022c4e9668.tar.gz
rust: Fix assertion failure error on oe-selftest
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. (From OE-Core rev: b8c1091276b6b9b1ae162dd19b2652f493a686d8) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/rust/files/target-build-value.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/files/target-build-value.patch b/meta/recipes-devtools/rust/files/target-build-value.patch
new file mode 100644
index 0000000000..23e8c76801
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/target-build-value.patch
@@ -0,0 +1,26 @@
1Add correct build value for cross-compiled targets on stage1 when
2bootstapping rustc.
3
4Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/119619/commits/b888e2f82b9dbe81875f50d13adbc0271a9401ff]
5
6Signed-off-by: onur-ozkan <work@onurozkan.dev>
7Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
8---
9diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
10--- a/src/bootstrap/test.rs
11+++ b/src/bootstrap/test.rs
12@@ -1489,8 +1489,12 @@
13 // NOTE: Only stage 1 is special cased because we need the rustc_private artifacts to match the
14 // running compiler in stage 2 when plugins run.
15 let stage_id = if suite == "ui-fulldeps" && compiler.stage == 1 {
16- compiler = builder.compiler(compiler.stage - 1, target);
17- format!("stage{}-{}", compiler.stage + 1, target)
18+ // At stage 0 (stage - 1) we are using the beta compiler. Using `self.target` can lead finding
19+ // an incorrect compiler path on cross-targets, as the stage 0 beta compiler is always equal
20+ // to `build.build` in the configuration.
21+ let build = builder.build.build;
22+ compiler = builder.compiler(compiler.stage - 1, build);
23+ format!("stage{}-{}", compiler.stage + 1, build)
24 } else {
25 format!("stage{}-{}", compiler.stage, target)
26 };