summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/rust/files/Zdual-proc-macros-additional-check.patch31
-rw-r--r--meta/recipes-devtools/rust/rust-source.inc1
2 files changed, 32 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 @@
1Fix bootstrap failure when multilibs are enabled.
2
3Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/139d6ba054a1a4cc5fe64981ad46fd5547bd4916]
4
5Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
6---
7diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
8index 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
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index 28f5aebbb4..ee23e5aa8b 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -7,6 +7,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
7 file://oeqa-selftest-Increase-timeout-in-process-sigpipe-ru.patch;patchdir=${RUSTSRC} \ 7 file://oeqa-selftest-Increase-timeout-in-process-sigpipe-ru.patch;patchdir=${RUSTSRC} \
8 file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \ 8 file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \
9 file://revert-link-std-statically-in-rustc_driver-feature.patch;patchdir=${RUSTSRC} \ 9 file://revert-link-std-statically-in-rustc_driver-feature.patch;patchdir=${RUSTSRC} \
10 file://Zdual-proc-macros-additional-check.patch;patchdir=${RUSTSRC} \
10" 11"
11SRC_URI[rust.sha256sum] = "e23ec747a06ffd3e94155046f40b6664ac152c9ee3c2adfd90353a7ccff24226" 12SRC_URI[rust.sha256sum] = "e23ec747a06ffd3e94155046f40b6664ac152c9ee3c2adfd90353a7ccff24226"
12 13