From: sunilkumar.dora@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: richard.purdie@linuxfoundation.org,
sundeep.kokkonda@windriver.com, sunilkumar.dora@windriver.com,
Randy.Macleod@windriver.com, alejandro@enedino.org
Subject: [PATCH 1/5] rust: drop the cc object-name reproducibility patch
Date: Tue, 15 Sep 2026 19:48:30 +0530 [thread overview]
Message-ID: <20260915141834.1212812-2-sunilkumar.dora@windriver.com> (raw)
In-Reply-To: <20260915141834.1212812-1-sunilkumar.dora@windriver.com>
From: Sunil Dora <sunilkumar.dora@windriver.com>
This patch trims the source directory at the string "rustc" before cc
hashes it into the object file names. After the shared source rework the
build no longer runs under rustc-*-src, so the sources that
compiler-builtins generates into OUT_DIR are not trimmed and the build
path ends up in their names.
Replaced by cc-hash-object-names-relative-to-source-roots.patch.
[YOCTO #16376]
Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
---
...epro-issue-fix-with-cc-crate-hashmap.patch | 67 -------------------
meta/recipes-devtools/rust/rust-source.inc | 1 -
2 files changed, 68 deletions(-)
delete mode 100644 meta/recipes-devtools/rust/files/repro-issue-fix-with-cc-crate-hashmap.patch
diff --git a/meta/recipes-devtools/rust/files/repro-issue-fix-with-cc-crate-hashmap.patch b/meta/recipes-devtools/rust/files/repro-issue-fix-with-cc-crate-hashmap.patch
deleted file mode 100644
index efb379acb9..0000000000
--- a/meta/recipes-devtools/rust/files/repro-issue-fix-with-cc-crate-hashmap.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-rust: reproducibility issue fix with v1.84
-
-A few crates are using the updated version of the 'cc' crate and this is causing the generated object file names containing a unique hashmap id.
-By the following changes same hash values will be genarted even for diffrent build paths.
-
-Below are the links for detailed bug description & discusssion with upstream rust.
-https://github.com/rust-lang/cc-rs/pull/1277
-
-Upstream-Status: Submitted [https://github.com/rust-lang/cc-rs/pull/1277]
-Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
-Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
-diff --git a/vendor/cc-1.2.0/src/command_helpers.rs b/vendor/cc-1.2.0/src/command_helpers.rs
-index fe919a5239..2b1f442019 100644
---- a/vendor/cc-1.2.0/src/command_helpers.rs
-+++ b/vendor/cc-1.2.0/src/command_helpers.rs
-@@ -289,6 +289,7 @@
- /// and store them in the output Object.
- pub(crate) fn objects_from_files(files: &[Arc<Path>], dst: &Path) -> Result<Vec<Object>, Error> {
- let mut objects = Vec::with_capacity(files.len());
-+ let target_substring = ["rustc"];
- for file in files {
- let basename = file
- .file_name()
-@@ -309,6 +310,26 @@
- })?
- .to_string_lossy();
-
-+ // Function to find the position of the first occurrence of the target substring
-+ fn find_target_position(s: &str, targets: &[&str]) -> Option<usize> {
-+ let mut pos = None;
-+ for target in targets {
-+ if let Some(index) = s.rfind(target) {
-+ //If a target is found and pos is None, set it
-+ if pos.is_none() || index < pos.unwrap() {
-+ pos = Some(index);
-+ }
-+ }
-+ }
-+ pos
-+ }
-+
-+ let filtered_dirname = if let Some(pos) = find_target_position(&dirname, &target_substring) {
-+ dirname[pos..].to_string() //Keep everything from the target substring onwards
-+ } else {
-+ dirname.to_string() //If target substring is not found, keep the original dirname
-+ };
-+
- // Hash the dirname. This should prevent conflicts if we have multiple
- // object files with the same filename in different subfolders.
- let mut hasher = hash_map::DefaultHasher::new();
-@@ -326,7 +347,7 @@
- dirname
- };
-
-- hasher.write(dirname.as_bytes());
-+ hasher.write(filtered_dirname.as_bytes());
- let obj = dst
- .join(format!("{:016x}-{}", hasher.finish(), basename))
- .with_extension("o");
-diff --git a/vendor/cc-1.2.0/.cargo-checksum.json b/vendor/cc-1.2.0/.cargo-checksum.json
-index b070eeb322..ba768ff86f 100644
---- a/vendor/cc-1.2.0/.cargo-checksum.json
-+++ b/vendor/cc-1.2.0/.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"}
-\ 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":"174101852b2633a2478cef20d063fb9c2f1b092eac47913a6e708c85663b8404","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"}
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index 019e2585e2..28c6d0b1dc 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -3,7 +3,6 @@ RUST_VERSION ?= "${@d.getVar('PV').split('-')[0]}"
SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;name=rust \
file://0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch;patchdir=${RUSTSRC} \
file://rust-oe-selftest.patch;patchdir=${RUSTSRC} \
- file://repro-issue-fix-with-cc-crate-hashmap.patch;patchdir=${RUSTSRC} \
file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \
file://0002-Fix-rust-build-failure-with-unstable-options.patch;patchdir=${RUSTSRC} \
file://0003-bootstrap-skip-StdarchVerify-when-remote-testing.patch;patchdir=${RUSTSRC} \
--
2.43.0
next prev parent reply other threads:[~2026-09-15 14:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 14:18 [PATCH 0/5] rust: reproducibility fixes for arm build hosts sunilkumar.dora
2026-09-15 14:18 ` sunilkumar.dora [this message]
2026-09-15 14:18 ` [PATCH 2/5] rust: hash cc object names relative to their source roots sunilkumar.dora
2026-09-15 14:18 ` [PATCH 3/5] rust: keep the build host triple out of cargo unit metadata sunilkumar.dora
2026-09-15 14:18 ` [PATCH 4/5] rust: backport deterministic DocLinkResMap serialisation sunilkumar.dora
2026-09-15 14:18 ` [PATCH 5/5] rust: sort hygiene data before it is encoded sunilkumar.dora
2026-09-15 15:53 ` [OE-core] [PATCH 0/5] rust: reproducibility fixes for arm build hosts Alejandro Hernandez
2026-09-15 16:10 ` Dora, Sunil Kumar
[not found] ` <18D58A6B209991A8.1909126@lists.openembedded.org>
2026-09-15 17:55 ` Dora, Sunil Kumar
2026-09-16 7:11 ` Antonin Godard
2026-09-21 9:46 ` Richard Purdie
2026-09-21 21:43 ` Alejandro Hernandez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260915141834.1212812-2-sunilkumar.dora@windriver.com \
--to=sunilkumar.dora@windriver.com \
--cc=Randy.Macleod@windriver.com \
--cc=alejandro@enedino.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
--cc=sundeep.kokkonda@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox