diff options
author | Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> | 2025-03-04 22:01:56 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-05 21:26:54 +0000 |
commit | 72e21bef1a6bcc8f05ad4e24cfef4228384f1c3a (patch) | |
tree | 0c7977c65f6bb1d0fec23dc3a39f17214e8bb2a9 /meta/recipes-devtools/rust/files/revert-Zdual-proc-macros-additional-check.patch | |
parent | 64ad67cf6955cdaebbb3aec65318399013e09ce1 (diff) | |
download | poky-72e21bef1a6bcc8f05ad4e24cfef4228384f1c3a.tar.gz |
rust: Upgrade 1.82.0->1.83.0
Rust stable version updated to 1.83.0.
https://blog.rust-lang.org/2024/11/28/Rust-1.83.0.html
Renamed and modified the below patch to adapt the new version.
rv32-cargo-rustix-0.38.34-fix.patch->rv32-cargo-rustix-0.38.37-fix.patch
Modified the below patches to adapt the new version.
repro-issue-fix-with-cc-crate-hashmap.patch
revert-link-std-statically-in-rustc_driver-feature.patch
Dropped: zlib-off64_t.patch
https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3kq
Because of the following commit ,
https://github.com/rust-lang/rust/commit/68034f837a39387e49fc7d7c5b088f5372a1127e
when we enable lib32, getting build failure because there is a check for target
support for "-Zdual-proc-macros" flag not functioning properly when lib32 is
enabled in the build environment. So for now reverting this commit and bring
back the previous behavior, where the "-Zdual-proc-macros" flag is always
added for building proc macros, regardless of the target architecture's support.
This would bypass the check introduced in the patch, allowing the build to
proceed without error, even when building for a 64-bit architecture with lib32 enabled.
(From OE-Core rev: 40d8dafdf556d7ce79c12a6de872193be9a0928a)
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/revert-Zdual-proc-macros-additional-check.patch')
-rw-r--r-- | meta/recipes-devtools/rust/files/revert-Zdual-proc-macros-additional-check.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/files/revert-Zdual-proc-macros-additional-check.patch b/meta/recipes-devtools/rust/files/revert-Zdual-proc-macros-additional-check.patch new file mode 100644 index 0000000000..58e77e4e6e --- /dev/null +++ b/meta/recipes-devtools/rust/files/revert-Zdual-proc-macros-additional-check.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | rust: Fix build failure for v1.83 when lib32 enabled | ||
2 | |||
3 | Because of the following commit , | ||
4 | https://github.com/rust-lang/rust/commit/68034f837a39387e49fc7d7c5b088f5372a1127e | ||
5 | when we enable lib32, getting build failure because there is a check for target | ||
6 | support for "-Zdual-proc-macros" flag not functioning properly when lib32 is | ||
7 | enabled in the build environment. So for now reverting this commit and bring | ||
8 | back the previous behavior, where the "-Zdual-proc-macros" flag is always | ||
9 | added for building proc macros, regardless of the target architecture's support. | ||
10 | This would bypass the check introduced in the patch, allowing the build to | ||
11 | proceed without error, even when building for a 64-bit architecture with lib32 enabled. | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> | ||
16 | diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs | ||
17 | index 9ac0b0a01f..b1374042fb 100644 | ||
18 | --- a/src/bootstrap/src/core/builder.rs | ||
19 | +++ b/src/bootstrap/src/core/builder.rs | ||
20 | @@ -1701,21 +1701,8 @@ impl<'a> Builder<'a> { | ||
21 | // Build proc macros both for the host and the target unless proc-macros are not | ||
22 | // supported by the target. | ||
23 | if target != compiler.host && cmd_kind != Kind::Check { | ||
24 | - let error = command(self.rustc(compiler)) | ||
25 | - .arg("--target") | ||
26 | - .arg(target.rustc_target_arg()) | ||
27 | - .arg("--print=file-names") | ||
28 | - .arg("--crate-type=proc-macro") | ||
29 | - .arg("-") | ||
30 | - .run_capture(self) | ||
31 | - .stderr(); | ||
32 | - let not_supported = error | ||
33 | - .lines() | ||
34 | - .any(|line| line.contains("unsupported crate type `proc-macro`")); | ||
35 | - if !not_supported { | ||
36 | - cargo.arg("-Zdual-proc-macros"); | ||
37 | - rustflags.arg("-Zdual-proc-macros"); | ||
38 | - } | ||
39 | + cargo.arg("-Zdual-proc-macros"); | ||
40 | + rustflags.arg("-Zdual-proc-macros"); | ||
41 | } | ||
42 | } | ||
43 | } | ||