diff options
Diffstat (limited to 'meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch')
-rw-r--r-- | meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch b/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch index 49da5f6297..597a4e2104 100644 --- a/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch +++ b/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 18011f72125bbea273d07ee5d792ac0ce6059572 Mon Sep 17 00:00:00 2001 | 1 | From 6c2438f187ca912c54a71b4ac65ab98999a019d2 Mon Sep 17 00:00:00 2001 |
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | 2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> |
3 | Date: Sat, 2 Jul 2022 23:08:13 +0100 | 3 | Date: Sat, 2 Jul 2022 23:08:13 +0100 |
4 | Subject: [PATCH 9/9] go: Filter build paths on staticly linked arches | 4 | Subject: [PATCH 9/9] go: Filter build paths on staticly linked arches |
@@ -11,17 +11,18 @@ on mips/ppc. | |||
11 | Upstream-Status: Submitted [https://github.com/golang/go/pull/56410] | 11 | Upstream-Status: Submitted [https://github.com/golang/go/pull/56410] |
12 | 12 | ||
13 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | 13 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
14 | Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> | ||
14 | --- | 15 | --- |
15 | src/cmd/go/internal/load/pkg.go | 15 +++++++++++++-- | 16 | src/cmd/go/internal/load/pkg.go | 15 +++++++++++++-- |
16 | 1 file changed, 13 insertions(+), 2 deletions(-) | 17 | 1 file changed, 13 insertions(+), 2 deletions(-) |
17 | 18 | ||
18 | diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go | 19 | diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go |
19 | index f427e29..6d6dc4e 100644 | 20 | index c0e6265..b199fee 100644 |
20 | --- a/src/cmd/go/internal/load/pkg.go | 21 | --- a/src/cmd/go/internal/load/pkg.go |
21 | +++ b/src/cmd/go/internal/load/pkg.go | 22 | +++ b/src/cmd/go/internal/load/pkg.go |
22 | @@ -2270,6 +2270,17 @@ func (p *Package) collectDeps() { | 23 | @@ -2269,6 +2269,17 @@ func appendBuildSetting(info *debug.BuildInfo, key, value string) { |
23 | // to their VCS information (vcsStatusError). | 24 | info.Settings = append(info.Settings, debug.BuildSetting{Key: key, Value: value}) |
24 | var vcsStatusCache par.Cache | 25 | } |
25 | 26 | ||
26 | +func filterCompilerFlags(flags string) string { | 27 | +func filterCompilerFlags(flags string) string { |
27 | + var newflags []string | 28 | + var newflags []string |
@@ -34,10 +35,10 @@ index f427e29..6d6dc4e 100644 | |||
34 | + return strings.Join(newflags, " ") | 35 | + return strings.Join(newflags, " ") |
35 | +} | 36 | +} |
36 | + | 37 | + |
37 | // setBuildInfo gathers build information, formats it as a string to be | 38 | // setBuildInfo gathers build information and sets it into |
38 | // embedded in the binary, then sets p.Internal.BuildInfo to that string. | 39 | // p.Internal.BuildInfo, which will later be formatted as a string and embedded |
39 | // setBuildInfo should only be called on a main package with no errors. | 40 | // in the binary. setBuildInfo should only be called on a main package with no |
40 | @@ -2376,7 +2387,7 @@ func (p *Package) setBuildInfo(autoVCS bool) { | 41 | @@ -2376,7 +2387,7 @@ func (p *Package) setBuildInfo(ctx context.Context, autoVCS bool) { |
41 | if gcflags := BuildGcflags.String(); gcflags != "" && cfg.BuildContext.Compiler == "gc" { | 42 | if gcflags := BuildGcflags.String(); gcflags != "" && cfg.BuildContext.Compiler == "gc" { |
42 | appendSetting("-gcflags", gcflags) | 43 | appendSetting("-gcflags", gcflags) |
43 | } | 44 | } |
@@ -46,7 +47,7 @@ index f427e29..6d6dc4e 100644 | |||
46 | // https://go.dev/issue/52372: only include ldflags if -trimpath is not set, | 47 | // https://go.dev/issue/52372: only include ldflags if -trimpath is not set, |
47 | // since it can include system paths through various linker flags (notably | 48 | // since it can include system paths through various linker flags (notably |
48 | // -extar, -extld, and -extldflags). | 49 | // -extar, -extld, and -extldflags). |
49 | @@ -2422,7 +2433,7 @@ func (p *Package) setBuildInfo(autoVCS bool) { | 50 | @@ -2419,7 +2430,7 @@ func (p *Package) setBuildInfo(ctx context.Context, autoVCS bool) { |
50 | // subset of flags that are known not to be paths? | 51 | // subset of flags that are known not to be paths? |
51 | if cfg.BuildContext.CgoEnabled && !cfg.BuildTrimpath { | 52 | if cfg.BuildContext.CgoEnabled && !cfg.BuildTrimpath { |
52 | for _, name := range []string{"CGO_CFLAGS", "CGO_CPPFLAGS", "CGO_CXXFLAGS", "CGO_LDFLAGS"} { | 53 | for _, name := range []string{"CGO_CFLAGS", "CGO_CPPFLAGS", "CGO_CXXFLAGS", "CGO_LDFLAGS"} { |
@@ -56,5 +57,5 @@ index f427e29..6d6dc4e 100644 | |||
56 | } | 57 | } |
57 | appendSetting("GOARCH", cfg.BuildContext.GOARCH) | 58 | appendSetting("GOARCH", cfg.BuildContext.GOARCH) |
58 | -- | 59 | -- |
59 | 2.30.2 | 60 | 2.43.0 |
60 | 61 | ||