summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go/0001-exec.go-do-not-write-linker-flags-into-buildids.patch
blob: f117152f2a36d99ead7f3aaedad8a2fd1a33296b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From bdd69b55387f80c8df18d0af5008bf5e1a66be6a Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 23 Nov 2020 19:22:04 +0000
Subject: [PATCH] exec.go: do not write linker flags into buildids

The flags can contain build-specific paths, breaking reproducibility.

To make this acceptable to upstream, we probably need to trim the flags,
removing those known to be buildhost-specific.

Upstream-Status: Inappropriate [needs upstream discussion]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 src/cmd/go/internal/work/exec.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/src/cmd/go/internal/work/exec.go
+++ b/src/cmd/go/internal/work/exec.go
@@ -1274,7 +1274,7 @@ func (b *Builder) linkActionID(a *Action
 	}
 
 	// Toolchain-dependent configuration, shared with b.linkSharedActionID.
-	b.printLinkerConfig(h, p)
+	//b.printLinkerConfig(h, p)
 
 	// Input files.
 	for _, a1 := range a.Deps {
@@ -1568,7 +1568,7 @@ func (b *Builder) linkSharedActionID(a *
 	fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch)
 
 	// Toolchain-dependent configuration, shared with b.linkActionID.
-	b.printLinkerConfig(h, nil)
+	//b.printLinkerConfig(h, nil)
 
 	// Input files.
 	for _, a1 := range a.Deps {