Package: rustc / 1.46.0+dfsg1-1

u-reproducible-build.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Don't split dwarf debug for a fully-reproducible build
Author: Ximin Luo <infinity0@debian.org>
Bug: https://github.com/rust-lang/rust/issues/34902

Index: rust/src/librustc_llvm/build.rs
===================================================================
--- rust.orig/src/librustc_llvm/build.rs
+++ rust/src/librustc_llvm/build.rs
@@ -121,6 +121,11 @@ fn main() {
     let mut cfg = cc::Build::new();
     cfg.warnings(false);
     for flag in cxxflags.split_whitespace() {
+        // Split-dwarf gives unreproducible DW_AT_GNU_dwo_id so don't do it
+        if flag == "-gsplit-dwarf" {
+            continue;
+        }
+
         // Ignore flags like `-m64` when we're doing a cross build
         if is_crossed && flag.starts_with("-m") {
             continue;