Skip to content

Commit b6e2c06

Browse files
Yashinde145g-scott-murray
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 [RP: Update LICENSE to reference Unicode-3.0] - 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]> (adapted from oe-core commit 3130069fdebb92f20b962fa8074564a27c3fb6b9) Signed-off-by: Scott Murray <[email protected]>
1 parent aea3ba6 commit b6e2c06

17 files changed

+459
-343
lines changed

classes-recipe/rust-target-config.bbclass

Lines changed: 5 additions & 0 deletions
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

conf/layer.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ LAYERSERIES_COMPAT_scarthgap-rust-mixin = "scarthgap"
1313

1414
LAYERDEPENDS_scarthgap-rust-mixin = "core"
1515

16-
RUSTVERSION ?= "1.84.1%"
16+
LICENSE_PATH += "${LAYERDIR}/files/common-licenses"
17+
18+
RUSTVERSION ?= "1.85.0%"

files/common-licenses/Unicode-3.0

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
UNICODE LICENSE V3
2+
3+
COPYRIGHT AND PERMISSION NOTICE
4+
5+
Copyright © 1991-2023 Unicode, Inc.
6+
7+
NOTICE TO USER: Carefully read the following legal agreement. BY
8+
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
9+
SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
10+
TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
11+
DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
12+
13+
Permission is hereby granted, free of charge, to any person obtaining a
14+
copy of data files and any associated documentation (the "Data Files") or
15+
software and any associated documentation (the "Software") to deal in the
16+
Data Files or Software without restriction, including without limitation
17+
the rights to use, copy, modify, merge, publish, distribute, and/or sell
18+
copies of the Data Files or Software, and to permit persons to whom the
19+
Data Files or Software are furnished to do so, provided that either (a)
20+
this copyright and permission notice appear with all copies of the Data
21+
Files or Software, or (b) this copyright and permission notice appear in
22+
associated Documentation.
23+
24+
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
25+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
27+
THIRD PARTY RIGHTS.
28+
29+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
30+
BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
31+
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
32+
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
33+
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
34+
FILES OR SOFTWARE.
35+
36+
Except as contained in this notice, the name of a copyright holder shall
37+
not be used in advertising or otherwise to promote the sale, use or other
38+
dealings in these Data Files or Software without prior written
39+
authorization of the copyright holder.
Lines changed: 41 additions & 0 deletions
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" }

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

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)