]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rust: reproducibility issue fix
authorSundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Wed, 11 Oct 2023 04:05:50 +0000 (21:05 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Oct 2023 08:36:02 +0000 (09:36 +0100)
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]

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/reproducible.py
meta/recipes-devtools/rust/rust_1.70.0.bb

index 84c6c3a05ffa6db73647602c5b9b8fe3156305ad..9b4a0887dd959f63d8fe85b5f9455a06f2cba9cf 100644 (file)
@@ -16,8 +16,6 @@ import os
 import datetime
 
 exclude_packages = [
-       'rust',
-       'rust-dbg'
        ]
 
 def is_excluded(package):
index 3b9c05a19fa8b513fbed54624b8b46a3bbe6a8aa..16d433910f8e0b3c5d7f9641d90bf2c0c6afe0cb 100644 (file)
@@ -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