rust: Upgrade 1.95.0 -> 1.96.0
PATCH v2 1/1 rust: Upgrade 1.95.0 -> 1.96.0
From: Deepesh Varatharajan <[email protected]>
Rust Changes:
https://github.com/rust-lang/rust/releases/tag/1.96.0
Cargo Changes:
https://doc.rust-lang.org/nightly/cargo/CHANGELOG.html#cargo-196-2026-05-28
rust-target-config:
limit llvm-floatabi to ARM targets
Generate llvm-floatabi only for ARM/ARMv7 targets and set the corresponding Rust target ABI (eabi or eabihf) according to TARGET_FPU.
llvm-floatabi is an ARM-specific LLVM setting (Rust currently uses it only for ARM targets) and should not be emitted for other architectures.
https://github.com/rust-lang/rust/blob/main/compiler/rustc_target/src/spec/mod.rs#L2619
Following upstream Rust changes that tightened validation of target ABI fields, ARM targets must provide an explicit ABI in addition to the float ABI configuration. Match the ABI settings used by Rust's built-in ARM target specifications when generating target JSON files.
Upstream-Reference:
https://github.com/rust-lang/rust/commit/40ebcc031da647d6a76deaf05c471b7a1d4aa228
("Rename target.abi to target.cfg_abi and enum-ify llvm_abiname")
Drop merged patches:
0001-Update-call-llvm-intrinsics-test.patch 0001-Fix-multiple-option-or-permutations-test-for-big-end.patch
Updated patch:
rust-oe-selftest.patch
New patch:
0003-explicit-tail-calls-disable-two-tests.patch Backport two commits that disable two failing tests on LoongArch.
Selftest Changes:
Ignore one failing test for riscv64 tests/assembly-llvm/riscv-redundant-memory-stores.rs
https://github.com/rust-lang/rust/issues/157074
Excluded tests:
+--------+----------+---------+ | Before | After | Skipped | +---------+---------+---------+ | 39 | 40 | +1 | +--------+----------+---------+
Test results:
rust v1.96.0
+-------------+---------+---------+ | Machine | Passed | Skipped | +-------------+---------+---------+ | qemux86-64 | 22436 | 732 | | qemux86 | 22190 | 978 | | qemuarm64 | 22262 | 906 | | qemuarm | 22172 | 996 | | qemuriscv64 | 22216 | 952 | +-------------+---------+---------+
Test results difference (1.96.0 - 1.95.0):
+-------------+--------+---------+ | Machine | Passed | Skipped | +-------------+--------+---------+ | qemux86-64 | +249 | +43 | | qemux86 | +261 | +31 | | qemuarm64 | +268 | +24 | | qemuarm | +262 | +30 | | qemuriscv64 | +261 | +31 | +-------------+--------+---------+
---
.../classes-recipe/rust-target-config.bbclass | 11 +-
meta/conf/distro/include/tcmode-default.inc | 2 +-
.../rust/{cargo_1.95.0.bb => cargo_1.96.0.bb} | 0
...ion-or-permutations-test-for-big-end.patch | 121 ------------------
...001-Update-call-llvm-intrinsics-test.patch | 86 -------------
...xplicit-tail-calls-disable-two-tests.patch | 39 ++++++
.../rust/files/rust-oe-selftest.patch | 21 ++-
...ibstd-rs_1.95.0.bb => libstd-rs_1.96.0.bb} | 0
....95.0.bb => rust-cross-canadian_1.96.0.bb} | 0
meta/recipes-devtools/rust/rust-snapshot.inc | 104 +++++++--------
meta/recipes-devtools/rust/rust-source.inc | 5 +-
.../rust/{rust_1.95.0.bb => rust_1.96.0.bb} | 0
12 files changed, 118 insertions(+), 271 deletions(-)
rename meta/recipes-devtools/rust/{cargo_1.95.0.bb => cargo_1.96.0.bb} (100%)
delete mode 100644 meta/recipes-devtools/rust/files/0001-Fix-multiple-option-or-permutations-test-for-big-end.patch
delete mode 100644 meta/recipes-devtools/rust/files/0001-Update-call-llvm-intrinsics-test.patch
create mode 100644 meta/recipes-devtools/rust/files/0003-explicit-tail-calls-disable-two-tests.patch
rename meta/recipes-devtools/rust/{libstd-rs_1.95.0.bb => libstd-rs_1.96.0.bb} (100%)
rename meta/recipes-devtools/rust/{rust-cross-canadian_1.95.0.bb => rust-cross-canadian_1.96.0.bb} (100%)
rename meta/recipes-devtools/rust/{rust_1.95.0.bb => rust_1.96.0.bb} (100%)meta/classes-recipe/rust-target-config.bbclass +7 -4
@@ -416,10 +416,13 @@ def rust_gen_target(d, thing, wd, arch): if features != "": tspec['features'] = features fpu = d.getVar('TARGET_FPU') - if fpu in ["soft", "softfp"]: - tspec['llvm-floatabi'] = "soft" - elif fpu == "hard": - tspec['llvm-floatabi'] = "hard" + if arch in ["arm", "armv7"]: + if fpu in ["soft", "softfp"]: + tspec['abi'] = "eabi" + tspec['llvm-floatabi'] = "soft" + elif fpu == "hard": + tspec['abi'] = "eabihf" + tspec['llvm-floatabi'] = "hard" tspec['default-uwtable'] = True tspec['dynamic-linking'] = True tspec['executables'] = True
meta/conf/distro/include/tcmode-default.inc +1 -1
@@ -12,7 +12,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext" GCCVERSION ?= "16.%" SDKGCCVERSION ?= "${GCCVERSION}" GLIBCVERSION ?= "2.43%" -RUSTVERSION ?= "1.95.0%" +RUSTVERSION ?= "1.96.0%" PREFERRED_VERSION_gcc ?= "${GCCVERSION}" PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
meta/recipes-devtools/rust/cargo_1.96.0.bb renamed from meta/recipes-devtools/rust/cargo_1.95.0.bb +0 -0
meta/recipes-devtools/rust/files/0001-Fix-multiple-option-or-permutations-test-for-big-end.patch deleted +0 -121
121 lines not on this page · raw message
meta/recipes-devtools/rust/files/0001-Update-call-llvm-intrinsics-test.patch deleted +0 -86
86 lines not on this page · raw message
meta/recipes-devtools/rust/files/0003-explicit-tail-calls-disable-two-tests.patch new file +39 -0
@@ -0,0 +1,39 @@ +Backport two commits that disable two failing tests on LoongArch. + +Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/fb9e970c1f9377fa6c093f18aabab76204a18ea4] +Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/250beb317422dad63d9bdefee9d82c55a732ba60] + +Signed-off-by: Deepesh Varatharajan <[email protected]> + +diff --git a/tests/ui/explicit-tail-calls/support/bystack.rs b/tests/ui/explicit-tail-calls/support/bystack.rs +index ad1e082..b0ac29e 100644 +--- a/tests/ui/explicit-tail-calls/support/bystack.rs ++++ b/tests/ui/explicit-tail-calls/support/bystack.rs +@@ -36,9 +36,11 @@ + //@ revisions: loongarch32 + //@[loongarch32] compile-flags: --target loongarch32-unknown-none + //@[loongarch32] needs-llvm-components: loongarch ++//@[loongarch32] ignore-llvm-version: 22 - 23 + //@ revisions: loongarch64 + //@[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu + //@[loongarch64] needs-llvm-components: loongarch ++//@[loongarch64] ignore-llvm-version: 22 - 23 + //@ revisions: bpf + //@[bpf] compile-flags: --target bpfeb-unknown-none + //@[bpf] needs-llvm-components: bpf +diff --git a/tests/ui/explicit-tail-calls/support/byval.rs b/tests/ui/explicit-tail-calls/support/byval.rs +index 965c63c..d29d0d8 100644 +--- a/tests/ui/explicit-tail-calls/support/byval.rs ++++ b/tests/ui/explicit-tail-calls/support/byval.rs +@@ -36,9 +36,11 @@ + //@ revisions: loongarch32 + //@[loongarch32] compile-flags: --target loongarch32-unknown-none + //@[loongarch32] needs-llvm-components: loongarch ++//@[loongarch32] ignore-llvm-version: 22 - 23 + //@ revisions: loongarch64 + //@[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu + //@[loongarch64] needs-llvm-components: loongarch ++//@[loongarch64] ignore-llvm-version: 22 - 23 + //@ revisions: bpf + //@[bpf] compile-flags: --target bpfeb-unknown-none + //@[bpf] needs-llvm-components: bpf
meta/recipes-devtools/rust/files/rust-oe-selftest.patch +17 -4
@@ -152,7 +152,7 @@ diff --git a/compiler/rustc_data_structures/src/tagged_ptr/tests.rs b/compiler/r index 160af8a65d..686f4607bb 100644 --- a/compiler/rustc_data_structures/src/tagged_ptr/tests.rs +++ b/compiler/rustc_data_structures/src/tagged_ptr/tests.rs -@@ -39,6 +39,7 @@ use crate::stable_hasher::{HashStable, StableHasher}; +@@ -43,6 +43,7 @@ use crate::stable_hasher::{HashStable, StableHasher}; } #[test]
@@ -195,7 +195,7 @@ diff --git a/compiler/rustc_data_structures/src/vec_cache/tests.rs b/compiler/ru index a05f274136..0e69b4cb98 100644 --- a/compiler/rustc_data_structures/src/vec_cache/tests.rs +++ b/compiler/rustc_data_structures/src/vec_cache/tests.rs -@@ -17,6 +17,7 @@ fn vec_cache_insert_and_check() { +@@ -53,6 +53,7 @@ fn vec_cache_insert_and_check() { } #[test]
@@ -219,9 +219,10 @@ diff --git a/tests/ui/linking/executable-no-mangle-strip.rs b/tests/ui/linking/e index cc283dc53..73cbab9c0 100644 --- a/tests/ui/linking/executable-no-mangle-strip.rs +++ b/tests/ui/linking/executable-no-mangle-strip.rs -@@ -1,5 +1,7 @@ +@@ -1,6 +1,8 @@ //@ run-pass //@ ignore-windows-gnu: only statics marked with used can be GC-ed on windows-gnu + //@ ignore-wasm: wasm, for better or worse, exports all #[no_mangle] +//@ ignore-powerpc: this test is not working on powerpc +// bug report: https://github.com/rust-lang/rust/issues/144777
@@ -279,7 +280,7 @@ index 89c61cd..144ea0e 100644 use std::process::ExitCode; // A note about jemalloc: rustc uses jemalloc when built for CI and -@@ -38,6 +38,7 @@ +@@ -41,6 +41,7 @@ #[cfg(feature = "jemalloc")] use tikv_jemalloc_sys as _;
@@ -287,3 +288,15 @@ index 89c61cd..144ea0e 100644 fn main() -> ExitCode { rustc_driver::main() } +diff --git a/tests/assembly-llvm/riscv-redundant-memory-stores.rs b/tests/assembly-llvm/riscv-redundant-memory-stores.rs +index acdb69d..2220e6d 100644 +--- a/tests/assembly-llvm/riscv-redundant-memory-stores.rs ++++ b/tests/assembly-llvm/riscv-redundant-memory-stores.rs +@@ -4,6 +4,7 @@ + //@ compile-flags: -Copt-level=3 --target riscv64gc-unknown-linux-gnu + //@ needs-llvm-components: riscv + //@ only-riscv64 ++//@ ignore-riscv64 + + pub struct SomeComplexType { + a: u64,
meta/recipes-devtools/rust/libstd-rs_1.96.0.bb renamed from meta/recipes-devtools/rust/libstd-rs_1.95.0.bb +0 -0
meta/recipes-devtools/rust/rust-cross-canadian_1.96.0.bb renamed from meta/recipes-devtools/rust/rust-cross-canadian_1.95.0.bb +0 -0
meta/recipes-devtools/rust/rust-snapshot.inc +52 -52
110 lines not on this page · raw message
meta/recipes-devtools/rust/rust-source.inc +2 -3
@@ -6,11 +6,10 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n file://repro-issue-fix-with-cc-crate-hashmap.patch;patchdir=${RUSTSRC} \ file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \ file://0001-riscv32-Define-plain-syscalls-as-their-time64-varian.patch;patchdir=${RUSTSRC} \ - file://0001-Update-call-llvm-intrinsics-test.patch;patchdir=${RUSTSRC} \ - file://0001-Fix-multiple-option-or-permutations-test-for-big-end.patch;patchdir=${RUSTSRC} \ file://0002-Fix-rust-build-failure-with-unstable-options.patch;patchdir=${RUSTSRC} \ + file://0003-explicit-tail-calls-disable-two-tests.patch;patchdir=${RUSTSRC} \ " -SRC_URI[rust.sha256sum] = "62b67230754da642a264ca0cb9fc08820c54e2ed7b3baba0289876d4cdb48c08" +SRC_URI[rust.sha256sum] = "b99ce16cdf0ecfc761b585ac84d131b46733465a02f8ecd0ff2de9713c62ee09" RUSTSRC = "${UNPACKDIR}/rustc-${RUST_VERSION}-src"
meta/recipes-devtools/rust/rust_1.96.0.bb renamed from meta/recipes-devtools/rust/rust_1.95.0.bb +0 -0
Signature · 1 line
2.49.0
Hi Everyone,
Please consider v3, which includes the fix for the arm oe-selftest failure.
https://lists.openembedded.org/g/openembedded-core/topic/patch_v3_rust_upgrade/119625557
Regards,
Deepesh