Skip to contentSkip to conversation

Update to 1.100.0

PATCH New Scott Murray 1 participant 11 messages Nov 30

lore
Share & tools
lore
#0 lore raw

cover Update to 1.100.0

This patch series for the wrynose/rust mixin layer backports the recent Rust toolchain changes in oe-core master branch to pull in the 1.99.1 -> 1.100.0 update and other fixes.

I intend to merge this series to wrynose/rust by end of day Tuesday, Dec. 1 (EST), unless an issue is pointed out.

Scott

Changes:

Benhur Tessele (1):
rust: add rust-analyzer to the SDK behind a PACKAGECONFIG

Deepesh Varatharajan (1):
rust: Fix intermittent test failure

Hemanth Kumar M D (2):
rust: Upgrade 1.99.1 -> 1.100.0
rust: drop native libLLVM path for non-host architectures

Michal Sieron (2):
rust-target-config.bbclass: Add i128:128 to mips64 data layouts rust-target-config.bbclass: Set llvm-abiname for mips64 targets

Trevor Gamblin (4):
rust-target-config.bbclass: pass on all RISC-V extensions to LLVM ptest-cargo.bbclass: run do_install_ptest_cargo as a postfunc
librsvg: make ptest symlink creation idempotent ptest-cargo.bbclass: don't follow symlinks when chowning

 classes-recipe/ptest-cargo.bbclass            |  25 +-
 classes-recipe/rust-target-config.bbclass     |  42 +--
 conf/layer.conf                               |   4 +-
 lib/oeqa/selftest/cases/rust_mixin.py         |   1 +
 .../{cargo_1.99.1.bb => cargo_1.100.0.bb}     |   0
 ...teps-tool.rs-switch-off-lto-for-rust.patch |  27 +-
 ...ip-StdarchVerify-when-remote-testing.patch |  30 --
 ...host-triple-from-unit-metadata-hash.patch} |   0
 ...ess-tests-adjust-for-new-Cargo-lints.patch | 287 ++++++++++++++++++
 ...hygiene-encoding-order-deterministic.patch |  59 ----
 ...native-sysroot-L-when-cross-building.patch |  49 +++
 ...se-thread-local-in-c_str_alloc_error.patch |  64 ++++
 ...bject-names-relative-to-source-roots.patch |  40 ++-
 ...bstd-rs_1.99.1.bb => libstd-rs_1.100.0.bb} |  10 +-
 ...99.1.bb => rust-cross-canadian_1.100.0.bb} |   0
 recipes-devtools/rust/rust-snapshot.inc       | 104 +++----
 recipes-devtools/rust/rust-source.inc         |   9 +-
 ...ource_1.99.1.bb => rust-source_1.100.0.bb} |   0
 .../rust/{rust_1.99.1.bb => rust_1.100.0.bb}  |  18 ++
 recipes-gnome/librsvg/librsvg_2.63.4.bb       |   2 +-
 20 files changed, 544 insertions(+), 227 deletions(-)
 rename recipes-devtools/rust/{cargo_1.99.1.bb => cargo_1.100.0.bb} (100%)
 delete mode 100644 recipes-devtools/rust/files/0003-bootstrap-skip-StdarchVerify-when-remote-testing.patch
 rename recipes-devtools/rust/files/{0004-cargo-omit-host-triple-from-unit-metadata-hash.patch => 0003-cargo-omit-host-triple-from-unit-metadata-hash.patch} (100%)
 create mode 100644 recipes-devtools/rust/files/0004-Re-bless-tests-adjust-for-new-Cargo-lints.patch
 delete mode 100644 recipes-devtools/rust/files/0005-rustc-span-make-hygiene-encoding-order-deterministic.patch
 create mode 100644 recipes-devtools/rust/files/0005-rustc_llvm-drop-native-sysroot-L-when-cross-building.patch
 create mode 100644 recipes-devtools/rust/files/0006-alloctests-use-thread-local-in-c_str_alloc_error.patch
 rename recipes-devtools/rust/{libstd-rs_1.99.1.bb => libstd-rs_1.100.0.bb} (77%)
 rename recipes-devtools/rust/{rust-cross-canadian_1.99.1.bb => rust-cross-canadian_1.100.0.bb} (100%)
 rename recipes-devtools/rust/{rust-source_1.99.1.bb => rust-source_1.100.0.bb} (100%)
 rename recipes-devtools/rust/{rust_1.99.1.bb => rust_1.100.0.bb} (92%)
Signature · 1 line
2.56.1
#1 lore raw

PATCH 1/10 rust-target-config.bbclass: Add i128:128 to mips64 data layouts

From: Michal Sieron <[email protected]>

LLVM 22 added i128:128 to the default MIPS64 data layout. rustc rejects a target spec whose data-layout differs from the one LLVM reports, so building libstd for mips64 fails:

error: data-layout for target mips64-octeon2-linux-gnu, E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128, differs from LLVM target's mips64-octeon2-linux-gnu default layout, E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128

Add i128:128 to the mips64 and mips64el entries to match, as already done for the other 64-bit architectures. mips64-n32 is left alone.

AI-Generated: Uses Cursor

(adapted from oe-core commit 781e3a54a8cf13c092fd68c46cd87d80ca8679f0)

---
 classes-recipe/rust-target-config.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
classes-recipe/rust-target-config.bbclass +2 -2
index fee19a1..1faaaef 100644
@@ -225,7 +225,7 @@ TARGET_C_INT_WIDTH[mipsel] = "32"
 MAX_ATOMIC_WIDTH[mipsel] = "32"
 
 ## mips64-unknown-linux-{gnu, musl}
-DATA_LAYOUT[mips64] = "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"
+DATA_LAYOUT[mips64] = "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
 TARGET_ENDIAN[mips64] = "big"
 TARGET_POINTER_WIDTH[mips64] = "64"
 TARGET_C_INT_WIDTH[mips64] = "32"
@@ -239,7 +239,7 @@ TARGET_C_INT_WIDTH[mips64-n32] = "32"
 MAX_ATOMIC_WIDTH[mips64-n32] = "64"
 
 ## mips64el-unknown-linux-{gnu, musl}
-DATA_LAYOUT[mips64el] = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"
+DATA_LAYOUT[mips64el] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
 TARGET_ENDIAN[mips64el] = "little"
 TARGET_POINTER_WIDTH[mips64el] = "64"
 TARGET_C_INT_WIDTH[mips64el] = "32"
Signature · 1 line
2.56.1
#2 lore raw

PATCH 2/10 rust-target-config.bbclass: Set llvm-abiname for mips64 targets

In reply to Scott Murray

From: Michal Sieron <[email protected]>

Recent rustc requires 64-bit MIPS target specs to name the LLVM ABI and fails the build of libstd otherwise:

error: LLVM ABI must be specified for 64-bit MIPS targets

Set llvm-abiname to n64 for mips64 and mips64el, and to n32 for the mips64-n32 variant, matching the ABIs the data layouts already describe.

AI-Generated: Uses Cursor

(adapted from oe-core commit 9518ce9aa2a6cbce678895ef9a95cd27939dae2a)

---
 classes-recipe/rust-target-config.bbclass | 4 ++++
 1 file changed, 4 insertions(+)
classes-recipe/rust-target-config.bbclass +4 -0
index 1faaaef..2faecd5 100644
@@ -418,6 +418,10 @@ def rust_gen_target(d, thing, wd, arch):
         tspec['llvm-abiname'] = d.getVar('TUNE_RISCV_ABI')
     if "loongarch64" in tspec['llvm-target']:
         tspec['llvm-abiname'] = "lp64d"
+    if arch_abi == "mips64-n32":
+        tspec['llvm-abiname'] = "n32"
+    elif rust_arch in ("mips64", "mips64el"):
+        tspec['llvm-abiname'] = "n64"
     if "powerpc64le" in tspec['llvm-target']:
         tspec['llvm-abiname'] = "elfv2"
     elif "powerpc64" in tspec['llvm-target']:
Signature · 1 line
2.56.1
#3 lore raw

PATCH 3/10 rust: add rust-analyzer to the SDK behind a PACKAGECONFIG

In reply to Scott Murray

From: Benhur Tessele <[email protected]>

Add a rust-analyzer PACKAGECONFIG option which, when enabled, installs it for the nativesdk variant and packages it as rust-tools-analyzer. The option is disabled by default.

Two additional pieces are required for the tool to be usable:

- The proc-macro server, rust-analyzer-proc-macro-srv, which rust-analyzer looks up under <sysroot>/libexec. Install it into ${libexecdir}; without it, analysis of any crate using a derive or attribute macro fails with "cannot find proc-macro server in sysroot".

- The standard library sources, which rust-analyzer analyses from source rather than from the compiled rlibs. Add an RDEPENDS on ${PN}-src-lib so that core/std items resolve.

Both binaries link against librustc_driver from the main package, so the package also RDEPENDS on ${PN}.

rust-analyzer is only installed for nativesdk, as a language server is used on the SDK host rather than on a target device.

To get it into an SDK:

SDK_FEATURES:append = " rust" PACKAGECONFIG:append:pn-nativesdk-rust = " rust-analyzer" TOOLCHAIN_HOST_TASK:append = " nativesdk-rust-tools-analyzer"

Tested by building an SDK with the option enabled and confirming rust-analyzer resolves the standard library and expands proc-macros, and by building with the option disabled to confirm the default configuration is unaffected.

AI-Generated: Kiro with Claude Opus 5

(adapted from oe-core commit bfeb93bd978c1f03947a90b137bb9237807cc842)

---
 recipes-devtools/rust/rust_1.99.1.bb | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
recipes-devtools/rust/rust_1.99.1.bb +18 -0
index 4fa6f1a..5933578 100644
@@ -24,6 +24,8 @@ RDEPENDS:${PN}:append:class-target = " gcc g++ binutils"
 
 PACKAGECONFIG ??= "llvm-shared"
 PACKAGECONFIG[llvm-shared] = ",,,"
+# Only used by the nativesdk variant; rust-analyzer runs on the SDK host
+PACKAGECONFIG[rust-analyzer] = ",,,"
 
 S = "${RUSTSRC}"
 # Separate build directory from the shared source tree so that multiple
@@ -282,17 +284,21 @@ do_test_compile () {
 ALLOW_EMPTY:${PN} = "1"
 
 PACKAGES =+ "${PN}-rustdoc ${PN}-tools-clippy ${PN}-tools-rustfmt ${PN}-src-lib"
+PACKAGES:prepend:class-nativesdk = "${@bb.utils.contains('PACKAGECONFIG', 'rust-analyzer', '${PN}-tools-analyzer ', '', d)}"
 FILES:${PN}-rustdoc = "${bindir}/rustdoc"
 FILES:${PN}-tools-clippy = "${bindir}/cargo-clippy ${bindir}/clippy-driver"
 FILES:${PN}-tools-rustfmt = "${bindir}/rustfmt"
+FILES:${PN}-tools-analyzer = "${bindir}/rust-analyzer ${libexecdir}/rust-analyzer-proc-macro-srv"
 FILES:${PN}-src-lib = "${libdir}/rustlib/src/rust"
 
 RDEPENDS:${PN}-rustdoc = "${PN}"
 RDEPENDS:${PN}-tools-clippy = "${PN}"
 RDEPENDS:${PN}-tools-rustfmt = "${PN}"
+RDEPENDS:${PN}-tools-analyzer = "${PN} ${PN}-src-lib"
 
 SUMMARY:${PN}-tools-clippy = "A collection of lints to catch common mistakes and improve your Rust code"
 SUMMARY:${PN}-tools-rustfmt = "A tool for formatting Rust code according to style guidelines"
+SUMMARY:${PN}-tools-analyzer = "A language server providing IDE features for Rust"
 
 do_install () {
     rust_do_install
@@ -314,6 +320,10 @@ rust_do_install:class-nativesdk() {
     rust_runx install
     rust_runx install clippy
     rust_runx install rustfmt
+    if ${@bb.utils.contains('PACKAGECONFIG', 'rust-analyzer', 'true', 'false', d)}; then
+        rust_runx install rust-analyzer
+        rust_runx build rust-analyzer-proc-macro-srv
+    fi
     unset PSEUDO_UNLOAD
 
     install -d ${D}${bindir}
@@ -322,6 +332,14 @@ rust_do_install:class-nativesdk() {
         patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/$i
     done
 
+    if ${@bb.utils.contains('PACKAGECONFIG', 'rust-analyzer', 'true', 'false', d)}; then
+        install -d ${D}${libexecdir}
+        cp rust-build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/rust-analyzer ${D}${bindir}
+        patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/rust-analyzer
+        cp rust-build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/rust-analyzer-proc-macro-srv ${D}${libexecdir}
+        patchelf --set-rpath "\$ORIGIN/../lib" ${D}${libexecdir}/rust-analyzer-proc-macro-srv
+    fi
+
     chown root:root ${D}/ -R
     rm ${D}${libdir}/rustlib/uninstall.sh
     rm ${D}${libdir}/rustlib/install.log
Signature · 1 line
2.56.1
#4 lore raw

PATCH 4/10 rust: Upgrade 1.99.1 -> 1.100.0

In reply to Scott Murray

From: Hemanth Kumar M D <[email protected]>

Rust Changes:
https://github.com/rust-lang/rust/releases/tag/1.100.0

Cargo Changes:
https://doc.rust-lang.org/nightly/cargo/CHANGELOG.html

Update local patches:
0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch cc-hash-object-names-relative-to-source-roots.patch

Drop merged patches:
0003-bootstrap-skip-StdarchVerify-when-remote-testing.patch 0005-rustc-span-make-hygiene-encoding-order-deterministic.patch

Backport 0004-Re-bless-tests-adjust-for-new-Cargo-lints.patch to fix do_install with the new cargo lints [1].

libstd-rs: cargo now uses a new directory layout [2]. Each crate's artifacts are in build/<crate>/<hash>/out/ and deps/ is no longer created, so update do_install to copy the libraries from there.

oe-selftest: exclude only the baseline revision of tests/ui/asm/arm-high-dregs.rs. It expects an error for the d16 register on an armv7 target without neon. OE's default configuration for qemuarm (tune-cortexa15.inc, DEFAULTTUNE cortexa15thf-neon) enables neon, so the expected error is not emitted [3].

Excluded tests:

+---------+---------+---------+
| Before  |  After  | Skipped |
+---------+---------+---------+
|   44    |   45    |   +1    |
+---------+---------+---------+

[1] https://github.com/rust-lang/cargo/pull/17298
[2] https://github.com/rust-lang/cargo/pull/17354
[3] https://github.com/rust-lang/rust/blob/1.100.0/tests/ui/asm/arm-high-dregs.rs

Test results:

rust v1.100.0 (from autobuilder)

+-------------+---------+---------+
| Machine     | Passed  | Skipped |
+-------------+---------+---------+
| qemux86-64  |  24201  |  1083   |
| qemux86     |  23934  |  1352   |
| qemuarm     |  23914  |  1371   |
| qemuarm64   |  24028  |  1258   |
| qemuriscv64 |  23969  |  1315   |
+-------------+---------+---------+

Test results difference (1.100.0 - 1.99.1):

+-------------+--------+---------+
| Machine     | Passed | Skipped |
+-------------+--------+---------+
| qemux86-64  |  +510  |   +61   |
| qemux86     |  +506  |   +67   |
| qemuarm     |  +506  |   +66   |
| qemuarm64   |  +506  |   +67   |
| qemuriscv64 |  +505  |   +66   |
+-------------+--------+---------+

(adapted from oe-core commit fae96382d70aeb58de3a668edd53368693ef609c)

---
 conf/layer.conf                               |   4 +-
 lib/oeqa/selftest/cases/rust_mixin.py         |   1 +
 .../{cargo_1.99.1.bb => cargo_1.100.0.bb}     |   0
 ...teps-tool.rs-switch-off-lto-for-rust.patch |  27 +-
 ...ip-StdarchVerify-when-remote-testing.patch |  30 --
 ...host-triple-from-unit-metadata-hash.patch} |   0
 ...ess-tests-adjust-for-new-Cargo-lints.patch | 287 ++++++++++++++++++
 ...hygiene-encoding-order-deterministic.patch |  59 ----
 ...bject-names-relative-to-source-roots.patch |  40 ++-
 ...bstd-rs_1.99.1.bb => libstd-rs_1.100.0.bb} |  10 +-
 ...99.1.bb => rust-cross-canadian_1.100.0.bb} |   0
 recipes-devtools/rust/rust-snapshot.inc       | 104 +++----
 recipes-devtools/rust/rust-source.inc         |   7 +-
 ...ource_1.99.1.bb => rust-source_1.100.0.bb} |   0
 .../rust/{rust_1.99.1.bb => rust_1.100.0.bb}  |   0
 15 files changed, 385 insertions(+), 184 deletions(-)
 rename recipes-devtools/rust/{cargo_1.99.1.bb => cargo_1.100.0.bb} (100%)
 delete mode 100644 recipes-devtools/rust/files/0003-bootstrap-skip-StdarchVerify-when-remote-testing.patch
 rename recipes-devtools/rust/files/{0004-cargo-omit-host-triple-from-unit-metadata-hash.patch => 0003-cargo-omit-host-triple-from-unit-metadata-hash.patch} (100%)
 create mode 100644 recipes-devtools/rust/files/0004-Re-bless-tests-adjust-for-new-Cargo-lints.patch
 delete mode 100644 recipes-devtools/rust/files/0005-rustc-span-make-hygiene-encoding-order-deterministic.patch
 rename recipes-devtools/rust/{libstd-rs_1.99.1.bb => libstd-rs_1.100.0.bb} (77%)
 rename recipes-devtools/rust/{rust-cross-canadian_1.99.1.bb => rust-cross-canadian_1.100.0.bb} (100%)
 rename recipes-devtools/rust/{rust-source_1.99.1.bb => rust-source_1.100.0.bb} (100%)
 rename recipes-devtools/rust/{rust_1.99.1.bb => rust_1.100.0.bb} (100%)
conf/layer.conf +2 -2
index b563428..0a00792 100644
@@ -13,8 +13,8 @@ LAYERSERIES_COMPAT_wrynose-rust-mixin = "wrynose"
 
 LAYERDEPENDS_wrynose-rust-mixin = "core"
 
-RUSTVERSION ?= "1.99.1%"
+RUSTVERSION ?= "1.100.0%"
 
 # For lack of a better place to put this since it needs to be visible
 # globally, carry it here.
-RECIPE_MAINTAINER:pn-rust-source-1.99.1 = "Deepesh Varatharajan <[email protected]>"
+RECIPE_MAINTAINER:pn-rust-source-1.100.0 = "Deepesh Varatharajan <[email protected]>"
lib/oeqa/selftest/cases/rust_mixin.py +1 -0
index 645b5d5..03af983 100644
@@ -93,6 +93,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
                             'tests/rustdoc-js-std',
                             'tests/ui/abi/stack-probes-lto.rs',
                             'tests/ui/abi/stack-probes.rs',
+                            'tests/ui/asm/arm-high-dregs.rs#baseline',
                             'tests/ui/codegen/huge-stacks.rs',
                             'tests/ui/codegen/mismatched-data-layouts.rs',
                             'tests/codegen-llvm/rust-abi-arch-specific-adjustment.rs',
recipes-devtools/rust/cargo_1.100.0.bb renamed from recipes-devtools/rust/cargo_1.99.1.bb +0 -0
similarity index 100%
rename from recipes-devtools/rust/cargo_1.99.1.bb
rename to recipes-devtools/rust/cargo_1.100.0.bb
recipes-devtools/rust/files/0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch +17 -10
index 0bd32ec..7482c2a 100644
@@ -18,17 +18,21 @@ Upstream-Status: Inappropriate [reported at https://github.com/rust-lang/rust/is
 Signed-off-by: Alexander Kanavin <[email protected]>
 Signed-off-by: Deepesh Varatharajan <[email protected]>
 ---
- src/bootstrap/src/core/build_steps/tool.rs | 19 +++----------------
+ src/bootstrap/src/core/build_steps/tool.rs | 22 ++++------------------
  src/bootstrap/src/core/builder/mod.rs      |  2 +-
- 2 files changed, 4 insertions(+), 17 deletions(-)
+ 2 files changed, 5 insertions(+), 19 deletions(-)
 
+diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs
+index c4fae69..7c4e230 100644
 --- a/src/bootstrap/src/core/build_steps/tool.rs
 +++ b/src/bootstrap/src/core/build_steps/tool.rs
-@@ -13,14 +13,13 @@
+@@ -13,16 +13,16 @@ use std::ffi::OsStr;
  use std::path::{Path, PathBuf};
  use std::{env, fs};
  
--use crate::core::build_steps::compile::is_lto_stage;
+-use crate::core::build_steps::compile::{CargoMessage, is_lto_stage};
++use crate::core::build_steps::compile::CargoMessage;
+ use crate::core::build_steps::dist::LLD_FILE_NAMES;
  use crate::core::build_steps::toolstate::ToolState;
  use crate::core::build_steps::{compile, llvm};
  use crate::core::builder::{
@@ -36,12 +40,13 @@ Signed-off-by: Deepesh Varatharajan <[email protected]>
 -    StepMetadata, apply_pgo, cargo_profile_var,
 +    StepMetadata, apply_pgo,
  };
+ use crate::core::compiler::Compiler;
 -use crate::core::config::{Allocator, DebuginfoLevel, RustcLto, TargetSelection};
 +use crate::core::config::{Allocator, DebuginfoLevel, TargetSelection};
+ use crate::core::session::{FileType, Mode};
  use crate::utils::exec::{BootstrapCommand, command};
  use crate::utils::helpers::{self, add_dylib_path, exe, t};
- use crate::{Compiler, FileType, Mode};
-@@ -117,21 +116,7 @@
+@@ -121,21 +121,7 @@ impl Step for ToolBuild {
              cargo.env("RUSTC_WRAPPER", ccache);
          }
  
@@ -64,14 +69,16 @@ Signed-off-by: Deepesh Varatharajan <[email protected]>
  
          let pgo_config = match self.path {
              "src/tools/rustdoc" => Some(&builder.config.rustdoc_pgo),
+diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs
+index c221a97..4af0fda 100644
 --- a/src/bootstrap/src/core/builder/mod.rs
 +++ b/src/bootstrap/src/core/builder/mod.rs
-@@ -13,7 +13,7 @@
+@@ -13,7 +13,7 @@ use clap::ValueEnum;
  #[cfg(feature = "tracing")]
  use tracing::instrument;
  
--pub use self::cargo::{Cargo, apply_pgo, cargo_profile_var};
-+pub use self::cargo::{Cargo, apply_pgo};
- pub use crate::Compiler;
+-pub(crate) use self::cargo::{Cargo, apply_pgo, cargo_profile_var};
++pub(crate) use self::cargo::{Cargo, apply_pgo};
  use crate::core::build_steps::compile::{Std, StdLink, looks_like_codegen_backend};
+ use crate::core::build_steps::llvm::{LlvmKind, get_llvm_build_status};
  use crate::core::build_steps::tool::RustcPrivateCompilers;
recipes-devtools/rust/files/0003-bootstrap-skip-StdarchVerify-when-remote-testing.patch deleted +0 -30
deleted file mode 100644
index a57765f..0000000
@@ -1,30 +0,0 @@
-From ca4541f4241f48f8344bc8b8dd7fcbb476ea6900 Mon Sep 17 00:00:00 2001
-From: Deepesh Varatharajan <[email protected]>
-Date: Wed, 26 Aug 2026 03:49:52 -0700
-Subject: [PATCH] bootstrap: skip StdarchVerify when remote testing is enabled
-
-When TEST_DEVICE_ADDR is set for cross-testing, the StdarchVerify step
-incorrectly attempts to run on the remote target. Since stdarch-verify
-is a host-only verification tool, skip it when remote testing is enabled.
-
-Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/ca4541f4241f48f8344bc8b8dd7fcbb476ea6900]
-Signed-off-by: Deepesh Varatharajan <[email protected]>
-
-diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
-index a2d05f8..3753aec 100644
---- a/src/bootstrap/src/core/build_steps/test.rs
-+++ b/src/bootstrap/src/core/build_steps/test.rs
-@@ -962,7 +962,12 @@ impl Step for StdarchVerify {
-     }
-
-     fn make_run(run: RunConfig<'_>) {
--        run.builder.ensure(StdarchVerify);
-+        let builder = run.builder;
-+        if builder.remote_tested(run.target) {
-+            builder.info("remote testing is not supported by stdarch-verify. skipping");
-+            return;
-+        }
-+        builder.ensure(StdarchVerify);
-     }
-
-     fn run(self, builder: &Builder<'_>) {
recipes-devtools/rust/files/0003-cargo-omit-host-triple-from-unit-metadata-hash.patch renamed from recipes-devtools/rust/files/0004-cargo-omit-host-triple-from-unit-metadata-hash.patch +0 -0
similarity index 100%
rename from recipes-devtools/rust/files/0004-cargo-omit-host-triple-from-unit-metadata-hash.patch
rename to recipes-devtools/rust/files/0003-cargo-omit-host-triple-from-unit-metadata-hash.patch
recipes-devtools/rust/files/0004-Re-bless-tests-adjust-for-new-Cargo-lints.patch new file +287 -0

287 lines not on this page · raw message

recipes-devtools/rust/files/0005-rustc-span-make-hygiene-encoding-order-deterministic.patch deleted +0 -59

59 lines not on this page · raw message

recipes-devtools/rust/files/cc-hash-object-names-relative-to-source-roots.patch +18 -22
index c128bd7..e0218bf 100644
@@ -15,7 +15,7 @@ CARGO_MANIFEST_DIR as upstream already did.
 
 The OUT_DIR part is generic and is merged upstream as rust-lang/cc-rs
 commit fe27e7b6262, in a slightly different shape: the upstream tree
-moved on from the cc 1.2.0 that rust vendors, so the change here keeps
+moved on from the cc 1.4.3 that rust vendors, so the change here keeps
 the form that fits these sources. RUST_COMPILER_RT_ROOT is set by
 rust's own build system, so that part stays local to this patch.
 
@@ -23,38 +23,34 @@ Upstream-Status: Backport [https://github.com/rust-lang/cc-rs/commit/fe27e7b6262
 
 Signed-off-by: Sunil Dora <[email protected]>
 ---
- vendor/cc-1.2.0/.cargo-checksum.json   |  2 +-
- vendor/cc-1.2.0/src/command_helpers.rs | 18 +++++++++++++++---
+ vendor/cc-1.4.3/.cargo-checksum.json   |  2 +-
+ vendor/cc-1.4.3/src/command_helpers.rs | 18 +++++++++++++++---
  2 files changed, 16 insertions(+), 4 deletions(-)
 
-diff --git a/vendor/cc-1.2.0/.cargo-checksum.json b/vendor/cc-1.2.0/.cargo-checksum.json
-index 470ecbb..2ff8a08 100644
---- a/vendor/cc-1.2.0/.cargo-checksum.json
-+++ b/vendor/cc-1.2.0/.cargo-checksum.json
+diff --git a/vendor/cc-1.4.3/.cargo-checksum.json b/vendor/cc-1.4.3/.cargo-checksum.json
+index cc4144e..a8ab1fc 100644
+--- a/vendor/cc-1.4.3/.cargo-checksum.json
++++ b/vendor/cc-1.4.3/.cargo-checksum.json
 @@ -1 +1 @@
--{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"d6e26674a9d7de87dab83262a14f2377988a1e087e4b514f3983f8dd141ea813","CHANGELOG.md":"fb0a3bcb34301d2578bef86feabe93057068cb1906a7f10b584f58ff6123e8c6","Cargo.lock":"b661254fadca74408d53742755b371f7ae29e501e851aeae13bcd14a51883321","Cargo.toml":"50debe1b2fc050e8b305bdd514509d98cdbc59e96e5f10888df4b6fca19d3a75","Cargo.toml.orig":"0aff9dc74ddbe3bfe89ad9698212a6a18d6124b9593780aad25e277d28e9a71f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"f1ddbede208a5b78333a25dac0a7598e678e9b601a7d99a791069bddaf180dfe","clippy.toml":"aa7850db4350883c8f373bd0d6b4d19bf3b75f13c1c238e24368c109cb52fb1d","src/command_helpers.rs":"b766a70e39b8ea7bb57afd288bcac205a23f6a26ac5619cb1d5b10f70c5dfdea","src/detect_compiler_family.c":"97ca4b021495611e828becea6187add37414186a16dfedd26c2947cbce6e8b2f","src/lib.rs":"221ba9475100303b5c694b2a02e5353452ee08a29e4e4d4d67ea8fcbd87605df","src/parallel/async_executor.rs":"4ce24435fff6b6555b43fee042c16bd65d4150d0346567f246b9190d85b45983","src/parallel/job_token.rs":"018a01cb00182270bbcb68e31e7a7c5c621a95f086e4c68cfa2bf557ac24e5f2","src/parallel/mod.rs":"bd9c1334d17d138c281961c690b8d8118a2d6295a7d6cd7296826255436fa063","src/parallel/stderr.rs":"74384d41198740a6fce0877f144262db09fb091225fa8fbfa771314bb11487c6","src/target.rs":"7313240db078ad85c1209a42a5fa96c3692b5d6e5093c7f366a1b99677247109","src/target/apple.rs":"6afbecac9f66aa72db55694413532f80b2753f28466a6213d1aa901a03c78bcd","src/target/generated.rs":"af067e1c291e895ddb591f92534eed0c48977cdb2b58f8239423e07c6de31cd3","src/target/llvm.rs":"e1db4a7fb8b905ee9853781f2fcc64a9d3b48154e4c8b6cb12f5373c5935da6e","src/target/parser.rs":"4f2129a24273d62bf8ab339098e7f758e4e42b0df369dd2b0eb1b20726be91f8","src/tempfile.rs":"ebafb5b0e5d08b0706916ed911d4245240e60c3e2d0c9a1630c520842988a2b3","src/tool.rs":"2e6550062e021f2b394388172bbb01e86fe6a94d2395bcb3c85a9e86690da1a9","src/utilities.rs":"52b30b24a1c31cdefb105309ee5220cfc9fca76eaf4e6d6509c3e19f431448fe","src/windows/com.rs":"a2800ddb81215fff2bf618336f5c4ff8e8bdb746dd18b795873c7304b3f2a5e3","src/windows/find_tools.rs":"0ff410bd71f08ee88e99609c15be5f1bc16ad7bd07a83918d13a70c8465642e2","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":"1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8"}
+-{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"067dd1727a66bb81a833e7ff9ed732d0a26c4dfb6f78600884cf20cc766b379e",".tombi.toml":"93f57361f60b03b6c14ede301446e5e2658abaa98cac39a4a96be0966b6b851a","CHANGELOG.md":"7e2c9bec874d564ceeedfa88587ab86f45d8a3d3df4a6f6ef19ad3db3997d74e","Cargo.lock":"f309ad15b2b17d7ff090e11005112ad2ed04495da92d8d11f758adb69c87d273","Cargo.toml":"c424f930665aa062f43c448c2837c98f9aad434a95cce4400605b0f2af7c820e","Cargo.toml.orig":"d1fc79a63899b64a816fe5595b403c27ade4612ea58c0e88556c05d307b431f0","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"cc952a506dc726eed3e128d47d62defbac4470bbb0e465f6a043ae8bf0c96d19","clippy.toml":"cf46251b0953d1a3c7a4f8f8941a08d8a416d5fc348dfe3f3c520eb93fcc18ea","src/command_helpers.rs":"650c9682edc3d7732249e327c1026c7cc733f3702f4867b9580223e97522d3c6","src/detect_compiler_family.c":"97ca4b021495611e828becea6187add37414186a16dfedd26c2947cbce6e8b2f","src/flags.rs":"1a80855f51db6808cdcb5c0e6bd1c0973e86463014082ef7ed1d0fbe7b89cf93","src/lib.rs":"61391623eed3591d6d06977867b7a772348daa1385c1fefd8e82ab8e9adbc71b","src/parallel/async_executor.rs":"4ce24435fff6b6555b43fee042c16bd65d4150d0346567f246b9190d85b45983","src/parallel/command_runner.rs":"1d17d9a037de93b31cc7ee6a914a1e1f6c1ac156cf8619f0014dcbaca6a0b215","src/parallel/job_token.rs":"1aa1ecc639e09845eea0f1e11a76c39ad2604eaac3268059652f56add8890089","src/parallel/mod.rs":"bf156170790d40a76015a8c78cc2a391cbe1b60bb96c1fac1d047d26e342386a","src/parallel/stderr.rs":"b68d728087667fd568921d61cd40d0dc6b56c59bde6e671cb50cb0c43dcdf56d","src/target.rs":"a9d2d347a3a08015531f00b32bc8a7478f5636822cc8e0237ea9efa3f07d4cd4","src/target/apple.rs":"da9411b2c4db419e0fa39f765ee53b8665b3837fb39827679a53238734a4a1c1","src/target/generated.rs":"f93008829c57e9da3f5d6ac84643c04d8438a319fe9517533604dfe47e9cb8d7","src/target/llvm.rs":"525680a605fb57e038c3103d3efc9201c1af7b99162adf5dbc399da1d5007efe","src/target/parser.rs":"5ea311fc57b6a6d1aecd7e5433ee5f79b403b58e40be18650fdd81cf514614cb","src/tempfile.rs":"77963fe55b63d3a30cccae46f763b8d61ed722247fe208e8485858770f6a67f7","src/tool.rs":"52a7bc134154fde7fecb1ef691f0179eb617e2f17a10d71dfa71afbcb061555b","src/utilities.rs":"ebb59ac01fb9588bcea0d0ee786e5d5a5696b4284a1245657625db03e830b72e"},"package":"509591b7bcd67f4ef775afad7662703b4935daaa6ec0e5605cfb1090b32a2b6d"}
 \ No newline at end of file
-+{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"d6e26674a9d7de87dab83262a14f2377988a1e087e4b514f3983f8dd141ea813","CHANGELOG.md":"fb0a3bcb34301d2578bef86feabe93057068cb1906a7f10b584f58ff6123e8c6","Cargo.lock":"b661254fadca74408d53742755b371f7ae29e501e851aeae13bcd14a51883321","Cargo.toml":"50debe1b2fc050e8b305bdd514509d98cdbc59e96e5f10888df4b6fca19d3a75","Cargo.toml.orig":"0aff9dc74ddbe3bfe89ad9698212a6a18d6124b9593780aad25e277d28e9a71f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"f1ddbede208a5b78333a25dac0a7598e678e9b601a7d99a791069bddaf180dfe","clippy.toml":"aa7850db4350883c8f373bd0d6b4d19bf3b75f13c1c238e24368c109cb52fb1d","src/command_helpers.rs":"010873ba1ab0ea4b7e3b5eac72aed5f50e535d42cb94da943d2aa3d74904aa0f","src/detect_compiler_family.c":"97ca4b021495611e828becea6187add37414186a16dfedd26c2947cbce6e8b2f","src/lib.rs":"221ba9475100303b5c694b2a02e5353452ee08a29e4e4d4d67ea8fcbd87605df","src/parallel/async_executor.rs":"4ce24435fff6b6555b43fee042c16bd65d4150d0346567f246b9190d85b45983","src/parallel/job_token.rs":"018a01cb00182270bbcb68e31e7a7c5c621a95f086e4c68cfa2bf557ac24e5f2","src/parallel/mod.rs":"bd9c1334d17d138c281961c690b8d8118a2d6295a7d6cd7296826255436fa063","src/parallel/stderr.rs":"74384d41198740a6fce0877f144262db09fb091225fa8fbfa771314bb11487c6","src/target.rs":"7313240db078ad85c1209a42a5fa96c3692b5d6e5093c7f366a1b99677247109","src/target/apple.rs":"6afbecac9f66aa72db55694413532f80b2753f28466a6213d1aa901a03c78bcd","src/target/generated.rs":"af067e1c291e895ddb591f92534eed0c48977cdb2b58f8239423e07c6de31cd3","src/target/llvm.rs":"e1db4a7fb8b905ee9853781f2fcc64a9d3b48154e4c8b6cb12f5373c5935da6e","src/target/parser.rs":"4f2129a24273d62bf8ab339098e7f758e4e42b0df369dd2b0eb1b20726be91f8","src/tempfile.rs":"ebafb5b0e5d08b0706916ed911d4245240e60c3e2d0c9a1630c520842988a2b3","src/tool.rs":"2e6550062e021f2b394388172bbb01e86fe6a94d2395bcb3c85a9e86690da1a9","src/utilities.rs":"52b30b24a1c31cdefb105309ee5220cfc9fca76eaf4e6d6509c3e19f431448fe","src/windows/com.rs":"a2800ddb81215fff2bf618336f5c4ff8e8bdb746dd18b795873c7304b3f2a5e3","src/windows/find_tools.rs":"0ff410bd71f08ee88e99609c15be5f1bc16ad7bd07a83918d13a70c8465642e2","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":"1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8"}
++{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"067dd1727a66bb81a833e7ff9ed732d0a26c4dfb6f78600884cf20cc766b379e",".tombi.toml":"93f57361f60b03b6c14ede301446e5e2658abaa98cac39a4a96be0966b6b851a","CHANGELOG.md":"7e2c9bec874d564ceeedfa88587ab86f45d8a3d3df4a6f6ef19ad3db3997d74e","Cargo.lock":"f309ad15b2b17d7ff090e11005112ad2ed04495da92d8d11f758adb69c87d273","Cargo.toml":"c424f930665aa062f43c448c2837c98f9aad434a95cce4400605b0f2af7c820e","Cargo.toml.orig":"d1fc79a63899b64a816fe5595b403c27ade4612ea58c0e88556c05d307b431f0","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"cc952a506dc726eed3e128d47d62defbac4470bbb0e465f6a043ae8bf0c96d19","clippy.toml":"cf46251b0953d1a3c7a4f8f8941a08d8a416d5fc348dfe3f3c520eb93fcc18ea","src/command_helpers.rs":"f878c574ad193473ef07d9b41afe4f7c27b735cc33492615a53c7a454aee3cc9","src/detect_compiler_family.c":"97ca4b021495611e828becea6187add37414186a16dfedd26c2947cbce6e8b2f","src/flags.rs":"1a80855f51db6808cdcb5c0e6bd1c0973e86463014082ef7ed1d0fbe7b89cf93","src/lib.rs":"61391623eed3591d6d06977867b7a772348daa1385c1fefd8e82ab8e9adbc71b","src/parallel/async_executor.rs":"4ce24435fff6b6555b43fee042c16bd65d4150d0346567f246b9190d85b45983","src/parallel/command_runner.rs":"1d17d9a037de93b31cc7ee6a914a1e1f6c1ac156cf8619f0014dcbaca6a0b215","src/parallel/job_token.rs":"1aa1ecc639e09845eea0f1e11a76c39ad2604eaac3268059652f56add8890089","src/parallel/mod.rs":"bf156170790d40a76015a8c78cc2a391cbe1b60bb96c1fac1d047d26e342386a","src/parallel/stderr.rs":"b68d728087667fd568921d61cd40d0dc6b56c59bde6e671cb50cb0c43dcdf56d","src/target.rs":"a9d2d347a3a08015531f00b32bc8a7478f5636822cc8e0237ea9efa3f07d4cd4","src/target/apple.rs":"da9411b2c4db419e0fa39f765ee53b8665b3837fb39827679a53238734a4a1c1","src/target/generated.rs":"f93008829c57e9da3f5d6ac84643c04d8438a319fe9517533604dfe47e9cb8d7","src/target/llvm.rs":"525680a605fb57e038c3103d3efc9201c1af7b99162adf5dbc399da1d5007efe","src/target/parser.rs":"5ea311fc57b6a6d1aecd7e5433ee5f79b403b58e40be18650fdd81cf514614cb","src/tempfile.rs":"77963fe55b63d3a30cccae46f763b8d61ed722247fe208e8485858770f6a67f7","src/tool.rs":"52a7bc134154fde7fecb1ef691f0179eb617e2f17a10d71dfa71afbcb061555b","src/utilities.rs":"ebb59ac01fb9588bcea0d0ee786e5d5a5696b4284a1245657625db03e830b72e"},"package":"509591b7bcd67f4ef775afad7662703b4935daaa6ec0e5605cfb1090b32a2b6d"}
 \ No newline at end of file
-diff --git a/vendor/cc-1.2.0/src/command_helpers.rs b/vendor/cc-1.2.0/src/command_helpers.rs
-index adedab2..c911306 100644
---- a/vendor/cc-1.2.0/src/command_helpers.rs
-+++ b/vendor/cc-1.2.0/src/command_helpers.rs
-@@ -315,13 +315,25 @@ pub(crate) fn objects_from_files(files: &[Arc<Path>], dst: &Path) -> Result<Vec<
+diff --git a/vendor/cc-1.4.3/src/command_helpers.rs b/vendor/cc-1.4.3/src/command_helpers.rs
+index 57c49f4..da92b69 100644
+--- a/vendor/cc-1.4.3/src/command_helpers.rs
++++ b/vendor/cc-1.4.3/src/command_helpers.rs
+@@ -308,9 +308,21 @@ pub(crate) fn objects_from_files(files: &[Arc<Path>], dst: &Path) -> Result<Vec<
  
          // Make the dirname relative (if possible) to avoid full system paths influencing the sha
          // and making the output system-dependent
-+        // compiler-builtins generates sources into OUT_DIR and reads the compiler-rt
-+        // intrinsics from RUST_COMPILER_RT_ROOT, so try those before the manifest dir
-         //
-         // NOTE: Here we allow using std::env::var (instead of Build::getenv) because
-         // CARGO_* variables always trigger a rebuild when changed
-         #[allow(clippy::disallowed_methods)]
--        let dirname = if let Some(root) = std::env::var_os("CARGO_MANIFEST_DIR") {
+-        let dirname = if let Some(root) = cargo_env_var_os("CARGO_MANIFEST_DIR") {
 -            let root = root.to_string_lossy();
 -            Cow::Borrowed(dirname.strip_prefix(&*root).unwrap_or(&dirname))
++        // compiler-builtins generates sources into OUT_DIR and reads the compiler-rt
++        // intrinsics from RUST_COMPILER_RT_ROOT, so try those before the manifest dir
 +        let strip_root = |var: &str| {
-+            std::env::var_os(var).and_then(|root| {
++            cargo_env_var_os(var).and_then(|root| {
 +                dirname
 +                    .strip_prefix(&*root.to_string_lossy())
 +                    .map(str::to_owned)
recipes-devtools/rust/libstd-rs_1.100.0.bb renamed from recipes-devtools/rust/libstd-rs_1.99.1.bb +5 -5
similarity index 77%
rename from recipes-devtools/rust/libstd-rs_1.99.1.bb
rename to recipes-devtools/rust/libstd-rs_1.100.0.bb
index 31d42a8..eb56bab 100644
@@ -42,11 +42,11 @@ do_compile:prepend () {
 do_install () {
     mkdir -p ${D}${rustlibdir}
 
-    # With the incremental build support added in 1.24, the libstd deps directory also includes dependency
-    # files that get installed. Those are really only needed to incrementally rebuild the libstd library
-    # itself and don't need to be installed.
-    rm -f ${B}/target/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d
-    cp ${B}/target/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir}
+    # Since cargo 1.100 the build-dir new layout is always enabled: each crate's
+    # artifacts are in build/<crate>/<hash>/out/ instead of deps/. The dependency
+    # files are only needed to incrementally rebuild libstd, don't install them.
+    rm -f ${B}/target/${RUST_TARGET_SYS}/${BUILD_DIR}/build/*/*/out/*.d
+    cp ${B}/target/${RUST_TARGET_SYS}/${BUILD_DIR}/build/*/*/out/* ${D}${rustlibdir}
 }
 
 BBCLASSEXTEND = "nativesdk"
recipes-devtools/rust/rust-cross-canadian_1.100.0.bb renamed from recipes-devtools/rust/rust-cross-canadian_1.99.1.bb +0 -0
similarity index 100%
rename from recipes-devtools/rust/rust-cross-canadian_1.99.1.bb
rename to recipes-devtools/rust/rust-cross-canadian_1.100.0.bb
recipes-devtools/rust/rust-snapshot.inc +52 -52

110 lines not on this page · raw message

recipes-devtools/rust/rust-source.inc +3 -4
index b384a0c..8b5b59b 100644
@@ -5,11 +5,10 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
             file://cc-hash-object-names-relative-to-source-roots.patch;patchdir=${RUSTSRC} \
             file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \
             file://0002-Fix-rust-build-failure-with-unstable-options.patch;patchdir=${RUSTSRC} \
-            file://0003-bootstrap-skip-StdarchVerify-when-remote-testing.patch;patchdir=${RUSTSRC} \
-            file://0004-cargo-omit-host-triple-from-unit-metadata-hash.patch;patchdir=${RUSTSRC} \
-            file://0005-rustc-span-make-hygiene-encoding-order-deterministic.patch;patchdir=${RUSTSRC} \
+            file://0003-cargo-omit-host-triple-from-unit-metadata-hash.patch;patchdir=${RUSTSRC} \
+            file://0004-Re-bless-tests-adjust-for-new-Cargo-lints.patch;patchdir=${RUSTSRC} \
 "
-SRC_URI[rust.sha256sum] = "6451598a99e77f07571960f6b21d577399d3a30f33e80cbd2e3a4aae6535d265"
+SRC_URI[rust.sha256sum] = "90dab90b8084eb57c35ae2b1d0b70c8e5138ace6023b22c60a5a400f586f63b2"
 
 # Point UNPACKDIR into the work-shared location so rust-source.bb and all
 # consumers (via S/RUSTSRC) reference a single shared source tree.
recipes-devtools/rust/rust-source_1.100.0.bb renamed from recipes-devtools/rust/rust-source_1.99.1.bb +0 -0
similarity index 100%
rename from recipes-devtools/rust/rust-source_1.99.1.bb
rename to recipes-devtools/rust/rust-source_1.100.0.bb
recipes-devtools/rust/rust_1.100.0.bb renamed from recipes-devtools/rust/rust_1.99.1.bb +0 -0
similarity index 100%
rename from recipes-devtools/rust/rust_1.99.1.bb
rename to recipes-devtools/rust/rust_1.100.0.bb
Signature · 1 line
2.56.1
#5 lore raw

PATCH 5/10 rust: drop native libLLVM path for non-host architectures

In reply to Scott Murray

From: Hemanth Kumar M D <[email protected]>

With the recent refactoring of the LLVM handling in rust bootstrap [1], the library search path of the native LLVM (recipe-sysroot-native/usr/lib) is added to the link of the target rustc_llvm when rustc is cross-built.

rustc_llvm/build.rs only adjusts these -L paths by replacing the host triple with the target triple. In OE the native and target sysroot paths do not contain a triple, so the native path is kept and the linker finds the native libLLVM before the target one. A linker that cannot read the native library fails with:

libLLVM-23.so: file not recognized: file format not recognized

Add a patch to drop -L paths that point into recipe-sysroot-native when cross-building. The target libLLVM is still found through the target --sysroot.

This is a workaround. The issue has been reported upstream [2] and the patch can be dropped once it is fixed there.

[1] https://github.com/rust-lang/rust/pull/161247
[2] https://github.com/rust-lang/rust/issues/165385

(adapted from oe-core commit 49c30208e9fc84bd8bf054ee7ffc853126fdd0bd)

---
 ...native-sysroot-L-when-cross-building.patch | 49 +++++++++++++++++++
 recipes-devtools/rust/rust-source.inc         |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 recipes-devtools/rust/files/0005-rustc_llvm-drop-native-sysroot-L-when-cross-building.patch
recipes-devtools/rust/files/0005-rustc_llvm-drop-native-sysroot-L-when-cross-building.patch new file +49 -0
new file mode 100644
index 0000000..8fd17c1
@@ -0,0 +1,49 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Hemanth Kumar M D <[email protected]>
+Date: Mon, 16 Nov 2026 03:14:17 -0800
+Subject: [PATCH] rustc_llvm: drop native sysroot -L when cross-building
+
+With the recent refactoring of the LLVM handling in rust bootstrap [1],
+the library search path of the native LLVM
+(recipe-sysroot-native/usr/lib) is added to the link of the target
+rustc_llvm when rustc is cross-built.
+
+rustc_llvm/build.rs only adjusts these -L paths by replacing the host
+triple with the target triple. In OE the native and target sysroot
+paths do not contain a triple, so the native path is kept and the
+linker finds the native libLLVM before the target one. A linker that
+cannot read the native library fails with:
+
+  libLLVM-23.so: file not recognized: file format not recognized
+
+Drop -L paths that point into recipe-sysroot-native when
+cross-building. The target libLLVM is still found through the target
+--sysroot.
+
+Upstream-Status: Inappropriate [https://github.com/rust-lang/rust/issues/165385]
+
+[1] https://github.com/rust-lang/rust/pull/161247
+
+Signed-off-by: Hemanth Kumar M D <[email protected]>
+---
+ compiler/rustc_llvm/build.rs | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
+index 450b98f..05ff9dc 100644
+--- a/compiler/rustc_llvm/build.rs
++++ b/compiler/rustc_llvm/build.rs
+@@ -452,7 +452,12 @@ fn main() {
+             if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
+                 println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target));
+             } else if let Some(stripped) = lib.strip_prefix("-L") {
+-                println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target));
++                // OE: the build-machine llvm-config reports a libdir in the
++                // native sysroot, which holds a wrong-arch libLLVM.
++                let rewritten = stripped.replace(&host, &target);
++                if !rewritten.contains("recipe-sysroot-native") {
++                    println!("cargo:rustc-link-search=native={rewritten}");
++                }
+             }
+         } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
+             println!("cargo:rustc-link-search=native={stripped}");
recipes-devtools/rust/rust-source.inc +1 -0
index 8b5b59b..ed779f3 100644
@@ -7,6 +7,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
             file://0002-Fix-rust-build-failure-with-unstable-options.patch;patchdir=${RUSTSRC} \
             file://0003-cargo-omit-host-triple-from-unit-metadata-hash.patch;patchdir=${RUSTSRC} \
             file://0004-Re-bless-tests-adjust-for-new-Cargo-lints.patch;patchdir=${RUSTSRC} \
+            file://0005-rustc_llvm-drop-native-sysroot-L-when-cross-building.patch;patchdir=${RUSTSRC} \
 "
 SRC_URI[rust.sha256sum] = "90dab90b8084eb57c35ae2b1d0b70c8e5138ace6023b22c60a5a400f586f63b2"
 
Signature · 1 line
2.56.1
#6 lore raw

PATCH 6/10 rust: Fix intermittent test failure

In reply to Scott Murray

From: Deepesh Varatharajan <[email protected]>

Fixes [YOCTO #16460]

Fix an intermittent test failure by backporting the upstream Rust commit.

https://github.com/rust-lang/rust/commit/a292cb16d5cfc32923be91c86afaf727682a38dc

(adapted from oe-core commit 5dbd586fa8a9ad1a5e0193986f1ed67e14b8c3ae)

---
 ...se-thread-local-in-c_str_alloc_error.patch | 64 +++++++++++++++++++
 recipes-devtools/rust/rust-source.inc         |  1 +
 2 files changed, 65 insertions(+)
 create mode 100644 recipes-devtools/rust/files/0006-alloctests-use-thread-local-in-c_str_alloc_error.patch
recipes-devtools/rust/files/0006-alloctests-use-thread-local-in-c_str_alloc_error.patch new file +64 -0
new file mode 100644
index 0000000..f213220
@@ -0,0 +1,64 @@
+From a292cb16d5cfc32923be91c86afaf727682a38dc Mon Sep 17 00:00:00 2001
+From: Jules Bertholet <[email protected]>
+Date: Mon, 16 Nov 2026 09:24:03 -0500
+Subject: [PATCH] alloctests: use thread-local in `c_str_alloc_error`
+
+Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/a292cb16d5cfc32923be91c86afaf727682a38dc]
+Signed-off-by: Deepesh Varatharajan <[email protected]>
+
+diff --git a/library/alloctests/tests/c_str_alloc_error.rs b/library/alloctests/tests/c_str_alloc_error.rs
+index 1e7d54d75b3..fc572169583 100644
+--- a/library/alloctests/tests/c_str_alloc_error.rs
++++ b/library/alloctests/tests/c_str_alloc_error.rs
+@@ -15,20 +15,22 @@
+ #![feature(alloc_error_hook)]
+ 
+ use std::alloc::{GlobalAlloc, Layout, System, set_alloc_error_hook};
++use std::cell::Cell;
+ use std::ffi::CString;
+ use std::panic::{AssertUnwindSafe, catch_unwind};
+-use std::sync::atomic::{AtomicBool, Ordering};
+ 
+ // Once armed, the first allocation of 8 bytes or more fails and disarms, so the
+ // reallocation inside `clone_into`'s grow path fails while the runtime's own
+ // smaller allocations keep succeeding.
+ struct OneShotFailingAlloc;
+ 
+-static ARMED: AtomicBool = AtomicBool::new(false);
++thread_local! {
++    static ARMED: Cell<bool> = const { Cell::new(false) };
++}
+ 
+ unsafe impl GlobalAlloc for OneShotFailingAlloc {
+     unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
+-        if layout.size() >= 8 && ARMED.swap(false, Ordering::SeqCst) {
++        if layout.size() >= 8 && ARMED.replace(false) {
+             return core::ptr::null_mut();
+         }
+         unsafe { System.alloc(layout) }
+@@ -39,7 +41,7 @@ unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
+     }
+ 
+     unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
+-        if new_size >= 8 && ARMED.swap(false, Ordering::SeqCst) {
++        if new_size >= 8 && ARMED.replace(false) {
+             return core::ptr::null_mut();
+         }
+         unsafe { System.realloc(ptr, layout, new_size) }
+@@ -59,11 +61,11 @@ fn clone_into_alloc_failure_leaves_target_valid() {
+     let src = CString::new("a fairly long value").unwrap();
+     let mut target = CString::new("x").unwrap();
+ 
+-    ARMED.store(true, Ordering::SeqCst);
++    ARMED.set(true);
+     // Under Miri the failing allocator is honored, so this reallocation unwinds; in a
+     // normal build the allocator can't intercept it and `clone_into` just succeeds.
+     let res = catch_unwind(AssertUnwindSafe(|| src.as_c_str().clone_into(&mut target)));
+-    ARMED.store(false, Ordering::SeqCst);
++    ARMED.set(false);
+ 
+     if cfg!(miri) {
+         assert!(res.is_err(), "clone_into should have unwound on the alloc failure");
+-- 
+2.49.0
+
recipes-devtools/rust/rust-source.inc +1 -0
index ed779f3..94a20a5 100644
@@ -8,6 +8,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
             file://0003-cargo-omit-host-triple-from-unit-metadata-hash.patch;patchdir=${RUSTSRC} \
             file://0004-Re-bless-tests-adjust-for-new-Cargo-lints.patch;patchdir=${RUSTSRC} \
             file://0005-rustc_llvm-drop-native-sysroot-L-when-cross-building.patch;patchdir=${RUSTSRC} \
+            file://0006-alloctests-use-thread-local-in-c_str_alloc_error.patch;patchdir=${RUSTSRC} \
 "
 SRC_URI[rust.sha256sum] = "90dab90b8084eb57c35ae2b1d0b70c8e5138ace6023b22c60a5a400f586f63b2"
 
Signature · 1 line
2.56.1
#7 lore raw

PATCH 7/10 rust-target-config.bbclass: pass on all RISC-V extensions to LLVM

In reply to Scott Murray

From: Trevor Gamblin <[email protected]>

llvm_features_from_tune() doesn't pass on all RISC-V extensions listed in TUNE_FEATURES, but rather has a fixed subset listed, and ignores others. This means that with new profiles and custom tunes, Rust code still gets compiled for riscv64gc plus a handful of extras.

LLVM's RISC-V extension names match those we use for TUNE_FEATURES, so we can instead pass on each extension in the same order.

(adapted from oe-core commit 3b78f64f23d9ad1e0c94943f4a180189a57474eb)

---
 classes-recipe/rust-target-config.bbclass | 34 ++++++-----------------
 1 file changed, 8 insertions(+), 26 deletions(-)
classes-recipe/rust-target-config.bbclass +8 -26
index 2faecd5..89fbd19 100644
@@ -83,32 +83,14 @@ def llvm_features_from_tune(d):
     if 'cortexa57' in feat:
         f.append("+v8a")
     if 'rv' in feat:
-        if 'm' in feat:
-            f.append("+m")
-        if 'a' in feat:
-            f.append("+a")
-        if 'f' in feat:
-            f.append("+f")
-        if 'd' in feat:
-            f.append("+d")
-        if 'c' in feat:
-            f.append("+c")
-        if 'v' in feat:
-            f.append("+v")
-        if 'zicbom' in feat:
-            f.append("+zicbom")
-        if 'zicsr' in feat:
-            f.append("+zicsr")
-        if 'zifencei' in feat:
-            f.append("+zifencei")
-        if 'zba' in feat:
-            f.append("+zba")
-        if 'zbb' in feat:
-            f.append("+zbb")
-        if 'zbc' in feat:
-            f.append("+zbc")
-        if 'zbs' in feat:
-            f.append("+zbs")
+        # LLVM uses the same names as TUNE_FEATURES for RISC-V extensions, so
+        # pass on every single-letter (except the base i) and z, s or x
+        # extension, in TUNE_FEATURES order to keep the result stable. Other
+        # tune flags (e.g. "rv", "64" or core names) aren't extensions.
+        for e in dict.fromkeys(d.getVar('TUNE_FEATURES').split()):
+            if (len(e) == 1 and e.isalpha() and e != 'i') or \
+                    (len(e) > 1 and e[0] in 'zsx' and e.isalnum()):
+                f.append("+" + e)
     return f
 llvm_features_from_tune[vardepvalue] = "${@llvm_features_from_tune(d)}"
 
Signature · 1 line
2.56.1
#8 lore raw

PATCH 8/10 ptest-cargo.bbclass: run do_install_ptest_cargo as a postfunc

In reply to Scott Murray

From: Trevor Gamblin <[email protected]>

do_install_ptest_cargo appends to run-ptest, but run-ptest is only reset by do_install_ptest_base's cleandirs. This means that changes to its signature (e.g. by setting 'RUST_TEST_ARGS:pn-hyperfine = "--test-threads=1"' in local.conf) just append another block to run-ptest with an 'exit $rc' in between, so changed test arguments aren't actually used. Run do_install_ptest_cargo as a postfunc for do_install_ptest_base instead so that changes are always reflected.

do_install_ptest_cargo is removed as a task.

Tested by setting RUST_TEST_ARGS in local.conf as described above. Here is a snippet of what the double-appended run-ptest script would look like without this fix:

|if ! /usr/lib/hyperfine/ptest/hyperfine-e8776e44d98845b7
|then
|    rc=1
|    echo "FAIL: /usr/lib/hyperfine/ptest/hyperfine-e8776e44d98845b7"
|else
|    echo "PASS: /usr/lib/hyperfine/ptest/hyperfine-e8776e44d98845b7"
|fi
|exit $rc
|
|echo ""
|echo "## starting to run rust tests ##"
|if [ -z "$rc" ]; then rc=0; fi
|if ! /usr/lib/hyperfine/ptest/execution_order_tests-0fccc0f22d97e11e --test-threads=1
|then
|    rc=1
|    echo "FAIL: /usr/lib/hyperfine/ptest/execution_order_tests-0fccc0f22d97e11e"
|else

AI-Generated: Uses Claude Opus 5.5

(adapted from oe-core commit 24a1b261834bbbe1b131dd31e5e2454f130250b3)

---
 classes-recipe/ptest-cargo.bbclass | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
classes-recipe/ptest-cargo.bbclass +7 -9
index 5cdd1c4..0173a2e 100644
@@ -123,21 +123,19 @@ python do_install_ptest_cargo() {
             shutil.chown(os.path.join(root, f), "root", "root")
 }
 
-do_install_ptest_cargo[dirs] = "${B}"
-do_install_ptest_cargo[doc] = "Create or update the run-ptest script with rust test binaries generated"
 do_compile_ptest_cargo[dirs] = "${B}"
 do_compile_ptest_cargo[doc] = "Generate rust test binaries through cargo"
 
 addtask compile_ptest_cargo after do_compile            before do_compile_ptest_base
-addtask install_ptest_cargo after do_install_ptest_base before do_package
 
-python () {
-    if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
-        d.setVarFlag('do_install_ptest_cargo', 'fakeroot', '1')
-        d.setVarFlag('do_install_ptest_cargo', 'umask', '022')
+# Run as part of do_install_ptest_base so its cleandirs always provides a fresh
+# run-ptest to append to. As a separate task, a signature change (e.g.
+# RUST_TEST_ARGS) re-ran only this step, appending a second block after the
+# first "exit $rc".
+do_install_ptest_base[postfuncs] += "do_install_ptest_cargo"
 
+python () {
     # Remove all '*ptest_cargo' tasks when ptest is not enabled
     if not(d.getVar('PTEST_ENABLED') == "1"):
-        for i in ['do_compile_ptest_cargo', 'do_install_ptest_cargo']:
-            bb.build.deltask(i, d)
+        bb.build.deltask('do_compile_ptest_cargo', d)
 }
Signature · 1 line
2.56.1
#9 lore raw

PATCH 9/10 librsvg: make ptest symlink creation idempotent

In reply to Scott Murray

From: Trevor Gamblin <[email protected]>

do_install_ptest:append() for librsvg was creating a link for 'ptest' outside of PTEST_PATH, so it wasn't being removed during cleanup and would remain present on rebuild. This created a self-referencing link, leading to errors like:

|     1509:             follow_symlinks=follow_symlinks)
|     1510:
|     1511:def get_terminal_size(fallback=(80, 24)):
|     1512:    """Get the size of the terminal window.
|Exception: OSError: [Errno 40] Too many levels of symbolic links: '/home/tgamblin/workspace/ypbuilds/riscv-maint/build/tmp/work/x86-64-v3-oe-linux/librsvg/2.63.4/image/usr/lib/librsvg/ptest/ptest'
|
|ERROR: Logfile of failure stored in: /home/tgamblin/workspace/ypbuilds/riscv-maint/build/tmp/work/x86-64-v3-oe-linux/librsvg/2.63.4/temp/log.do_install_ptest_base.2703564
|ERROR: Task (/home/tgamblin/workspace/ypbuilds/riscv-maint/layers/openembedded-core/recipes-gnome/librsvg/librsvg_2.63.4.bb:do_install_ptest_base) failed with exit code '1'

Treat the link name as a normal file if it's a directory ('-n'; i.e. don't follow the link) and force-overwrite it ('-f') so that the link gets recreated on subsequent runs.

AI-Generated: Uses Claude Opus 5.5

(adapted from oe-core commit ae48606b96535839faa919765721b0de3a22a7d9)

---
 recipes-gnome/librsvg/librsvg_2.63.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-gnome/librsvg/librsvg_2.63.4.bb +1 -1
index 6e88270..a6fd4ce 100644
@@ -87,7 +87,7 @@ do_install_ptest:append() {
 	# the api tests look for the required files in rsvg folder, so simulate it
 	# with a symlink that points to the current folder
 	ln -s . ${D}${PTEST_PATH}/rsvg
-	ln -s ptest ${D}${PTEST_PATH}/../rsvg
+	ln -snf ptest ${D}${PTEST_PATH}/../rsvg
 }
 
 PACKAGES =+ "librsvg-gtk rsvg"
Signature · 1 line
2.56.1
#10 lore raw

PATCH 10/10 ptest-cargo.bbclass: don't follow symlinks when chowning

In reply to Scott Murray

From: Trevor Gamblin <[email protected]>

Use os.lchown() instead of shutil.chown(), as the former follows symlinks. os.lchown changes the owner of the link itself. shutil.chown() didn't add the follow_symlinks option until Python 3.13[1], so we can't just add that argument.

[1]: https://docs.python.org/3/library/shutil.html#shutil.chown

AI-Generated: Uses Claude Opus 5.5

(adapted from oe-core commit c88df9d0ef9b1418d96fea347475c331e54d5dd0)

---
 classes-recipe/ptest-cargo.bbclass | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
classes-recipe/ptest-cargo.bbclass +4 -5
index 0173a2e..340fccf 100644
@@ -115,12 +115,11 @@ python do_install_ptest_cargo() {
     if not script_exists:
         os.chmod(ptest_script, 0o755)
 
-    # this is chown -R root:root ${D}${PTEST_PATH}
+    # Equivalent to 'chown -R root:root ${D}${PTEST_PATH}, which doesn't follow
+    # symlinks
     for root, dirs, files in os.walk(ptest_dir):
-        for d in dirs:
-            shutil.chown(os.path.join(root, d), "root", "root")
-        for f in files:
-            shutil.chown(os.path.join(root, f), "root", "root")
+        for name in dirs + files:
+            os.lchown(os.path.join(root, name), 0, 0)
 }
 
 do_compile_ptest_cargo[dirs] = "${B}"
Signature · 1 line
2.56.1