Skip to contentSkip to conversation

rust: Upgrade 1.99.1 -> 1.100.0

PATCH New [email protected] 1 participant 2 messages Nov 17

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 rust: Upgrade 1.99.1 -> 1.100.0

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   |
+-------------+--------+---------+
---
 meta/conf/distro/include/maintainers.inc      |   2 +-
 meta/conf/distro/include/tcmode-default.inc   |   2 +-
 meta/lib/oeqa/selftest/cases/rust.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
 meta/recipes-devtools/rust/rust-snapshot.inc  | 104 +++----
 meta/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
 16 files changed, 385 insertions(+), 184 deletions(-)
 rename meta/recipes-devtools/rust/{cargo_1.99.1.bb => cargo_1.100.0.bb} (100%)
 delete mode 100644 meta/recipes-devtools/rust/files/0003-bootstrap-skip-StdarchVerify-when-remote-testing.patch
 rename meta/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 meta/recipes-devtools/rust/files/0004-Re-bless-tests-adjust-for-new-Cargo-lints.patch
 delete mode 100644 meta/recipes-devtools/rust/files/0005-rustc-span-make-hygiene-encoding-order-deterministic.patch
 rename meta/recipes-devtools/rust/{libstd-rs_1.99.1.bb => libstd-rs_1.100.0.bb} (77%)
 rename meta/recipes-devtools/rust/{rust-cross-canadian_1.99.1.bb => rust-cross-canadian_1.100.0.bb} (100%)
 rename meta/recipes-devtools/rust/{rust-source_1.99.1.bb => rust-source_1.100.0.bb} (100%)
 rename meta/recipes-devtools/rust/{rust_1.99.1.bb => rust_1.100.0.bb} (100%)
meta/conf/distro/include/maintainers.inc +1 -1
index 97582abe99..62de04001e 100644
@@ -787,7 +787,7 @@ RECIPE_MAINTAINER:pn-ruby = "Ross Burton <[email protected]>"
 RECIPE_MAINTAINER:pn-run-postinsts = "Ross Burton <[email protected]>"
 RECIPE_MAINTAINER:pn-rust = "Randy MacLeod <[email protected]>"
 RECIPE_MAINTAINER:pn-rust-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Randy MacLeod <[email protected]>"
-RECIPE_MAINTAINER:pn-rust-source-1.99.1 = "Deepesh Varatharajan <[email protected]>"
+RECIPE_MAINTAINER:pn-rust-source-1.100.0 = "Deepesh Varatharajan <[email protected]>"
 RECIPE_MAINTAINER:pn-rxvt-unicode = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-sassc = "Simone Weiß <[email protected]>"
 RECIPE_MAINTAINER:pn-sato-icon-theme = "Richard Purdie <[email protected]>"
meta/conf/distro/include/tcmode-default.inc +1 -1
index 6632f8ff97..4891d310ca 100644
@@ -12,7 +12,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
 GCCVERSION ?= "16.%"
 SDKGCCVERSION ?= "${GCCVERSION}"
 GLIBCVERSION ?= "2.44%"
-RUSTVERSION ?= "1.99.1%"
+RUSTVERSION ?= "1.100.0%"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
meta/lib/oeqa/selftest/cases/rust.py +1 -0
index 645b5d5fbf..03af98345e 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',
meta/recipes-devtools/rust/cargo_1.100.0.bb renamed from meta/recipes-devtools/rust/cargo_1.99.1.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/cargo_1.99.1.bb
rename to meta/recipes-devtools/rust/cargo_1.100.0.bb
meta/recipes-devtools/rust/files/0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch +17 -10
index 0bd32ecf61..7482c2a295 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;
meta/recipes-devtools/rust/files/0003-bootstrap-skip-StdarchVerify-when-remote-testing.patch deleted +0 -30
deleted file mode 100644
index a57765f6ea..0000000000
@@ -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<'_>) {
meta/recipes-devtools/rust/files/0003-cargo-omit-host-triple-from-unit-metadata-hash.patch renamed from meta/recipes-devtools/rust/files/0004-cargo-omit-host-triple-from-unit-metadata-hash.patch +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/files/0004-cargo-omit-host-triple-from-unit-metadata-hash.patch
rename to meta/recipes-devtools/rust/files/0003-cargo-omit-host-triple-from-unit-metadata-hash.patch
meta/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

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

59 lines not on this page · raw message

meta/recipes-devtools/rust/files/cc-hash-object-names-relative-to-source-roots.patch +18 -22
index c128bd7144..e0218bf5ad 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)
meta/recipes-devtools/rust/libstd-rs_1.100.0.bb renamed from meta/recipes-devtools/rust/libstd-rs_1.99.1.bb +5 -5
similarity index 77%
rename from meta/recipes-devtools/rust/libstd-rs_1.99.1.bb
rename to meta/recipes-devtools/rust/libstd-rs_1.100.0.bb
index 939e5824b3..f08838ea28 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"
meta/recipes-devtools/rust/rust-cross-canadian_1.100.0.bb renamed from meta/recipes-devtools/rust/rust-cross-canadian_1.99.1.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/rust-cross-canadian_1.99.1.bb
rename to meta/recipes-devtools/rust/rust-cross-canadian_1.100.0.bb
meta/recipes-devtools/rust/rust-snapshot.inc +52 -52

110 lines not on this page · raw message

meta/recipes-devtools/rust/rust-source.inc +3 -4
index b384a0c76e..8b5b59bfa8 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.
meta/recipes-devtools/rust/rust-source_1.100.0.bb renamed from meta/recipes-devtools/rust/rust-source_1.99.1.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/rust-source_1.99.1.bb
rename to meta/recipes-devtools/rust/rust-source_1.100.0.bb
meta/recipes-devtools/rust/rust_1.100.0.bb renamed from meta/recipes-devtools/rust/rust_1.99.1.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/rust/rust_1.99.1.bb
rename to meta/recipes-devtools/rust/rust_1.100.0.bb
Signature · 1 line
2.49.0
#1 lore raw

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

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

---
 ...native-sysroot-L-when-cross-building.patch | 49 +++++++++++++++++++
 meta/recipes-devtools/rust/rust-source.inc    |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 meta/recipes-devtools/rust/files/0005-rustc_llvm-drop-native-sysroot-L-when-cross-building.patch
meta/recipes-devtools/rust/files/0005-rustc_llvm-drop-native-sysroot-L-when-cross-building.patch new file +49 -0
new file mode 100644
index 0000000000..8fd17c18f4
@@ -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}");
meta/recipes-devtools/rust/rust-source.inc +1 -0
index 8b5b59bfa8..ed779f3478 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.49.0