blob: 20b6636f65963890bd5ac5ac283092e8fa610974 [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
17diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
18index 696db23..727d40b 100644
19--- a/src/cmd/go/internal/work/exec.go
20+++ b/src/cmd/go/internal/work/exec.go
21@@ -1136,7 +1136,7 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID {
22 }
23
24 // Toolchain-dependent configuration, shared with b.linkSharedActionID.
25- b.printLinkerConfig(h, p)
26+ //b.printLinkerConfig(h, p)
27
28 // Input files.
29 for _, a1 := range a.Deps {
30@@ -1418,7 +1418,7 @@ func (b *Builder) linkSharedActionID(a *Action) cache.ActionID {
31 fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch)
32
33 // Toolchain-dependent configuration, shared with b.linkActionID.
34- b.printLinkerConfig(h, nil)
35+ //b.printLinkerConfig(h, nil)
36
37 // Input files.
38 for _, a1 := range a.Deps {
39--
402.17.1
41