blob: a821cf02fcb3262839e9fddfa7d0f576881cab9b [file] [log] [blame]
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06001From 0ba747e6a4b251a0d9eed0cfd8f8c491bb508040 Mon Sep 17 00:00:00 2001
Andrew Geissler595f6302022-01-24 19:11:47 +00002From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 23 Nov 2020 19:22:04 +0000
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06004Subject: [PATCH 7/9] exec.go: do not write linker flags into buildids
Andrew Geissler595f6302022-01-24 19:11:47 +00005
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 Geissler6aa7eec2023-03-03 12:41:14 -060017diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
18index d83b31b..a646fbb 100644
Andrew Geissler595f6302022-01-24 19:11:47 +000019--- a/src/cmd/go/internal/work/exec.go
20+++ b/src/cmd/go/internal/work/exec.go
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060021@@ -1312,7 +1312,7 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID {
Andrew Geissler595f6302022-01-24 19:11:47 +000022 }
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 {
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060030@@ -1607,7 +1607,7 @@ func (b *Builder) linkSharedActionID(a *Action) cache.ActionID {
Andrew Geissler595f6302022-01-24 19:11:47 +000031 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 {
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060039--
402.30.2
41