From: sunilkumar.dora@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: richard.purdie@linuxfoundation.org,
sundeep.kokkonda@windriver.com, Randy.MacLeod@windriver.com,
alejandro@enedino.org, antonin.godard@bootlin.com,
sunilkumar.dora@windriver.com
Subject: [PATCH v2 0/5] rust: reproducibility fixes for arm build hosts
Date: Wed, 16 Sep 2026 20:53:21 +0530 [thread overview]
Message-ID: <20260916152327.1765623-1-sunilkumar.dora@windriver.com> (raw)
From: Sunil Dora <sunilkumar.dora@windriver.com>
The reproducible selftest fails for rust on the arm workers
([YOCTO #16376]). This series fixes that.
Changes in v2:
- Alejandro's Signed-off-by added on the two commits based on his
patches, as he asked on the v1 thread.
- The cc patch's Upstream-Status is now Backport: the OUT_DIR half
was merged in cc-rs after the v1 posting.
- The hygiene patch note updated: rust-lang/rust PR 161450 was merged
meanwhile, so the sort carries until a rust upgrade contains it.
No code changes; the patch content is what the autobuilder tested.
rust: drop the cc object-name reproducibility patch
rust: hash cc object names relative to their source roots
The patch we carried trimmed the build path by matching the string
"rustc", and the shared-source rework broke that for one of the two
sets of sources cc compiles. The replacement strips the roots the
sources actually come from. The OUT_DIR part is merged upstream as
https://github.com/rust-lang/cc-rs/commit/fe27e7b62629daddccf1bdc9e9a447a37de2cd06
The RUST_COMPILER_RT_ROOT part is specific to rust's own build
system, so it is not part of the upstream change.
rust: keep the build host triple out of cargo unit metadata
From Alejandro Enedino Hernandez Samaniego's strict-version-hash
series, carried with his sign-off:
https://lists.openembedded.org/g/openembedded-core/topic/120939810
cargo mixes the "host:" line of "rustc -vV" into build script and
proc-macro metadata, and target crates inherit it.
Upstream report: https://github.com/rust-lang/cargo/issues/8140
rust: backport deterministic DocLinkResMap serialisation
Upstream commit f9d9939 by jprochazk and mejrs. It is in rust 1.99,
so this drops out at the next rust upgrade.
rust: sort hygiene data before it is encoded
Also from Alejandro's series. Upstream has fixed the same problem
with a different approach in
https://github.com/rust-lang/rust/pull/161450, merged after 1.99
branched, so the sort carries until a rust upgrade contains it.
Alejandro's StableCrateId patch is not included: the value it pins is
already host-independent in our builds, and it broke three rust test
suite cases when the autobuilder tested it.
Tested on the autobuilder: the x86 reproducible builder green with
zero differing packages, the rust test suite green, and on both arm
builders rust, rust-dbg, rust-rustdoc and libstd-rs-dev gone from the
failing list.
Sunil Dora (5):
rust: drop the cc object-name reproducibility patch
rust: hash cc object names relative to their source roots
rust: keep the build host triple out of cargo unit metadata
rust: backport deterministic DocLinkResMap serialisation
rust: sort hygiene data before it is encoded
...-host-triple-from-unit-metadata-hash.patch | 62 +++++++++
...oc-link-metadata-order-deterministic.patch | 40 ++++++
...hygiene-encoding-order-deterministic.patch | 59 +++++++++
...ject-names-relative-to-source-roots.patch} | 118 +++++++++---------
meta/recipes-devtools/rust/rust-source.inc | 5 +-
5 files changed, 227 insertions(+), 57 deletions(-)
create mode 100644 meta/recipes-devtools/rust/files/0007-cargo-omit-host-triple-from-unit-metadata-hash.patch
create mode 100644 meta/recipes-devtools/rust/files/0008-rustc-hir-make-doc-link-metadata-order-deterministic.patch
create mode 100644 meta/recipes-devtools/rust/files/0009-rustc-span-make-hygiene-encoding-order-deterministic.patch
rename meta/recipes-devtools/rust/files/{repro-issue-fix-with-cc-crate-hashmap.patch => cc-hash-object-names-relative-to-source-roots.patch} (68%)
--
2.43.0
next reply other threads:[~2026-09-16 15:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 15:23 sunilkumar.dora [this message]
2026-09-16 15:23 ` [PATCH v2 1/5] rust: drop the cc object-name reproducibility patch sunilkumar.dora
2026-09-16 15:23 ` [PATCH v2 2/5] rust: hash cc object names relative to their source roots sunilkumar.dora
2026-09-16 15:23 ` [PATCH v2 3/5] rust: keep the build host triple out of cargo unit metadata sunilkumar.dora
2026-09-16 15:23 ` [PATCH v2 4/5] rust: backport deterministic DocLinkResMap serialisation sunilkumar.dora
2026-09-16 15:23 ` [PATCH v2 5/5] rust: sort hygiene data before it is encoded sunilkumar.dora
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=20260916152327.1765623-1-sunilkumar.dora@windriver.com \
--to=sunilkumar.dora@windriver.com \
--cc=Randy.MacLeod@windriver.com \
--cc=alejandro@enedino.org \
--cc=antonin.godard@bootlin.com \
--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