From b36cbd3f2bd2096129d14311f6f17f2c64482704 Mon Sep 17 00:00:00 2001 From: Sundeep KOKKONDA Date: Tue, 10 Oct 2023 21:05:50 -0700 Subject: rust: reproducibility issue fix The '--remap-path-prefix' option removes all references to build directory structure in the debug information within the compiled output for Cargo dependencies and the project's binary. However, some references to build directories remains in the final binary in .rustc section in the form of compressed metadata and this makes the build output dependent on the folder structure of the computer it's compiled on. So, for reproducible builds, use the configuration option 'remap-debuginfo = true' along with the '--remap-path-prefix'. [YOCTO# 14875] (From OE-Core rev: 6ae62259afbbe861ed74211dab18a27b8c8d8b7a) Signed-off-by: Sundeep KOKKONDA Signed-off-by: Richard Purdie --- meta/recipes-devtools/rust/rust_1.70.0.bb | 1 + 1 file changed, 1 insertion(+) (limited to 'meta/recipes-devtools') diff --git a/meta/recipes-devtools/rust/rust_1.70.0.bb b/meta/recipes-devtools/rust/rust_1.70.0.bb index 3b9c05a19f..16d433910f 100644 --- a/meta/recipes-devtools/rust/rust_1.70.0.bb +++ b/meta/recipes-devtools/rust/rust_1.70.0.bb @@ -130,6 +130,7 @@ python do_configure() { # [rust] config.add_section("rust") config.set("rust", "rpath", e(True)) + config.set("rust", "remap-debuginfo", e(True)) config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}"))) # Whether or not to optimize the compiler and standard library -- cgit v1.2.3-54-g00ecf