rust: Upgrade 1.83.0->1.84.1

Rust stable version updated to 1.84.1.
https://blog.rust-lang.org/2025/01/30/Rust-1.84.1.html

Renamed and modified the below patch to adapt the new version.
rv32-cargo-rustix-0.38.37-fix.patch->rv32-cargo-rustix-0.38.38-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 the below patches :
0001-NFC-fix-build-failure-100993.patch
6ee49080e4

revert-Zdual-proc-macros-additional-check.patch
Issue is fixed in rust-master and the fix is backported in the
subsequent patch of the series.

(From OE-Core rev: 4265f668de8c6708cb3a003ad655559031724149)

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Deepesh Varatharajan 2025-03-27 02:06:05 -07:00 committed by Richard Purdie
parent 824f05fe73
commit 6d78fbe5c5
14 changed files with 298 additions and 291 deletions

View File

@ -12,7 +12,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
GCCVERSION ?= "14.%"
SDKGCCVERSION ?= "${GCCVERSION}"
GLIBCVERSION ?= "2.41%"
RUSTVERSION ?= "1.83%"
RUSTVERSION ?= "1.84.1%"
PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"

View File

@ -1,4 +1,4 @@
rust: reproducibility issue fix with v1.83
rust: reproducibility issue fix with v1.84
A few crates are using the updated version of the 'cc' crate and this is causing the generated object file names containing a unique hashmap id.
By the following changes same hash values will be genarted even for diffrent build paths.
@ -67,49 +67,6 @@ index 07dfb80412..e01b62fa39 100644
})?
.to_string_lossy();
+ // Function to find the position of the first occurrence of the target substring
+ fn find_target_position(s: &str, targets: &[&str]) -> Option<usize> {
+ let mut pos = None;
+ for target in targets {
+ if let Some(index) = s.rfind(target) {
+ //If a target is found and pos is None, set it
+ if pos.is_none() || index < pos.unwrap() {
+ pos = Some(index);
+ }
+ }
+ }
+ pos
+ }
+
+ let filtered_dirname = if let Some(pos) = find_target_position(&dirname, &target_substring) {
+ dirname[pos..].to_string() //Keep everything from the target substring onwards
+ } else {
+ dirname.to_string() //If target substring is not found, keep the original dirname
+ };
// Hash the dirname. This should prevent conflicts if we have multiple
// object files with the same filename in different subfolders.
let mut hasher = hash_map::DefaultHasher::new();
- hasher.write(dirname.to_string().as_bytes());
+ hasher.write(filtered_dirname.as_bytes());
let obj = dst
.join(format!("{:016x}-{}", hasher.finish(), basename))
.with_extension("o");
diff --git a/vendor/cc-1.1.23/src/command_helpers.rs b/vendor/cc-1.1.23/src/command_helpers.rs
index 07dfb80412..e01b62fa39 100644
--- a/vendor/cc-1.1.23/src/command_helpers.rs
+++ b/vendor/cc-1.1.23/src/command_helpers.rs
@@ -285,6 +285,7 @@ fn wait_on_child(
/// and store them in the output Object.
pub(crate) fn objects_from_files(files: &[Arc<Path>], dst: &Path) -> Result<Vec<Object>, Error> {
let mut objects = Vec::with_capacity(files.len());
+ let target_substring = ["rustc"];
for file in files {
let basename = file
.file_name()
@@ -305,10 +306,29 @@ pub(crate) fn objects_from_files(files: &[Arc<Path>], dst: &Path) -> Result<Vec<
})?
.to_string_lossy();
+ // Function to find the position of the first occurrence of the target substring
+ fn find_target_position(s: &str, targets: &[&str]) -> Option<usize> {
+ let mut pos = None;
@ -153,11 +110,3 @@ index 8c7be07836..473b5ad39c 100644
-{"files":{"CHANGELOG.md":"92aeb6dec3e4b55e3951a4d00f6df20edc51545afca124d983454f7c05e37357","Cargo.toml":"1352b0476c28b89568e740579130ab017ad0f4b546083cf03ff61827d45361f3","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"f1ddbede208a5b78333a25dac0a7598e678e9b601a7d99a791069bddaf180dfe","clippy.toml":"aa7850db4350883c8f373bd0d6b4d19bf3b75f13c1c238e24368c109cb52fb1d","src/command_helpers.rs":"0b54800fe5c89cd102a5f872fe1a843c1a58e026bc4bbc611e207914b8c84dda","src/detect_compiler_family.c":"97ca4b021495611e828becea6187add37414186a16dfedd26c2947cbce6e8b2f","src/lib.rs":"c80c94e82937980f711500cd3289842ab4bc42bcc4efd9febf64729e27410ecc","src/parallel/async_executor.rs":"4ce24435fff6b6555b43fee042c16bd65d4150d0346567f246b9190d85b45983","src/parallel/job_token.rs":"f4ed0a03d89a42bfd5527133d12b267af519b745f3f2b997ed293df15a2641b8","src/parallel/mod.rs":"55fb4c2d15e66677b2ed5ffa6d65ea161bcf1a1e1dc7910ee3bde06f2f67ab14","src/parallel/once_lock.rs":"d13e4cb82d6bca3297ca8671d83a40dd5affd7ac89191d733dd451867181bb02","src/parallel/stderr.rs":"74384d41198740a6fce0877f144262db09fb091225fa8fbfa771314bb11487c6","src/target_info.rs":"f939a570c99d897fdd37cd491a4ee0657e2c7480ec71acbd9cbee48732d4bfbc","src/tempfile.rs":"ebafb5b0e5d08b0706916ed911d4245240e60c3e2d0c9a1630c520842988a2b3","src/tool.rs":"2e6550062e021f2b394388172bbb01e86fe6a94d2395bcb3c85a9e86690da1a9","src/utilities.rs":"a13bb0a351fcef72823485b1b5dc4f514c533fa4feac95deb66ed9e5fbfe7b53","src/windows/com.rs":"a2800ddb81215fff2bf618336f5c4ff8e8bdb746dd18b795873c7304b3f2a5e3","src/windows/find_tools.rs":"dd6b2450909cd8334a2aa2ce856bcc72a9654d92422267d6345d5fabfcbf57c5","src/windows/mod.rs":"34cfa201cfbcac7ccaa3ea5295d3e4200439af3cc5c6433baf81502596040a89","src/windows/registry.rs":"c521b72c825e8095843e73482ffa810ed066ad8bb9f86e6db0c5c143c171aba1","src/windows/setup_config.rs":"754439cbab492afd44c9755abcbec1a41c9b2c358131cee2df13c0e996dbbec8","src/windows/vs_instances.rs":"946527cf8fd32c3472f6a2884dcdec290763101097334c7478f9c24c3950db6b","src/windows/winapi.rs":"250d51c1826d1a2329e9889dd9f058cfce253dbf2a678b076147c6cdb5db046c","src/windows/windows_sys.rs":"e2714c8307bfa083b9745eb0e46cadd7f98d7b88abf45a7637172019324e34b8","src/windows/windows_targets.rs":"5b4648ebc22b028caca9f4b4bf8881fe2d094b7bec217264ba2e6e2c49d1ccee"},"package":"9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0"}
\ No newline at end of file
+{"files":{"CHANGELOG.md":"92aeb6dec3e4b55e3951a4d00f6df20edc51545afca124d983454f7c05e37357","Cargo.toml":"1352b0476c28b89568e740579130ab017ad0f4b546083cf03ff61827d45361f3","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"f1ddbede208a5b78333a25dac0a7598e678e9b601a7d99a791069bddaf180dfe","clippy.toml":"aa7850db4350883c8f373bd0d6b4d19bf3b75f13c1c238e24368c109cb52fb1d","src/command_helpers.rs":"a2ee7ae686b9cb186bebfdd597438251536bcaa9815699c95eab349385b4b949","src/detect_compiler_family.c":"97ca4b021495611e828becea6187add37414186a16dfedd26c2947cbce6e8b2f","src/lib.rs":"c80c94e82937980f711500cd3289842ab4bc42bcc4efd9febf64729e27410ecc","src/parallel/async_executor.rs":"4ce24435fff6b6555b43fee042c16bd65d4150d0346567f246b9190d85b45983","src/parallel/job_token.rs":"f4ed0a03d89a42bfd5527133d12b267af519b745f3f2b997ed293df15a2641b8","src/parallel/mod.rs":"55fb4c2d15e66677b2ed5ffa6d65ea161bcf1a1e1dc7910ee3bde06f2f67ab14","src/parallel/once_lock.rs":"d13e4cb82d6bca3297ca8671d83a40dd5affd7ac89191d733dd451867181bb02","src/parallel/stderr.rs":"74384d41198740a6fce0877f144262db09fb091225fa8fbfa771314bb11487c6","src/target_info.rs":"f939a570c99d897fdd37cd491a4ee0657e2c7480ec71acbd9cbee48732d4bfbc","src/tempfile.rs":"ebafb5b0e5d08b0706916ed911d4245240e60c3e2d0c9a1630c520842988a2b3","src/tool.rs":"2e6550062e021f2b394388172bbb01e86fe6a94d2395bcb3c85a9e86690da1a9","src/utilities.rs":"a13bb0a351fcef72823485b1b5dc4f514c533fa4feac95deb66ed9e5fbfe7b53","src/windows/com.rs":"a2800ddb81215fff2bf618336f5c4ff8e8bdb746dd18b795873c7304b3f2a5e3","src/windows/find_tools.rs":"dd6b2450909cd8334a2aa2ce856bcc72a9654d92422267d6345d5fabfcbf57c5","src/windows/mod.rs":"34cfa201cfbcac7ccaa3ea5295d3e4200439af3cc5c6433baf81502596040a89","src/windows/registry.rs":"c521b72c825e8095843e73482ffa810ed066ad8bb9f86e6db0c5c143c171aba1","src/windows/setup_config.rs":"754439cbab492afd44c9755abcbec1a41c9b2c358131cee2df13c0e996dbbec8","src/windows/vs_instances.rs":"946527cf8fd32c3472f6a2884dcdec290763101097334c7478f9c24c3950db6b","src/windows/winapi.rs":"250d51c1826d1a2329e9889dd9f058cfce253dbf2a678b076147c6cdb5db046c","src/windows/windows_sys.rs":"e2714c8307bfa083b9745eb0e46cadd7f98d7b88abf45a7637172019324e34b8","src/windows/windows_targets.rs":"5b4648ebc22b028caca9f4b4bf8881fe2d094b7bec217264ba2e6e2c49d1ccee"},"package":"9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0"}
diff --git a/vendor/cc-1.1.23/.cargo-checksum.json b/vendor/cc-1.1.23/.cargo-checksum.json
index d834145136..a10eecf785 100644
--- a/vendor/cc-1.1.23/.cargo-checksum.json
+++ b/vendor/cc-1.1.23/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"c0125e3e52f1af277dd92935d84992fcff829ecd11a4bad6ac75bced3c68623b","Cargo.toml":"1b08a0bb920345c02a78f49be0a091ac426dbfe1bfa4b853da0c177acda36582","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"f1ddbede208a5b78333a25dac0a7598e678e9b601a7d99a791069bddaf180dfe","clippy.toml":"aa7850db4350883c8f373bd0d6b4d19bf3b75f13c1c238e24368c109cb52fb1d","src/command_helpers.rs":"0b54800fe5c89cd102a5f872fe1a843c1a58e026bc4bbc611e207914b8c84dda","src/detect_compiler_family.c":"97ca4b021495611e828becea6187add37414186a16dfedd26c2947cbce6e8b2f","src/lib.rs":"41f2bc5d9c29a842688dfdbea60241d0efa49229d1cf65406225782f54866d19","src/parallel/async_executor.rs":"4ce24435fff6b6555b43fee042c16bd65d4150d0346567f246b9190d85b45983","src/parallel/job_token.rs":"f4ed0a03d89a42bfd5527133d12b267af519b745f3f2b997ed293df15a2641b8","src/parallel/mod.rs":"55fb4c2d15e66677b2ed5ffa6d65ea161bcf1a1e1dc7910ee3bde06f2f67ab14","src/parallel/once_lock.rs":"d13e4cb82d6bca3297ca8671d83a40dd5affd7ac89191d733dd451867181bb02","src/parallel/stderr.rs":"74384d41198740a6fce0877f144262db09fb091225fa8fbfa771314bb11487c6","src/target_info.rs":"f939a570c99d897fdd37cd491a4ee0657e2c7480ec71acbd9cbee48732d4bfbc","src/tempfile.rs":"ebafb5b0e5d08b0706916ed911d4245240e60c3e2d0c9a1630c520842988a2b3","src/tool.rs":"2e6550062e021f2b394388172bbb01e86fe6a94d2395bcb3c85a9e86690da1a9","src/utilities.rs":"a13bb0a351fcef72823485b1b5dc4f514c533fa4feac95deb66ed9e5fbfe7b53","src/windows/com.rs":"a2800ddb81215fff2bf618336f5c4ff8e8bdb746dd18b795873c7304b3f2a5e3","src/windows/find_tools.rs":"dd6b2450909cd8334a2aa2ce856bcc72a9654d92422267d6345d5fabfcbf57c5","src/windows/mod.rs":"34cfa201cfbcac7ccaa3ea5295d3e4200439af3cc5c6433baf81502596040a89","src/windows/registry.rs":"c521b72c825e8095843e73482ffa810ed066ad8bb9f86e6db0c5c143c171aba1","src/windows/setup_config.rs":"754439cbab492afd44c9755abcbec1a41c9b2c358131cee2df13c0e996dbbec8","src/windows/vs_instances.rs":"946527cf8fd32c3472f6a2884dcdec290763101097334c7478f9c24c3950db6b","src/windows/winapi.rs":"250d51c1826d1a2329e9889dd9f058cfce253dbf2a678b076147c6cdb5db046c","src/windows/windows_sys.rs":"e2714c8307bfa083b9745eb0e46cadd7f98d7b88abf45a7637172019324e34b8","src/windows/windows_targets.rs":"5b4648ebc22b028caca9f4b4bf8881fe2d094b7bec217264ba2e6e2c49d1ccee"},"package":"3bbb537bb4a30b90362caddba8f360c0a56bc13d3a5570028e7197204cb54a17"}
\ No newline at end of file
+{"files":{"CHANGELOG.md":"c0125e3e52f1af277dd92935d84992fcff829ecd11a4bad6ac75bced3c68623b","Cargo.toml":"1b08a0bb920345c02a78f49be0a091ac426dbfe1bfa4b853da0c177acda36582","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"f1ddbede208a5b78333a25dac0a7598e678e9b601a7d99a791069bddaf180dfe","clippy.toml":"aa7850db4350883c8f373bd0d6b4d19bf3b75f13c1c238e24368c109cb52fb1d","src/command_helpers.rs":"a2ee7ae686b9cb186bebfdd597438251536bcaa9815699c95eab349385b4b949","src/detect_compiler_family.c":"97ca4b021495611e828becea6187add37414186a16dfedd26c2947cbce6e8b2f","src/lib.rs":"41f2bc5d9c29a842688dfdbea60241d0efa49229d1cf65406225782f54866d19","src/parallel/async_executor.rs":"4ce24435fff6b6555b43fee042c16bd65d4150d0346567f246b9190d85b45983","src/parallel/job_token.rs":"f4ed0a03d89a42bfd5527133d12b267af519b745f3f2b997ed293df15a2641b8","src/parallel/mod.rs":"55fb4c2d15e66677b2ed5ffa6d65ea161bcf1a1e1dc7910ee3bde06f2f67ab14","src/parallel/once_lock.rs":"d13e4cb82d6bca3297ca8671d83a40dd5affd7ac89191d733dd451867181bb02","src/parallel/stderr.rs":"74384d41198740a6fce0877f144262db09fb091225fa8fbfa771314bb11487c6","src/target_info.rs":"f939a570c99d897fdd37cd491a4ee0657e2c7480ec71acbd9cbee48732d4bfbc","src/tempfile.rs":"ebafb5b0e5d08b0706916ed911d4245240e60c3e2d0c9a1630c520842988a2b3","src/tool.rs":"2e6550062e021f2b394388172bbb01e86fe6a94d2395bcb3c85a9e86690da1a9","src/utilities.rs":"a13bb0a351fcef72823485b1b5dc4f514c533fa4feac95deb66ed9e5fbfe7b53","src/windows/com.rs":"a2800ddb81215fff2bf618336f5c4ff8e8bdb746dd18b795873c7304b3f2a5e3","src/windows/find_tools.rs":"dd6b2450909cd8334a2aa2ce856bcc72a9654d92422267d6345d5fabfcbf57c5","src/windows/mod.rs":"34cfa201cfbcac7ccaa3ea5295d3e4200439af3cc5c6433baf81502596040a89","src/windows/registry.rs":"c521b72c825e8095843e73482ffa810ed066ad8bb9f86e6db0c5c143c171aba1","src/windows/setup_config.rs":"754439cbab492afd44c9755abcbec1a41c9b2c358131cee2df13c0e996dbbec8","src/windows/vs_instances.rs":"946527cf8fd32c3472f6a2884dcdec290763101097334c7478f9c24c3950db6b","src/windows/winapi.rs":"250d51c1826d1a2329e9889dd9f058cfce253dbf2a678b076147c6cdb5db046c","src/windows/windows_sys.rs":"e2714c8307bfa083b9745eb0e46cadd7f98d7b88abf45a7637172019324e34b8","src/windows/windows_targets.rs":"5b4648ebc22b028caca9f4b4bf8881fe2d094b7bec217264ba2e6e2c49d1ccee"},"package":"3bbb537bb4a30b90362caddba8f360c0a56bc13d3a5570028e7197204cb54a17"}

View File

@ -1,43 +0,0 @@
rust: Fix build failure for v1.83 when lib32 enabled
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.
Upstream-Status: Pending
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
index 9ac0b0a01f..b1374042fb 100644
--- a/src/bootstrap/src/core/builder.rs
+++ b/src/bootstrap/src/core/builder.rs
@@ -1701,21 +1701,8 @@ impl<'a> Builder<'a> {
// 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))
- .arg("--target")
- .arg(target.rustc_target_arg())
- .arg("--print=file-names")
- .arg("--crate-type=proc-macro")
- .arg("-")
- .run_capture(self)
- .stderr();
- let not_supported = error
- .lines()
- .any(|line| line.contains("unsupported crate type `proc-macro`"));
- if !not_supported {
- cargo.arg("-Zdual-proc-macros");
- rustflags.arg("-Zdual-proc-macros");
- }
+ cargo.arg("-Zdual-proc-macros");
+ rustflags.arg("-Zdual-proc-macros");
}
}
}

View File

@ -24,13 +24,12 @@ diff --git a/compiler/rustc/src/main.rs b/compiler/rustc/src/main.rs
index e9a7397557..29766fc9d8 100644
--- a/compiler/rustc/src/main.rs
+++ b/compiler/rustc/src/main.rs
@@ -1,6 +1,3 @@
@@ -1,5 +1,3 @@
-// We need this feature as it changes `dylib` linking behavior and allows us to link to `rustc_driver`.
-#![feature(rustc_private)]
-
// A note about jemalloc: rustc uses jemalloc when built for CI and
// distribution. The obvious way to do this is with the `#[global_allocator]`
// mechanism. However, for complicated reasons (see
// Several crates are depended upon but unused so that they are present in the sysroot
#![expect(unused_crate_dependencies)]
diff --git a/compiler/rustc_metadata/src/dependency_format.rs b/compiler/rustc_metadata/src/dependency_format.rs
index 39fa23766b..51d86b4009 100644
--- a/compiler/rustc_metadata/src/dependency_format.rs
@ -44,10 +43,11 @@ index 39fa23766b..51d86b4009 100644
use rustc_hir::def_id::CrateNum;
use rustc_middle::bug;
use rustc_middle::middle::dependency_format::{Dependencies, DependencyList, Linkage};
@@ -162,43 +162,18 @@ fn calculate_type(tcx: TyCtxt<'_>, ty: CrateType) -> DependencyList {
@@ -161,44 +161,19 @@ fn calculate_type(tcx: TyCtxt<'_>, ty: CrateType) -> DependencyList {
}
Linkage::Dynamic | Linkage::IncludedFromDylib => {}
}
-
- let all_dylibs = || {
- tcx.crates(()).iter().filter(|&&cnum| {
- !tcx.dep_kind(cnum).macros_only() && tcx.used_crate_source(cnum).dylib.is_some()
@ -56,7 +56,7 @@ index 39fa23766b..51d86b4009 100644
-
- let mut upstream_in_dylibs = FxHashSet::default();
-
- if tcx.features().rustc_private {
- if tcx.features().rustc_private() {
- // We need this to prevent users of `rustc_driver` from linking dynamically to `std`
- // which does not work as `std` is also statically linked into `rustc_driver`.
-
@ -85,7 +85,7 @@ index 39fa23766b..51d86b4009 100644
+ if tcx.dep_kind(cnum).macros_only() {
continue;
}
-
let name = tcx.crate_name(cnum);
+ let src = tcx.used_crate_source(cnum);
+ if src.dylib.is_some() {
@ -139,11 +139,11 @@ index d04e2fbeb7..011c289d93 100644
if let Some(crate_name) = crate_name {
if let Some(target) = env::var_os("RUSTC_TIME") {
if target == "all"
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
index ff0d1f3a72..b2c9602e57 100644
--- a/src/bootstrap/src/core/builder.rs
+++ b/src/bootstrap/src/core/builder.rs
@@ -2201,7 +2201,7 @@ impl<'a> Builder<'a> {
diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
index 0688a1d689..066e6bf53f 100644
--- a/src/bootstrap/src/core/builder/cargo.rs
+++ b/src/bootstrap/src/core/builder/cargo.rs
@@ -1146,7 +1146,7 @@ impl Builder<'_> {
// When we build Rust dylibs they're all intended for intermediate
// usage, so make sure we pass the -Cprefer-dynamic flag instead of
// linking all deps statically into the dylib.
@ -200,13 +200,13 @@ diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/c
index 27bbc8bd8f..a6fc4df2eb 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -1934,24 +1934,8 @@ impl Step for Assemble {
let src_libdir = builder.sysroot_libdir(build_compiler, host);
@@ -1940,24 +1940,8 @@ impl Step for Assemble {
let src_libdir = builder.sysroot_target_libdir(build_compiler, host);
for f in builder.read_dir(&src_libdir) {
let filename = f.file_name().into_string().unwrap();
-
- let is_proc_macro = proc_macros.contains(&filename);
- let is_dylib_or_debug = is_dylib(&filename) || is_debug_info(&filename);
- let is_dylib_or_debug = is_dylib(&f.path()) || is_debug_info(&filename);
-
- // If we link statically to stdlib, do not copy the libstd dynamic library file
- // FIXME: Also do this for Windows once incremental post-optimization stage0 tests
@ -214,7 +214,7 @@ index 27bbc8bd8f..a6fc4df2eb 100644
- let can_be_rustc_dynamic_dep = if builder
- .link_std_into_rustc_driver(target_compiler.host)
- && !target_compiler.host.is_windows()
+ if (is_dylib(&filename) || is_debug_info(&filename)) && !proc_macros.contains(&filename)
+ if (is_dylib(Path::new(&filename)) || is_debug_info(&filename)) && !proc_macros.contains(&filename)
{
- let is_std = filename.starts_with("std-") || filename.starts_with("libstd-");
- !is_std

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,30 +0,0 @@
From 40b4fd7a3e81d32b29364a1b15337bcf817659c0 Mon Sep 17 00:00:00 2001
From: Chen Zheng <czhengsz@cn.ibm.com>
Date: Tue, 30 Jul 2024 09:02:07 +0800
Subject: [PATCH] [NFC] fix build failure (#100993)
Fix the build failure caused by
https://github.com/llvm/llvm-project/pull/94944
Fixes https://github.com/llvm/llvm-project/issues/100296
Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/40b4fd7a3e81d32b29364a1b15337bcf817659c0]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
llvm/lib/Analysis/ConstantFolding.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index 85ee231675d0..084647b1d9d9 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -1782,8 +1782,8 @@ Constant *ConstantFoldFP(double (*NativeFP)(double), const APFloat &V,
}
#if defined(HAS_IEE754_FLOAT128) && defined(HAS_LOGF128)
-Constant *ConstantFoldFP128(long double (*NativeFP)(long double),
- const APFloat &V, Type *Ty) {
+Constant *ConstantFoldFP128(float128 (*NativeFP)(float128), const APFloat &V,
+ Type *Ty) {
llvm_fenv_clearexcept();
float128 Result = NativeFP(V.convertToQuad());
if (llvm_fenv_testexcept()) {

View File

@ -4,14 +4,13 @@ HOMEPAGE = "http://www.rust-lang.org"
# check src/llvm-project/llvm/CMakeLists.txt for llvm version in use
#
LLVM_RELEASE = "19.1.1"
LLVM_RELEASE = "19.1.5"
require rust-source.inc
SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
file://0003-llvm-fix-include-benchmarks.patch;striplevel=2 \
file://0001-NFC-fix-build-failure-100993.patch;striplevel=2 \
"
S = "${RUSTSRC}/src/llvm-project/llvm"

View File

@ -4,56 +4,56 @@
## The exact (previous) version that has been used is specified in the source tarball.
## The version is replicated here.
SNAPSHOT_VERSION = "1.82.0"
SNAPSHOT_VERSION = "1.83.0"
SRC_URI[cargo-snapshot-aarch64.sha256sum] = "05c0d904a82cddb8a00b0bbdd276ad7e24dea62a7b6c380413ab1e5a4ed70a56"
SRC_URI[clippy-snapshot-aarch64.sha256sum] = "1e01808028b67a49f57925ea72b8a2155fbec346cd694d951577c63312ba9217"
SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "1359ac1f3a123ae5da0ee9e47b98bb9e799578eefd9f347ff9bafd57a1d74a7f"
SRC_URI[rustc-snapshot-aarch64.sha256sum] = "2958e667202819f6ba1ea88a2a36d7b6a49aad7e460b79ebbb5cf9221b96f599"
SRC_URI[cargo-snapshot-aarch64.sha256sum] = "5b96aba48790acfacea60a6643a4f30d7edc13e9189ad36b41bbacdad13d49e1"
SRC_URI[clippy-snapshot-aarch64.sha256sum] = "08cabe06aa116b78b351ab1ca1d7ccf0dc18d97d999f3e0bf228021291314d5d"
SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "8804f673809c5c3db11ba354b5cf9724aed68884771fa32af4b3472127a76028"
SRC_URI[rustc-snapshot-aarch64.sha256sum] = "aa5d075f9903682e5171f359948717d32911bed8c39e0395042e625652062ea9"
SRC_URI[cargo-snapshot-i686.sha256sum] = "1cf5bae93e9724f50f1a20a752f05870565e0ce83baa157aad632aa162fd97d5"
SRC_URI[clippy-snapshot-i686.sha256sum] = "a4c20f20c8e53747e00948f90d74380ae890c1836a067d504eca540c6a60157f"
SRC_URI[rust-std-snapshot-i686.sha256sum] = "c7ebb02b6ca349999b3b7dce768efaca5e0d9060f55397523e11a64cd10a9405"
SRC_URI[rustc-snapshot-i686.sha256sum] = "92bab38ce88b7738fb62a1bccf496b1b2975fe984cc4fc506903a03ed37e1e4a"
SRC_URI[cargo-snapshot-i686.sha256sum] = "906976544e7f6bac7ee4f54eae56f3162fe7dc06744cf84149699be57bd0b4c7"
SRC_URI[clippy-snapshot-i686.sha256sum] = "4fb7ed75796336f4972675225ac4e1f2a8ba58ddf350dd51f1d482c7084b0c6f"
SRC_URI[rust-std-snapshot-i686.sha256sum] = "d6763f3ff18fa6da4455058fcb84ef19c2586fca02badab466200d90fa4184d4"
SRC_URI[rustc-snapshot-i686.sha256sum] = "421fba974b062b1b9749792466214e563589a05f888673989b0208b1dc66ac43"
SRC_URI[cargo-snapshot-loongarch64.sha256sum] = "01709e6d5b16e972e6c5e826a36331c645766ecda8f0aa48559f20c0d1129f44"
SRC_URI[clippy-snapshot-loongarch64.sha256sum] = "ddbd18682a7fa0794d3bf159ba5cc5aee8c7bd6860d2edd8c9f4591753b5f05c"
SRC_URI[rust-std-snapshot-loongarch64.sha256sum] = "8cc1399b0460b3bc4b7295165dcdcee310fd643dc29569e1786944650f2a3700"
SRC_URI[rustc-snapshot-loongarch64.sha256sum] = "2bdbf08c8c7d3a4dc8bddddbc4cf2cdec5a3d0f4a42e19183a14bed24d8d580c"
SRC_URI[cargo-snapshot-loongarch64.sha256sum] = "c7b537bc2bb4b685eae80503657b89bf59c51303c90ebc042b0fb39b21cf252d"
SRC_URI[clippy-snapshot-loongarch64.sha256sum] = "895d1f9cacce934f0e72e06df9f4653c48d2df4a2070206a6b8b21908ce07d1f"
SRC_URI[rust-std-snapshot-loongarch64.sha256sum] = "5804d1e989c03620b3bedf0ce43c98395fcfae1d6923446c31ae5562ee56916e"
SRC_URI[rustc-snapshot-loongarch64.sha256sum] = "b3afba9debf0e153f5dc69ecb0b020c0d6159002bd3b4b845c6797480c07d50e"
SRC_URI[cargo-snapshot-powerpc.sha256sum] = "7c11f69eb52c6e26cd8a33daeae7d630b6af49de30c1af16f4e998ca25a48bfd"
SRC_URI[clippy-snapshot-powerpc.sha256sum] = "a33f459a5cc13573e4ed73bd5667bba4bdf658e30b629f36a221eb5249d4acc6"
SRC_URI[rust-std-snapshot-powerpc.sha256sum] = "827989a42526206199025f764d08d7cd319fee58bf2e08dcaf75df9ead6f094e"
SRC_URI[rustc-snapshot-powerpc.sha256sum] = "0d93e17a06cd284bdc0a97df64733f4b2f9f8c3cd9163935d85812ebc8520d2f"
SRC_URI[cargo-snapshot-powerpc.sha256sum] = "05c353dfeaf51e960e5f916e345f0f0d0497851428a3faa997a62a8563e63109"
SRC_URI[clippy-snapshot-powerpc.sha256sum] = "0e93e1bac1c195d89b9b94a900ffa3191228c6c66f5a5bf2f656a1a72fdfa163"
SRC_URI[rust-std-snapshot-powerpc.sha256sum] = "17978a56a8efef883485201dc701ed2ff13530511578da240840f12bdc55cb27"
SRC_URI[rustc-snapshot-powerpc.sha256sum] = "f843dadf7f1f0148e78480dfcdecaa8eef15aa8382576ff41c82799c6233039b"
SRC_URI[cargo-snapshot-powerpc64.sha256sum] = "94d828f3cbd848f15ec72e904bccd904a7fac0cd88d6afecfc472e48da032cb2"
SRC_URI[clippy-snapshot-powerpc64.sha256sum] = "c849be4677f42dc9439ac2458ca3964b69a2d6621e57f979151e7b59de22d895"
SRC_URI[rust-std-snapshot-powerpc64.sha256sum] = "665f3c0a8752f8e5d973cf9b94e5c1be94954178ca8378a318b6e21e7a7b370c"
SRC_URI[rustc-snapshot-powerpc64.sha256sum] = "8795c642f94d15c81420a8eff77efbbac553869a00c627a1e3f881c542388b4a"
SRC_URI[cargo-snapshot-powerpc64.sha256sum] = "889f2cc33c77a34ae962629f0469c6138a5d4d6efeb5f383a87443181845a771"
SRC_URI[clippy-snapshot-powerpc64.sha256sum] = "35be1a0ef9241785210447126a18fccb4114fe54776f3e20e21d89c025b05498"
SRC_URI[rust-std-snapshot-powerpc64.sha256sum] = "adcefafca7a7b7ddb220d18e31afdfd4c547f87b1515e45098513b2d468043e7"
SRC_URI[rustc-snapshot-powerpc64.sha256sum] = "267089f5c1d7364ccf56f2246f37d668d386edcf2154c985a6e51c928e50dde6"
SRC_URI[cargo-snapshot-powerpc64le.sha256sum] = "ce5918e9c1a41b9e9a1b3e15f6525ddc01df06d9cea63d574dc59e8a401c1b67"
SRC_URI[clippy-snapshot-powerpc64le.sha256sum] = "a633c961cc9225c5ec1af6f153e33fd103057c9ebc66eb80f388687f34215fbf"
SRC_URI[rust-std-snapshot-powerpc64le.sha256sum] = "4954a44305622b8f68ca088138b9a69432e350336da1a415a282ce148beb340d"
SRC_URI[rustc-snapshot-powerpc64le.sha256sum] = "0b22b37e51dd1dab6cc80a02968873ecb5f886fe1a65cd47131e3d10be48a23b"
SRC_URI[cargo-snapshot-powerpc64le.sha256sum] = "7a1b7b1d18f562be446db8880fbcc26f4f5581c273a5d547231e8da3d06e3f39"
SRC_URI[clippy-snapshot-powerpc64le.sha256sum] = "7f6a3b6c99a38a0a6722652c8b342b16397000f198ff5b8ae5c042336a88db89"
SRC_URI[rust-std-snapshot-powerpc64le.sha256sum] = "d39fdf0954e57fa9dd0763d58e7897bbb93265ab217e5fef14a11fafe2f706a3"
SRC_URI[rustc-snapshot-powerpc64le.sha256sum] = "5978f9b3246c71cefb5266e56403c1071fed70d71019bd839c4601d7b6f9eac9"
SRC_URI[cargo-snapshot-riscv64gc.sha256sum] = "4779732566542099491c35a9f4342361bb8366e76c7d37ade0b5b7ae6f470df3"
SRC_URI[clippy-snapshot-riscv64gc.sha256sum] = "1399034c20e3037288cd659359e0a9eeb1d8a125488bbea28bbe146792a18d1a"
SRC_URI[rust-std-snapshot-riscv64gc.sha256sum] = "5649f9b4e107d6c5f72fb7f82cfe15370b80b8d983670602e02e0b615bc6dc88"
SRC_URI[rustc-snapshot-riscv64gc.sha256sum] = "225726a3fedeb6cf136d5af503fb6853a0ce3c735fd972d40d678d734e65f5e8"
SRC_URI[cargo-snapshot-riscv64gc.sha256sum] = "ddfcc41a419f1d1a7637a972932d37e3c5487343f9be3deaeacf06027fbb0567"
SRC_URI[clippy-snapshot-riscv64gc.sha256sum] = "feea5dae4dfb65b608590b5e7b5c693da12f8e559e3b1a7b6b19dbae580b0ede"
SRC_URI[rust-std-snapshot-riscv64gc.sha256sum] = "6a5467d1f4b8040f19c94ca332063cad57581d6cfd1f15543da5a67d4d244f70"
SRC_URI[rustc-snapshot-riscv64gc.sha256sum] = "3f0c56d778985f69aff3ae58aa157025ad807d8b5821b8f98108be6f8a283e21"
SRC_URI[cargo-snapshot-s390x.sha256sum] = "55d95ce07117430b92d1153e5b1ff40222687bd344872260e0a19ecf7b4c28a2"
SRC_URI[clippy-snapshot-s390x.sha256sum] = "9c8c4b9d3a39383aa043a9a534478bd2ab6adf7a2a48c1d4d29864974f23005f"
SRC_URI[rust-std-snapshot-s390x.sha256sum] = "454b83668b57bdef28fc49aca8fd4c38e395b49011e653afdf3f9bb2dae8aa63"
SRC_URI[rustc-snapshot-s390x.sha256sum] = "bd46920849468c4ab78c53b21c962e538b1e8a9f38c736a9e52d790c75d55c45"
SRC_URI[cargo-snapshot-s390x.sha256sum] = "2044ee69985da536dc1786e949828eba88516ee01ad88a4c36d753c471143ccf"
SRC_URI[clippy-snapshot-s390x.sha256sum] = "fdab081200826ba47929030cd7e9d82c843122fdd26fc3edff9e52a2d91f68b0"
SRC_URI[rust-std-snapshot-s390x.sha256sum] = "d1e1af8622d59c3351046ded96af4eeecb3db2f4f7527249eaf1acc917e3f2e8"
SRC_URI[rustc-snapshot-s390x.sha256sum] = "ccf73e94f3f60dfddc26640df95dbb82939aa572d50cda0aeafaa36b47b28f07"
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "97aeae783874a932c4500f4d36473297945edf6294d63871784217d608718e70"
SRC_URI[clippy-snapshot-x86_64.sha256sum] = "ea4fbf6fbd3686d4f6e2a77953e2d42a86ea31e49a5f79ec038762c413b15577"
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "2eca3d36f7928f877c334909f35fe202fbcecce109ccf3b439284c2cb7849594"
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "90b61494f5ccfd4d1ca9a5ce4a0af49a253ca435c701d9c44e3e44b5faf70cb8"
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "de834a4062d9cd200f8e0cdca894c0b98afe26f1396d80765df828880a39b98c"
SRC_URI[clippy-snapshot-x86_64.sha256sum] = "ef6c05abcfd861ff0bca41d408e126dda195dc966ee35abee57645a12d418f5b"
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "c88fe6cb22f9d2721f26430b6bdd291e562da759e8629e2b4c7eb2c7cad705f2"
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "6ec40e0405c8cbed3b786a97d374c144b012fc831b7c22b535f8ecb524f495ad"
SRC_URI[rust-std-snapshot-i586.sha256sum] = "f56585c55664898c7484f4b7bd139770c99d7b4da6e56e4016f71cb053b1aee2"
SRC_URI[rust-std-snapshot-i586.sha256sum] = "7948ff50f7e83a20deba9d4f55170f7e3b0d805e80049f38b19f41580a9d7bb1"
SRC_URI[rust-std-snapshot-sparc64.sha256sum] = "87db52d782131a8817b76f65eefcae2c24a49b2a6f19ed9bd4699167305c22aa"
SRC_URI[rust-std-snapshot-sparc64.sha256sum] = "e8684ba5d337dbb0594cdc8e4e8ffa11d7ac8e48b2f294019e042e341fa9a869"
SRC_URI += " \
${RUST_DIST_SERVER}/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \

View File

@ -1,15 +1,14 @@
RUST_VERSION ?= "${@d.getVar('PV').split('-')[0]}"
SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;name=rust \
file://rv32-cargo-rustix-0.38.37-fix.patch;patchdir=${RUSTSRC} \
file://rv32-cargo-rustix-0.38.38-fix.patch;patchdir=${RUSTSRC} \
file://rust-oe-selftest.patch;patchdir=${RUSTSRC} \
file://repro-issue-fix-with-cc-crate-hashmap.patch;patchdir=${RUSTSRC} \
file://oeqa-selftest-Increase-timeout-in-process-sigpipe-ru.patch;patchdir=${RUSTSRC} \
file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \
file://revert-link-std-statically-in-rustc_driver-feature.patch;patchdir=${RUSTSRC} \
file://revert-Zdual-proc-macros-additional-check.patch;patchdir=${RUSTSRC} \
"
SRC_URI[rust.sha256sum] = "7b11d4242dab0921a7d54758ad3fe805153c979c144625fecde11735760f97df"
SRC_URI[rust.sha256sum] = "e23ec747a06ffd3e94155046f40b6664ac152c9ee3c2adfd90353a7ccff24226"
RUSTSRC = "${WORKDIR}/rustc-${RUST_VERSION}-src"