mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
rust: Fix build failure when multilibs are enabled
When multilibs are enabled, building rust is failing because of the following commit68034f837awith stage1/rustc cannot able to find dependent *.so files. The issue is been fixed inrust-master with the following commit by passing the necessary library paths before executing stage1/rustc Upstream-Status: Backport [139d6ba054] (From OE-Core rev: ab29b970ba7e08eabca92018d103af5f249ed2c5) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
6d78fbe5c5
commit
28a077b4aa
@@ -0,0 +1,31 @@
|
||||
Fix bootstrap failure when multilibs are enabled.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/139d6ba054a1a4cc5fe64981ad46fd5547bd4916]
|
||||
|
||||
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
|
||||
---
|
||||
diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
|
||||
index 066e6bf53f..a2f6fac4b1 100644
|
||||
--- a/src/bootstrap/src/core/builder/cargo.rs
|
||||
+++ b/src/bootstrap/src/core/builder/cargo.rs
|
||||
@@ -646,7 +646,10 @@ impl Builder<'_> {
|
||||
// Build proc macros both for the host and the target unless proc-macros are not
|
||||
// supported by the target.
|
||||
if target != compiler.host && cmd_kind != Kind::Check {
|
||||
- let error = command(self.rustc(compiler))
|
||||
+ let mut rustc_cmd = command(self.rustc(compiler));
|
||||
+ self.add_rustc_lib_path(compiler, &mut rustc_cmd);
|
||||
+
|
||||
+ let error = rustc_cmd
|
||||
.arg("--target")
|
||||
.arg(target.rustc_target_arg())
|
||||
.arg("--print=file-names")
|
||||
@@ -654,6 +657,7 @@ impl Builder<'_> {
|
||||
.arg("-")
|
||||
.run_capture(self)
|
||||
.stderr();
|
||||
+
|
||||
let not_supported = error
|
||||
.lines()
|
||||
.any(|line| line.contains("unsupported crate type `proc-macro`"));
|
||||
|
||||
Reference in New Issue
Block a user