diff options
Diffstat (limited to 'meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch')
-rw-r--r-- | meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch b/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch index 520e41da86..d118e726c6 100644 --- a/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch +++ b/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch | |||
@@ -1,10 +1,8 @@ | |||
1 | From efab470498bb0a30ee2d00455a0c8c10459f6347 Mon Sep 17 00:00:00 2001 | 1 | From aff5a740d6286c04beb0593fc68b0aea5a95ad39 Mon Sep 17 00:00:00 2001 |
2 | From: Alex Kube <alexander.j.kube@gmail.com> | 2 | From: Alex Kube <alexander.j.kube@gmail.com> |
3 | Date: Wed, 23 Oct 2019 21:18:56 +0430 | 3 | Date: Wed, 23 Oct 2019 21:18:56 +0430 |
4 | Subject: [PATCH 6/9] cmd/go: make GOROOT precious by default | 4 | Subject: [PATCH 6/9] cmd/go: make GOROOT precious by default |
5 | 5 | ||
6 | Upstream-Status: Inappropriate [OE specific] | ||
7 | |||
8 | The go build tool normally rebuilds whatever it detects is | 6 | The go build tool normally rebuilds whatever it detects is |
9 | stale. This can be a problem when GOROOT is intended to | 7 | stale. This can be a problem when GOROOT is intended to |
10 | be read-only and the go runtime has been built as a shared | 8 | be read-only and the go runtime has been built as a shared |
@@ -20,7 +18,10 @@ Adapted to Go 1.13 from patches originally submitted to | |||
20 | the meta/recipes-devtools/go tree by | 18 | the meta/recipes-devtools/go tree by |
21 | Matt Madison <matt@madison.systems>. | 19 | Matt Madison <matt@madison.systems>. |
22 | 20 | ||
21 | Upstream-Status: Inappropriate [OE specific] | ||
22 | |||
23 | Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | 23 | Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> |
24 | Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> | ||
24 | --- | 25 | --- |
25 | src/cmd/go/internal/work/action.go | 3 +++ | 26 | src/cmd/go/internal/work/action.go | 3 +++ |
26 | src/cmd/go/internal/work/build.go | 6 ++++++ | 27 | src/cmd/go/internal/work/build.go | 6 ++++++ |
@@ -28,10 +29,10 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
28 | 3 files changed, 34 insertions(+) | 29 | 3 files changed, 34 insertions(+) |
29 | 30 | ||
30 | diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go | 31 | diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go |
31 | index 8beb134..68a8cfe 100644 | 32 | index d4d0a71..42149d2 100644 |
32 | --- a/src/cmd/go/internal/work/action.go | 33 | --- a/src/cmd/go/internal/work/action.go |
33 | +++ b/src/cmd/go/internal/work/action.go | 34 | +++ b/src/cmd/go/internal/work/action.go |
34 | @@ -718,6 +718,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) { | 35 | @@ -730,6 +730,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) { |
35 | if p1 == nil || p1.Shlib == "" || haveShlib[filepath.Base(p1.Shlib)] { | 36 | if p1 == nil || p1.Shlib == "" || haveShlib[filepath.Base(p1.Shlib)] { |
36 | continue | 37 | continue |
37 | } | 38 | } |
@@ -42,10 +43,10 @@ index 8beb134..68a8cfe 100644 | |||
42 | // TODO(rsc): The use of ModeInstall here is suspect, but if we only do ModeBuild, | 43 | // TODO(rsc): The use of ModeInstall here is suspect, but if we only do ModeBuild, |
43 | // we'll end up building an overall library or executable that depends at runtime | 44 | // we'll end up building an overall library or executable that depends at runtime |
44 | diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go | 45 | diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go |
45 | index 2f2860a..8cc6166 100644 | 46 | index e2e0e07..1c84137 100644 |
46 | --- a/src/cmd/go/internal/work/build.go | 47 | --- a/src/cmd/go/internal/work/build.go |
47 | +++ b/src/cmd/go/internal/work/build.go | 48 | +++ b/src/cmd/go/internal/work/build.go |
48 | @@ -217,6 +217,8 @@ See also: go install, go get, go clean. | 49 | @@ -228,6 +228,8 @@ See also: go install, go get, go clean. |
49 | 50 | ||
50 | const concurrentGCBackendCompilationEnabledByDefault = true | 51 | const concurrentGCBackendCompilationEnabledByDefault = true |
51 | 52 | ||
@@ -54,7 +55,7 @@ index 2f2860a..8cc6166 100644 | |||
54 | func init() { | 55 | func init() { |
55 | // break init cycle | 56 | // break init cycle |
56 | CmdBuild.Run = runBuild | 57 | CmdBuild.Run = runBuild |
57 | @@ -230,6 +232,10 @@ func init() { | 58 | @@ -241,6 +243,10 @@ func init() { |
58 | AddCoverFlags(CmdBuild, nil) | 59 | AddCoverFlags(CmdBuild, nil) |
59 | AddCoverFlags(CmdInstall, nil) | 60 | AddCoverFlags(CmdInstall, nil) |
60 | } | 61 | } |
@@ -66,11 +67,11 @@ index 2f2860a..8cc6166 100644 | |||
66 | 67 | ||
67 | // Note that flags consulted by other parts of the code | 68 | // Note that flags consulted by other parts of the code |
68 | diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go | 69 | diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go |
69 | index 62e1774..cde867b 100644 | 70 | index e3dd486..0ea5316 100644 |
70 | --- a/src/cmd/go/internal/work/exec.go | 71 | --- a/src/cmd/go/internal/work/exec.go |
71 | +++ b/src/cmd/go/internal/work/exec.go | 72 | +++ b/src/cmd/go/internal/work/exec.go |
72 | @@ -546,6 +546,23 @@ func (b *Builder) build(ctx context.Context, a *Action) (err error) { | 73 | @@ -539,6 +539,23 @@ func (b *Builder) build(ctx context.Context, a *Action) (err error) { |
73 | return errors.New("cannot compile Go " + p.Module.GoVersion + " code") | 74 | return err |
74 | } | 75 | } |
75 | 76 | ||
76 | + if goRootPrecious && (a.Package.Standard || a.Package.Goroot) { | 77 | + if goRootPrecious && (a.Package.Standard || a.Package.Goroot) { |
@@ -93,7 +94,7 @@ index 62e1774..cde867b 100644 | |||
93 | if err := b.Mkdir(a.Objdir); err != nil { | 94 | if err := b.Mkdir(a.Objdir); err != nil { |
94 | return err | 95 | return err |
95 | } | 96 | } |
96 | @@ -1643,6 +1660,14 @@ func (b *Builder) linkShared(ctx context.Context, a *Action) (err error) { | 97 | @@ -1722,6 +1739,14 @@ func (b *Builder) linkShared(ctx context.Context, a *Action) (err error) { |
97 | return err | 98 | return err |
98 | } | 99 | } |
99 | 100 | ||
@@ -109,5 +110,5 @@ index 62e1774..cde867b 100644 | |||
109 | return err | 110 | return err |
110 | } | 111 | } |
111 | -- | 112 | -- |
112 | 2.30.2 | 113 | 2.43.0 |
113 | 114 | ||