diff options
| author | Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> | 2025-03-27 02:06:06 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-27 13:41:58 +0000 |
| commit | 28a077b4aa20760ba0354c04af78017df0bd4d68 (patch) | |
| tree | 980d97235b717b9c6517f209673db42551e1fc79 /meta/recipes-devtools/rust/files | |
| parent | 6d78fbe5c5945701b6bd30101da5ce16164f4e6b (diff) | |
| download | poky-28a077b4aa20760ba0354c04af78017df0bd4d68.tar.gz | |
rust: Fix build failure when multilibs are enabled
When multilibs are enabled, building rust is failing because of the following commit
https://github.com/rust-lang/rust/commit/68034f837a39387e49fc7d7c5b088f5372a1127e
with 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 [https://github.com/rust-lang/rust/commit/139d6ba054a1a4cc5fe64981ad46fd5547bd4916]
(From OE-Core rev: ab29b970ba7e08eabca92018d103af5f249ed2c5)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/files')
| -rw-r--r-- | meta/recipes-devtools/rust/files/Zdual-proc-macros-additional-check.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/files/Zdual-proc-macros-additional-check.patch b/meta/recipes-devtools/rust/files/Zdual-proc-macros-additional-check.patch new file mode 100644 index 0000000000..6bb1738d05 --- /dev/null +++ b/meta/recipes-devtools/rust/files/Zdual-proc-macros-additional-check.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | Fix bootstrap failure when multilibs are enabled. | ||
| 2 | |||
| 3 | Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/139d6ba054a1a4cc5fe64981ad46fd5547bd4916] | ||
| 4 | |||
| 5 | Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> | ||
| 6 | --- | ||
| 7 | diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs | ||
| 8 | index 066e6bf53f..a2f6fac4b1 100644 | ||
| 9 | --- a/src/bootstrap/src/core/builder/cargo.rs | ||
| 10 | +++ b/src/bootstrap/src/core/builder/cargo.rs | ||
| 11 | @@ -646,7 +646,10 @@ impl Builder<'_> { | ||
| 12 | // Build proc macros both for the host and the target unless proc-macros are not | ||
| 13 | // supported by the target. | ||
| 14 | if target != compiler.host && cmd_kind != Kind::Check { | ||
| 15 | - let error = command(self.rustc(compiler)) | ||
| 16 | + let mut rustc_cmd = command(self.rustc(compiler)); | ||
| 17 | + self.add_rustc_lib_path(compiler, &mut rustc_cmd); | ||
| 18 | + | ||
| 19 | + let error = rustc_cmd | ||
| 20 | .arg("--target") | ||
| 21 | .arg(target.rustc_target_arg()) | ||
| 22 | .arg("--print=file-names") | ||
| 23 | @@ -654,6 +657,7 @@ impl Builder<'_> { | ||
| 24 | .arg("-") | ||
| 25 | .run_capture(self) | ||
| 26 | .stderr(); | ||
| 27 | + | ||
| 28 | let not_supported = error | ||
| 29 | .lines() | ||
| 30 | .any(|line| line.contains("unsupported crate type `proc-macro`")); | ||
| 31 | |||
