Skip to content

Commit

Permalink
rust: reproducibility issue fix with v1.75
Browse files Browse the repository at this point in the history
With 1.75 rust release, the '.rustc' section of shared object libs are embedded with absolute path names which is casuing reproducibiluty issues.
This change will fix the path name format back to '/rust/$hash' as in earlier versions.

Below are the links for detailed bug description & discusssion with upstream rust.
rust-lang/rust#120825 (comment)
rust-lang/rust#120825 (comment)

Signed-off-by: Sundeep KOKKONDA <[email protected]>
Signed-off-by: Yash Shinde <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Jose Quaresma <[email protected]>
(adapted from oe-core commit a80ce6e3c023809d1ec13d19e8acb25770b54737)
Signed-off-by: Scott Murray <[email protected]>
  • Loading branch information
Yash Shinde authored and g-scott-murray committed Mar 17, 2024
1 parent cdac947 commit 1cdb441
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions recipes-devtools/rust/files/repro-issue-fix-with-v175.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
rust: reproducibility issue fix with v1.75

With 1.75 rust release, the '.rustc' section of shared object libs are embedded with absolute path names which is casuing reproducibiluty issues.
This change will fix the path name format back to '/rust/$hash' as in earlier versions.

Below are the links for detailed bug description & discusssion with upstream rust.
https://github.com/rust-lang/rust/issues/120825#issuecomment-1964307219
https://github.com/rust-lang/rust/issues/120825#issuecomment-1964652656

Upstream-Status: Inappropriate [patches need rework]
Signed-off-by: Sundeep KOKKONDA <[email protected]>
---
--- a/compiler/rustc_session/src/session.rs 2023-12-21 08:55:28.000000000 -0800
+++ b/compiler/rustc_session/src/session.rs 2024-02-26 07:29:15.527577022 -0800
@@ -1269,7 +1269,7 @@
| CrateType::Rlib
| CrateType::Staticlib
| CrateType::Cdylib => continue,
- CrateType::ProcMacro => return false,
+ CrateType::ProcMacro => return true,
}
}

1 change: 1 addition & 0 deletions recipes-devtools/rust/rust-source.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
file://rustc-bootstrap.patch;patchdir=${RUSTSRC} \
file://target-build-value.patch;patchdir=${RUSTSRC} \
file://0001-Handle-vendored-sources-when-remapping-paths.patch;patchdir=${RUSTSRC} \
file://repro-issue-fix-with-v175.patch;patchdir=${RUSTSRC} \
"
SRC_URI[rust.sha256sum] = "4526f786d673e4859ff2afa0bab2ba13c918b796519a25c1acce06dba9542340"

Expand Down

0 comments on commit 1cdb441

Please sign in to comment.