blob: f117152f2a36d99ead7f3aaedad8a2fd1a33296b [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From bdd69b55387f80c8df18d0af5008bf5e1a66be6a Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 23 Nov 2020 19:22:04 +0000
4Subject: [PATCH] exec.go: do not write linker flags into buildids
5
6The flags can contain build-specific paths, breaking reproducibility.
7
8To make this acceptable to upstream, we probably need to trim the flags,
9removing those known to be buildhost-specific.
10
11Upstream-Status: Inappropriate [needs upstream discussion]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 src/cmd/go/internal/work/exec.go | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
Andrew Geissler595f6302022-01-24 19:11:47 +000017--- a/src/cmd/go/internal/work/exec.go
18+++ b/src/cmd/go/internal/work/exec.go
Patrick Williams03907ee2022-05-01 06:28:52 -050019@@ -1274,7 +1274,7 @@ func (b *Builder) linkActionID(a *Action
Andrew Geissler595f6302022-01-24 19:11:47 +000020 }
21
22 // Toolchain-dependent configuration, shared with b.linkSharedActionID.
23- b.printLinkerConfig(h, p)
24+ //b.printLinkerConfig(h, p)
25
26 // Input files.
27 for _, a1 := range a.Deps {
Patrick Williams03907ee2022-05-01 06:28:52 -050028@@ -1568,7 +1568,7 @@ func (b *Builder) linkSharedActionID(a *
Andrew Geissler595f6302022-01-24 19:11:47 +000029 fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch)
30
31 // Toolchain-dependent configuration, shared with b.linkActionID.
32- b.printLinkerConfig(h, nil)
33+ //b.printLinkerConfig(h, nil)
34
35 // Input files.
36 for _, a1 := range a.Deps {