summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch')
-rw-r--r--meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch43
1 files changed, 22 insertions, 21 deletions
diff --git a/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch b/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch
index 56487e34e3..564837c7cd 100644
--- a/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch
+++ b/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch
@@ -1,4 +1,4 @@
-From 10766ca6f4007b96e3f6bf4fb496e5df74397eb9 Mon Sep 17 00:00:00 2001
+From 9a6c5040cbcd88b10ceb8ceaebc8d6158c086670 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 28 Mar 2022 10:59:03 -0700
Subject: [PATCH 1/9] cmd/go: make content-based hash generation less pedantic
@@ -25,16 +25,17 @@ Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Alex Kube <alexander.j.kube@gmail.com>
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
src/cmd/go/internal/envcmd/env.go | 2 +-
src/cmd/go/internal/work/exec.go | 44 ++++++++++++++++++++++++-------
2 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
-index 66ef5ce..fb7448a 100644
+index c7c2e83e0f..4a90d9da5c 100644
--- a/src/cmd/go/internal/envcmd/env.go
+++ b/src/cmd/go/internal/envcmd/env.go
-@@ -183,7 +183,7 @@ func ExtraEnvVarsCostly() []cfg.EnvVar {
+@@ -189,7 +189,7 @@ func ExtraEnvVarsCostly() []cfg.EnvVar {
}
}()
@@ -44,10 +45,10 @@ index 66ef5ce..fb7448a 100644
// Should not happen - b.CFlags was given an empty package.
fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err)
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
-index d6fa847..7e4fcb3 100644
+index e05471b06c..9724cd07d0 100644
--- a/src/cmd/go/internal/work/exec.go
+++ b/src/cmd/go/internal/work/exec.go
-@@ -223,6 +223,8 @@ func (b *Builder) Do(ctx context.Context, root *Action) {
+@@ -232,6 +232,8 @@ func (b *Builder) Do(ctx context.Context, root *Action) {
writeActionGraph()
}
@@ -56,7 +57,7 @@ index d6fa847..7e4fcb3 100644
// buildActionID computes the action ID for a build action.
func (b *Builder) buildActionID(a *Action) cache.ActionID {
p := a.Package
-@@ -244,7 +246,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+@@ -253,7 +255,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
if p.Module != nil {
fmt.Fprintf(h, "module %s@%s\n", p.Module.Path, p.Module.Version)
}
@@ -65,7 +66,7 @@ index d6fa847..7e4fcb3 100644
// The Go compiler always hides the exact value of $GOROOT
// when building things in GOROOT.
//
-@@ -276,9 +278,9 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+@@ -285,9 +287,9 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
}
if len(p.CgoFiles)+len(p.SwigFiles)+len(p.SwigCXXFiles) > 0 {
fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo"))
@@ -77,7 +78,7 @@ index d6fa847..7e4fcb3 100644
fmt.Fprintf(h, "CC=%q %q %q %q\n", ccExe, cppflags, cflags, ldflags)
// Include the C compiler tool ID so that if the C
// compiler changes we rebuild the package.
-@@ -286,14 +288,14 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+@@ -295,14 +297,14 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
fmt.Fprintf(h, "CC ID=%q\n", ccID)
}
if len(p.CXXFiles)+len(p.SwigCXXFiles) > 0 {
@@ -94,16 +95,16 @@ index d6fa847..7e4fcb3 100644
fmt.Fprintf(h, "FC=%q %q\n", fcExe, fflags)
if fcID, _, err := b.gccToolID(fcExe[0], "f95"); err == nil {
fmt.Fprintf(h, "FC ID=%q\n", fcID)
-@@ -310,7 +312,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+@@ -319,7 +321,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
}
}
- if p.Internal.BuildInfo != "" {
-- fmt.Fprintf(h, "modinfo %q\n", p.Internal.BuildInfo)
-+ //fmt.Fprintf(h, "modinfo %q\n", p.Internal.BuildInfo)
+ if p.Internal.BuildInfo != nil {
+- fmt.Fprintf(h, "modinfo %q\n", p.Internal.BuildInfo.String())
++ //fmt.Fprintf(h, "modinfo %q\n", p.Internal.BuildInfo.String())
}
// Configuration specific to compiler toolchain.
-@@ -2970,8 +2972,25 @@ func envList(key, def string) []string {
+@@ -2679,8 +2681,25 @@ func envList(key, def string) []string {
return args
}
@@ -130,7 +131,7 @@ index d6fa847..7e4fcb3 100644
if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil {
return
}
-@@ -2987,6 +3006,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
+@@ -2696,6 +2715,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
if ldflags, err = buildFlags("LDFLAGS", defaultCFlags, p.CgoLDFLAGS, checkLinkerFlags); err != nil {
return
}
@@ -144,24 +145,24 @@ index d6fa847..7e4fcb3 100644
return
}
-@@ -3002,7 +3028,7 @@ var cgoRe = lazyregexp.New(`[/\\:]`)
-
- func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, gxxfiles, mfiles, ffiles []string) (outGo, outObj []string, err error) {
+@@ -2713,7 +2739,7 @@ func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgo
p := a.Package
+ sh := b.Shell(a)
+
- cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p)
+ cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p, false)
if err != nil {
return nil, nil, err
}
-@@ -3510,7 +3536,7 @@ func (b *Builder) swigIntSize(objdir string) (intsize string, err error) {
+@@ -3268,7 +3294,7 @@ func (b *Builder) swigOne(a *Action, file, objdir string, pcCFLAGS []string, cxx
+ p := a.Package
+ sh := b.Shell(a)
- // Run SWIG on one SWIG input file.
- func (b *Builder) swigOne(a *Action, p *load.Package, file, objdir string, pcCFLAGS []string, cxx bool, intgosize string) (outGo, outC string, err error) {
- cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p)
+ cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p, false)
if err != nil {
return "", "", err
}
--
-2.30.2
+2.44.0