Skip to content

Commit f4ae71b

Browse files
Yashinde145rpurdie
authored andcommitted
rust: Upgrade 1.84.1->1.85.0
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. License-Update: Unicode license text is updated to Unicode-3.0 License. rust-lang/rust@6d2a3e9 - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop "remove_gcc_directory" postfunc which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. Signed-off-by: Yash Shinde <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
1 parent 57339d7 commit f4ae71b

16 files changed

+417
-342
lines changed

meta/classes-recipe/rust-target-config.bbclass

+5
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,11 @@ def rust_gen_target(d, thing, wd, arch):
391391
tspec['cpu'] = cpu
392392
if features != "":
393393
tspec['features'] = features
394+
fpu = d.getVar('TARGET_FPU')
395+
if fpu == "soft":
396+
tspec['llvm-floatabi'] = "soft"
397+
elif fpu == "hard":
398+
tspec['llvm-floatabi'] = "hard"
394399
tspec['dynamic-linking'] = True
395400
tspec['executables'] = True
396401
tspec['linker-is-gnu'] = True

meta/conf/distro/include/tcmode-default.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
1212
GCCVERSION ?= "14.%"
1313
SDKGCCVERSION ?= "${GCCVERSION}"
1414
GLIBCVERSION ?= "2.41%"
15-
RUSTVERSION ?= "1.84.1%"
15+
RUSTVERSION ?= "1.85.0%"
1616

1717
PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
1818
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Downgrade bootstrap cc version
2+
3+
In rust v1.85.0, the upgraded cc version causes bootstrap
4+
to fail on custom targets. Downgrading the cc version fixes
5+
the error. This commit is merged with v1.85.1 and the patch
6+
can be dropped when upgraded to it.
7+
8+
Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/137460/commits/e4ca11f87ffca8c63aa56d45b46e62b6acc58bd7]
9+
10+
Signed-off-by: Yash Shinde <[email protected]>
11+
diff --git a/src/bootstrap/Cargo.lock b/src/bootstrap/Cargo.lock
12+
index a47f3af60cb..890e64e2bab 100644
13+
--- a/src/bootstrap/Cargo.lock
14+
+++ b/src/bootstrap/Cargo.lock
15+
@@ -88,9 +88,9 @@ dependencies = [
16+
17+
[[package]]
18+
name = "cc"
19+
-version = "1.2.0"
20+
+version = "1.1.22"
21+
source = "registry+https://github.com/rust-lang/crates.io-index"
22+
-checksum = "1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8"
23+
+checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0"
24+
dependencies = [
25+
"shlex",
26+
]
27+
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml
28+
index ed51862390d..2c1d85b01e6 100644
29+
--- a/src/bootstrap/Cargo.toml
30+
+++ b/src/bootstrap/Cargo.toml
31+
@@ -37,7 +37,9 @@ test = false
32+
# Most of the time updating these dependencies requires modifications to the
33+
# bootstrap codebase(e.g., https://github.com/rust-lang/rust/issues/124565);
34+
# otherwise, some targets will fail. That's why these dependencies are explicitly pinned.
35+
-cc = "=1.2.0"
36+
+#
37+
+# Do not upgrade this crate unless https://github.com/rust-lang/cc-rs/issues/1317 is fixed.
38+
+cc = "=1.1.22"
39+
cmake = "=0.1.48"
40+
41+
build_helper = { path = "../build_helper" }

meta/recipes-devtools/rust/files/fix-tidy-check-failure.patch

-19
This file was deleted.

meta/recipes-devtools/rust/files/repro-issue-fix-with-cc-crate-hashmap.patch

+58-2
Large diffs are not rendered by default.

meta/recipes-devtools/rust/files/revert-link-std-statically-in-rustc_driver-feature.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ index 39fa23766b..51d86b4009 100644
4040

4141
-use rustc_data_structures::fx::{FxHashMap, FxHashSet};
4242
+use rustc_data_structures::fx::FxHashMap;
43-
use rustc_hir::def_id::CrateNum;
43+
use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
44+
use rustc_index::IndexVec;
4445
use rustc_middle::bug;
45-
use rustc_middle::middle::dependency_format::{Dependencies, DependencyList, Linkage};
4646
@@ -161,44 +161,19 @@ fn calculate_type(tcx: TyCtxt<'_>, ty: CrateType) -> DependencyList {
4747
}
4848
Linkage::Dynamic | Linkage::IncludedFromDylib => {}

meta/recipes-devtools/rust/files/rust-oe-selftest.patch

+23-23
Original file line numberDiff line numberDiff line change
@@ -150,26 +150,26 @@ index ac1a804cf9c..7c687982324 100644
150150
fn oneshot_multi_thread_recv_close_stress() {
151151
for _ in 0..stress_factor() {
152152
let (tx, rx) = channel::<i32>();
153-
diff --git a/library/std/src/sync/mutex/tests.rs b/library/std/src/sync/mutex/tests.rs
153+
diff --git a/library/std/src/sync/poison/mutex/tests.rs b/library/std/src/sync/poison/mutex/tests.rs
154154
index 1786a3c09ff..9dcead7092b 100644
155-
--- a/library/std/src/sync/mutex/tests.rs
156-
+++ b/library/std/src/sync/mutex/tests.rs
155+
--- a/library/std/src/sync/poison/mutex/tests.rs
156+
+++ b/library/std/src/sync/poison/mutex/tests.rs
157157
@@ -82,6 +82,7 @@ fn drop(&mut self) {
158158
}
159159

160160
#[test]
161161
+#[ignore]
162162
fn test_into_inner_poison() {
163-
let m = Arc::new(Mutex::new(NonCopy(10)));
164-
let m2 = m.clone();
163+
let m = new_poisoned_mutex(NonCopy(10));
164+
165165
@@ -106,6 +107,7 @@ fn test_get_mut() {
166166
}
167167

168168
#[test]
169169
+#[ignore]
170170
fn test_get_mut_poison() {
171-
let m = Arc::new(Mutex::new(NonCopy(10)));
172-
let m2 = m.clone();
171+
let mut m = new_poisoned_mutex(NonCopy(10));
172+
173173
@@ -146,6 +148,7 @@ fn test_mutex_arc_condvar() {
174174
}
175175

@@ -194,10 +194,10 @@ index 1786a3c09ff..9dcead7092b 100644
194194
fn test_mutex_arc_access_in_unwind() {
195195
let arc = Arc::new(Mutex::new(1));
196196
let arc2 = arc.clone();
197-
diff --git a/library/std/src/sync/rwlock/tests.rs b/library/std/src/sync/rwlock/tests.rs
197+
diff --git a/library/std/src/sync/poison/rwlock/tests.rs b/library/std/src/sync/poison/rwlock/tests.rs
198198
index 1a9d3d3f12f..0a9cfc48806 100644
199-
--- a/library/std/src/sync/rwlock/tests.rs
200-
+++ b/library/std/src/sync/rwlock/tests.rs
199+
--- a/library/std/src/sync/poison/rwlock/tests.rs
200+
+++ b/library/std/src/sync/poison/rwlock/tests.rs
201201
@@ -47,6 +47,7 @@ fn frob() {
202202
}
203203

@@ -244,16 +244,16 @@ index 1a9d3d3f12f..0a9cfc48806 100644
244244
#[test]
245245
+#[ignore]
246246
fn test_into_inner_poison() {
247-
let m = Arc::new(RwLock::new(NonCopy(10)));
248-
let m2 = m.clone();
247+
let m = new_poisoned_rwlock(NonCopy(10));
248+
249249
@@ -299,6 +305,7 @@ fn test_get_mut() {
250250
}
251251

252252
#[test]
253253
+#[ignore]
254254
fn test_get_mut_poison() {
255-
let m = Arc::new(RwLock::new(NonCopy(10)));
256-
let m2 = m.clone();
255+
let mut m = new_poisoned_rwlock(NonCopy(10));
256+
257257
diff --git a/library/std/src/sys/pal/unix/process/process_unix/tests.rs b/library/std/src/sys/pal/unix/process/process_unix/tests.rs
258258
index 0a6c6ec19fc..bec257bc630 100644
259259
--- a/library/std/src/sys/pal/unix/process/process_unix/tests.rs
@@ -329,9 +329,9 @@ diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs
329329
fn test_time_options_threshold() {
330330
let unit = TimeThreshold::new(Duration::from_millis(50), Duration::from_millis(100));
331331
let integration = TimeThreshold::new(Duration::from_millis(500), Duration::from_millis(1000));
332-
diff --git a/library/std/src/sync/mutex/tests.rs b/library/std/src/sync/mutex/tests.rs
333-
--- a/library/std/src/sync/mutex/tests.rs
334-
+++ b/library/std/src/sync/mutex/tests.rs
332+
diff --git a/library/std/src/sync/poison/mutex/tests.rs b/library/std/src/sync/poison/mutex/tests.rs
333+
--- a/library/std/src/sync/poison/mutex/tests.rs
334+
+++ b/library/std/src/sync/poison/mutex/tests.rs
335335
@@ -193,6 +193,7 @@
336336
}
337337

@@ -340,9 +340,9 @@ diff --git a/library/std/src/sync/mutex/tests.rs b/library/std/src/sync/mutex/te
340340
fn test_mutex_arc_poison_mapped() {
341341
let arc = Arc::new(Mutex::new(1));
342342
assert!(!arc.is_poisoned());
343-
diff --git a/library/std/src/sync/mutex/tests.rs b/library/std/src/sync/mutex/tests.rs
344-
--- a/library/std/src/sync/mutex/tests.rs
345-
+++ b/library/std/src/sync/mutex/tests.rs
343+
diff --git a/library/std/src/sync/poison/mutex/tests.rs b/library/std/src/sync/poison/mutex/tests.rs
344+
--- a/library/std/src/sync/poison/mutex/tests.rs
345+
+++ b/library/std/src/sync/poison/mutex/tests.rs
346346
@@ -272,6 +272,7 @@
347347
}
348348

@@ -351,9 +351,9 @@ diff --git a/library/std/src/sync/mutex/tests.rs b/library/std/src/sync/mutex/te
351351
fn panic_while_mapping_unlocked_poison() {
352352
let lock = Mutex::new(());
353353

354-
diff --git a/library/std/src/sync/rwlock/tests.rs b/library/std/src/sync/rwlock/tests.rs
355-
--- a/library/std/src/sync/rwlock/tests.rs
356-
+++ b/library/std/src/sync/rwlock/tests.rs
354+
diff --git a/library/std/src/sync/rwlock/tests.rs b/library/std/src/sync/poison/rwlock/tests.rs
355+
--- a/library/std/src/sync/poison/rwlock/tests.rs
356+
+++ b/library/std/src/sync/poison/rwlock/tests.rs
357357
@@ -59,6 +59,7 @@ fn test_rw_arc_poison_wr() {
358358
}
359359

0 commit comments

Comments
 (0)