diff options
| -rw-r--r-- | meta/conf/distro/include/tcmode-default.inc | 2 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.16.inc (renamed from meta/recipes-devtools/go/go-1.15.inc) | 7 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.16/0001-allow-CC-and-CXX-to-have-multiple-words.patch (renamed from meta/recipes-devtools/go/go-1.15/0001-allow-CC-and-CXX-to-have-multiple-words.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.16/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch (renamed from meta/recipes-devtools/go/go-1.15/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch) | 22 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.16/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch (renamed from meta/recipes-devtools/go/go-1.15/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.16/0004-ld-add-soname-to-shareable-objects.patch (renamed from meta/recipes-devtools/go/go-1.15/0004-ld-add-soname-to-shareable-objects.patch) | 12 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch (renamed from meta/recipes-devtools/go/go-1.15/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.16/0006-cmd-dist-separate-host-and-target-builds.patch (renamed from meta/recipes-devtools/go/go-1.15/0006-cmd-dist-separate-host-and-target-builds.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.16/0007-cmd-go-make-GOROOT-precious-by-default.patch (renamed from meta/recipes-devtools/go/go-1.15/0007-cmd-go-make-GOROOT-precious-by-default.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.16/0008-use-GOBUILDMODE-to-set-buildmode.patch (renamed from meta/recipes-devtools/go/go-1.15/0008-use-GOBUILDMODE-to-set-buildmode.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.16/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch | 95 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-binary-native_1.16.bb (renamed from meta/recipes-devtools/go/go-binary-native_1.15.8.bb) | 4 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-cross-canadian_1.16.bb (renamed from meta/recipes-devtools/go/go-cross-canadian_1.15.bb) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-cross_1.16.bb (renamed from meta/recipes-devtools/go/go-cross_1.15.bb) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-crosssdk_1.16.bb (renamed from meta/recipes-devtools/go/go-crosssdk_1.15.bb) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-native_1.16.bb (renamed from meta/recipes-devtools/go/go-native_1.15.bb) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-runtime_1.16.bb (renamed from meta/recipes-devtools/go/go-runtime_1.15.bb) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go_1.16.bb (renamed from meta/recipes-devtools/go/go_1.15.bb) | 0 |
18 files changed, 119 insertions, 23 deletions
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index 8df328dc0d..8e454f74a5 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc | |||
| @@ -23,7 +23,7 @@ GDBVERSION ?= "10.%" | |||
| 23 | GLIBCVERSION ?= "2.33" | 23 | GLIBCVERSION ?= "2.33" |
| 24 | LINUXLIBCVERSION ?= "5.10%" | 24 | LINUXLIBCVERSION ?= "5.10%" |
| 25 | QEMUVERSION ?= "5.2%" | 25 | QEMUVERSION ?= "5.2%" |
| 26 | GOVERSION ?= "1.15%" | 26 | GOVERSION ?= "1.16%" |
| 27 | # This can not use wildcards like 8.0.% since it is also used in mesa to denote | 27 | # This can not use wildcards like 8.0.% since it is also used in mesa to denote |
| 28 | # llvm version being used, so always bump it with llvm recipe version bump | 28 | # llvm version being used, so always bump it with llvm recipe version bump |
| 29 | LLVMVERSION ?= "10.0.1" | 29 | LLVMVERSION ?= "10.0.1" |
diff --git a/meta/recipes-devtools/go/go-1.15.inc b/meta/recipes-devtools/go/go-1.16.inc index 7c8190f68c..1ebbbef833 100644 --- a/meta/recipes-devtools/go/go-1.15.inc +++ b/meta/recipes-devtools/go/go-1.16.inc | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | require go-common.inc | 1 | require go-common.inc |
| 2 | 2 | ||
| 3 | GO_BASEVERSION = "1.15" | 3 | GO_BASEVERSION = "1.16" |
| 4 | PV = "1.15.8" | 4 | PV = "1.16" |
| 5 | FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" | 5 | FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" |
| 6 | 6 | ||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" | 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" |
| @@ -15,5 +15,6 @@ SRC_URI += "\ | |||
| 15 | file://0006-cmd-dist-separate-host-and-target-builds.patch \ | 15 | file://0006-cmd-dist-separate-host-and-target-builds.patch \ |
| 16 | file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ | 16 | file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ |
| 17 | file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ | 17 | file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ |
| 18 | file://0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch \ | ||
| 18 | " | 19 | " |
| 19 | SRC_URI[main.sha256sum] = "540c0ab7781084d124991321ed1458e479982de94454a98afab6acadf38497c2" | 20 | SRC_URI[main.sha256sum] = "7688063d55656105898f323d90a79a39c378d86fe89ae192eb3b7fc46347c95a" |
diff --git a/meta/recipes-devtools/go/go-1.15/0001-allow-CC-and-CXX-to-have-multiple-words.patch b/meta/recipes-devtools/go/go-1.16/0001-allow-CC-and-CXX-to-have-multiple-words.patch index 5f4823be22..5f4823be22 100644 --- a/meta/recipes-devtools/go/go-1.15/0001-allow-CC-and-CXX-to-have-multiple-words.patch +++ b/meta/recipes-devtools/go/go-1.16/0001-allow-CC-and-CXX-to-have-multiple-words.patch | |||
diff --git a/meta/recipes-devtools/go/go-1.15/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch b/meta/recipes-devtools/go/go-1.16/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch index d0511c0c40..04d0e496c0 100644 --- a/meta/recipes-devtools/go/go-1.15/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch +++ b/meta/recipes-devtools/go/go-1.16/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch | |||
| @@ -63,8 +63,8 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 63 | fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err) | 63 | fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err) |
| 64 | --- a/src/cmd/go/internal/work/exec.go | 64 | --- a/src/cmd/go/internal/work/exec.go |
| 65 | +++ b/src/cmd/go/internal/work/exec.go | 65 | +++ b/src/cmd/go/internal/work/exec.go |
| 66 | @@ -33,6 +33,8 @@ import ( | 66 | @@ -37,6 +37,8 @@ import ( |
| 67 | "cmd/go/internal/str" | 67 | "cmd/go/internal/trace" |
| 68 | ) | 68 | ) |
| 69 | 69 | ||
| 70 | +var omitGopath = os.Getenv("GOPATH_OMIT_IN_ACTIONID") != "" | 70 | +var omitGopath = os.Getenv("GOPATH_OMIT_IN_ACTIONID") != "" |
| @@ -72,7 +72,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 72 | // actionList returns the list of actions in the dag rooted at root | 72 | // actionList returns the list of actions in the dag rooted at root |
| 73 | // as visited in a depth-first post-order traversal. | 73 | // as visited in a depth-first post-order traversal. |
| 74 | func actionList(root *Action) []*Action { | 74 | func actionList(root *Action) []*Action { |
| 75 | @@ -209,7 +211,7 @@ func (b *Builder) buildActionID(a *Actio | 75 | @@ -228,7 +230,7 @@ func (b *Builder) buildActionID(a *Actio |
| 76 | // Assume b.WorkDir is being trimmed properly. | 76 | // Assume b.WorkDir is being trimmed properly. |
| 77 | // When -trimpath is used with a package built from the module cache, | 77 | // When -trimpath is used with a package built from the module cache, |
| 78 | // use the module path and version instead of the directory. | 78 | // use the module path and version instead of the directory. |
| @@ -81,7 +81,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 81 | fmt.Fprintf(h, "dir %s\n", p.Dir) | 81 | fmt.Fprintf(h, "dir %s\n", p.Dir) |
| 82 | } else if cfg.BuildTrimpath && p.Module != nil { | 82 | } else if cfg.BuildTrimpath && p.Module != nil { |
| 83 | fmt.Fprintf(h, "module %s@%s\n", p.Module.Path, p.Module.Version) | 83 | fmt.Fprintf(h, "module %s@%s\n", p.Module.Path, p.Module.Version) |
| 84 | @@ -228,13 +230,13 @@ func (b *Builder) buildActionID(a *Actio | 84 | @@ -247,13 +249,13 @@ func (b *Builder) buildActionID(a *Actio |
| 85 | } | 85 | } |
| 86 | if len(p.CgoFiles)+len(p.SwigFiles) > 0 { | 86 | if len(p.CgoFiles)+len(p.SwigFiles) > 0 { |
| 87 | fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo")) | 87 | fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo")) |
| @@ -99,7 +99,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 99 | } | 99 | } |
| 100 | // TODO(rsc): Should we include the SWIG version or Fortran/GCC/G++/Objective-C compiler versions? | 100 | // TODO(rsc): Should we include the SWIG version or Fortran/GCC/G++/Objective-C compiler versions? |
| 101 | } | 101 | } |
| 102 | @@ -2298,33 +2300,48 @@ var ( | 102 | @@ -2401,33 +2403,48 @@ var ( |
| 103 | // gccCmd returns a gcc command line prefix | 103 | // gccCmd returns a gcc command line prefix |
| 104 | // defaultCC is defined in zdefaultcc.go, written by cmd/dist. | 104 | // defaultCC is defined in zdefaultcc.go, written by cmd/dist. |
| 105 | func (b *Builder) GccCmd(incdir, workdir string) []string { | 105 | func (b *Builder) GccCmd(incdir, workdir string) []string { |
| @@ -157,7 +157,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | // compilerExe returns the compiler to use given an | 159 | // compilerExe returns the compiler to use given an |
| 160 | @@ -2333,11 +2350,16 @@ func (b *Builder) fcExe() []string { | 160 | @@ -2436,11 +2453,16 @@ func (b *Builder) fcExe() []string { |
| 161 | // of the compiler but can have additional arguments if they | 161 | // of the compiler but can have additional arguments if they |
| 162 | // were present in the environment value. | 162 | // were present in the environment value. |
| 163 | // For example if CC="gcc -DGOPHER" then the result is ["gcc", "-DGOPHER"]. | 163 | // For example if CC="gcc -DGOPHER" then the result is ["gcc", "-DGOPHER"]. |
| @@ -165,7 +165,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 165 | +func (b *Builder) compilerExe(envValue string, def string, filtered bool) []string { | 165 | +func (b *Builder) compilerExe(envValue string, def string, filtered bool) []string { |
| 166 | compiler := strings.Fields(envValue) | 166 | compiler := strings.Fields(envValue) |
| 167 | if len(compiler) == 0 { | 167 | if len(compiler) == 0 { |
| 168 | compiler = []string{def} | 168 | compiler = strings.Fields(def) |
| 169 | } | 169 | } |
| 170 | + | 170 | + |
| 171 | + if filtered { | 171 | + if filtered { |
| @@ -175,7 +175,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 175 | return compiler | 175 | return compiler |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | @@ -2510,7 +2532,7 @@ func envList(key, def string) []string { | 178 | @@ -2620,7 +2642,7 @@ func envList(key, def string) []string { |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | // CFlags returns the flags to use when invoking the C, C++ or Fortran compilers, or cgo. | 181 | // CFlags returns the flags to use when invoking the C, C++ or Fortran compilers, or cgo. |
| @@ -184,7 +184,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 184 | defaults := "-g -O2" | 184 | defaults := "-g -O2" |
| 185 | 185 | ||
| 186 | if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil { | 186 | if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil { |
| 187 | @@ -2529,6 +2551,14 @@ func (b *Builder) CFlags(p *load.Package | 187 | @@ -2639,6 +2661,14 @@ func (b *Builder) CFlags(p *load.Package |
| 188 | return | 188 | return |
| 189 | } | 189 | } |
| 190 | 190 | ||
| @@ -199,7 +199,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 199 | return | 199 | return |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | @@ -2543,7 +2573,7 @@ var cgoRe = lazyregexp.New(`[/\\:]`) | 202 | @@ -2653,7 +2683,7 @@ var cgoRe = lazyregexp.New(`[/\\:]`) |
| 203 | 203 | ||
| 204 | func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, gxxfiles, mfiles, ffiles []string) (outGo, outObj []string, err error) { | 204 | func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, gxxfiles, mfiles, ffiles []string) (outGo, outObj []string, err error) { |
| 205 | p := a.Package | 205 | p := a.Package |
| @@ -208,7 +208,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 208 | if err != nil { | 208 | if err != nil { |
| 209 | return nil, nil, err | 209 | return nil, nil, err |
| 210 | } | 210 | } |
| 211 | @@ -2902,7 +2932,7 @@ func (b *Builder) swigIntSize(objdir str | 211 | @@ -3104,7 +3134,7 @@ func (b *Builder) swigIntSize(objdir str |
| 212 | 212 | ||
| 213 | // Run SWIG on one SWIG input file. | 213 | // Run SWIG on one SWIG input file. |
| 214 | func (b *Builder) swigOne(a *Action, p *load.Package, file, objdir string, pcCFLAGS []string, cxx bool, intgosize string) (outGo, outC string, err error) { | 214 | func (b *Builder) swigOne(a *Action, p *load.Package, file, objdir string, pcCFLAGS []string, cxx bool, intgosize string) (outGo, outC string, err error) { |
diff --git a/meta/recipes-devtools/go/go-1.15/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/meta/recipes-devtools/go/go-1.16/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch index 662c705471..662c705471 100644 --- a/meta/recipes-devtools/go/go-1.15/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch +++ b/meta/recipes-devtools/go/go-1.16/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch | |||
diff --git a/meta/recipes-devtools/go/go-1.15/0004-ld-add-soname-to-shareable-objects.patch b/meta/recipes-devtools/go/go-1.16/0004-ld-add-soname-to-shareable-objects.patch index da29923920..cd875f1164 100644 --- a/meta/recipes-devtools/go/go-1.15/0004-ld-add-soname-to-shareable-objects.patch +++ b/meta/recipes-devtools/go/go-1.16/0004-ld-add-soname-to-shareable-objects.patch | |||
| @@ -19,15 +19,15 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 19 | 19 | ||
| 20 | --- a/src/cmd/link/internal/ld/lib.go | 20 | --- a/src/cmd/link/internal/ld/lib.go |
| 21 | +++ b/src/cmd/link/internal/ld/lib.go | 21 | +++ b/src/cmd/link/internal/ld/lib.go |
| 22 | @@ -1446,6 +1446,7 @@ func (ctxt *Link) hostlink() { | 22 | @@ -1343,6 +1343,7 @@ func (ctxt *Link) hostlink() { |
| 23 | argv = append(argv, "-Wl,-z,relro") | 23 | argv = append(argv, "-Wl,-z,relro") |
| 24 | } | 24 | } |
| 25 | argv = append(argv, "-shared") | 25 | argv = append(argv, "-shared") |
| 26 | + argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) | 26 | + argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) |
| 27 | if ctxt.HeadType != objabi.Hwindows { | 27 | if ctxt.HeadType == objabi.Hwindows { |
| 28 | // Pass -z nodelete to mark the shared library as | 28 | if *flagAslr { |
| 29 | // non-closeable: a dlclose will do nothing. | 29 | argv = addASLRargs(argv) |
| 30 | @@ -1457,6 +1458,7 @@ func (ctxt *Link) hostlink() { | 30 | @@ -1358,6 +1359,7 @@ func (ctxt *Link) hostlink() { |
| 31 | argv = append(argv, "-Wl,-z,relro") | 31 | argv = append(argv, "-Wl,-z,relro") |
| 32 | } | 32 | } |
| 33 | argv = append(argv, "-shared") | 33 | argv = append(argv, "-shared") |
| @@ -35,7 +35,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | |||
| 35 | case BuildModePlugin: | 35 | case BuildModePlugin: |
| 36 | if ctxt.HeadType == objabi.Hdarwin { | 36 | if ctxt.HeadType == objabi.Hdarwin { |
| 37 | argv = append(argv, "-dynamiclib") | 37 | argv = append(argv, "-dynamiclib") |
| 38 | @@ -1465,6 +1467,7 @@ func (ctxt *Link) hostlink() { | 38 | @@ -1366,6 +1368,7 @@ func (ctxt *Link) hostlink() { |
| 39 | argv = append(argv, "-Wl,-z,relro") | 39 | argv = append(argv, "-Wl,-z,relro") |
| 40 | } | 40 | } |
| 41 | argv = append(argv, "-shared") | 41 | argv = append(argv, "-shared") |
diff --git a/meta/recipes-devtools/go/go-1.15/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch index 59c12d9546..59c12d9546 100644 --- a/meta/recipes-devtools/go/go-1.15/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch +++ b/meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch | |||
diff --git a/meta/recipes-devtools/go/go-1.15/0006-cmd-dist-separate-host-and-target-builds.patch b/meta/recipes-devtools/go/go-1.16/0006-cmd-dist-separate-host-and-target-builds.patch index 7aee0bac43..7aee0bac43 100644 --- a/meta/recipes-devtools/go/go-1.15/0006-cmd-dist-separate-host-and-target-builds.patch +++ b/meta/recipes-devtools/go/go-1.16/0006-cmd-dist-separate-host-and-target-builds.patch | |||
diff --git a/meta/recipes-devtools/go/go-1.15/0007-cmd-go-make-GOROOT-precious-by-default.patch b/meta/recipes-devtools/go/go-1.16/0007-cmd-go-make-GOROOT-precious-by-default.patch index 4b4d0d4f3d..4b4d0d4f3d 100644 --- a/meta/recipes-devtools/go/go-1.15/0007-cmd-go-make-GOROOT-precious-by-default.patch +++ b/meta/recipes-devtools/go/go-1.16/0007-cmd-go-make-GOROOT-precious-by-default.patch | |||
diff --git a/meta/recipes-devtools/go/go-1.15/0008-use-GOBUILDMODE-to-set-buildmode.patch b/meta/recipes-devtools/go/go-1.16/0008-use-GOBUILDMODE-to-set-buildmode.patch index 4e5d5021d6..4e5d5021d6 100644 --- a/meta/recipes-devtools/go/go-1.15/0008-use-GOBUILDMODE-to-set-buildmode.patch +++ b/meta/recipes-devtools/go/go-1.16/0008-use-GOBUILDMODE-to-set-buildmode.patch | |||
diff --git a/meta/recipes-devtools/go/go-1.16/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch b/meta/recipes-devtools/go/go-1.16/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch new file mode 100644 index 0000000000..dcbdf58752 --- /dev/null +++ b/meta/recipes-devtools/go/go-1.16/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | From a983bc6cd48fb0da939e3329cac18d7a3b29ecf8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 22 Feb 2021 17:54:01 -0800 | ||
| 4 | Subject: [PATCH] Revert "cmd/go: make sure CC and CXX are absolute" | ||
| 5 | |||
| 6 | OE uses CC/CXX values which consists of cmpiler and options together, | ||
| 7 | secondly, the environment is canned so this check add little value to OE | ||
| 8 | based builds | ||
| 9 | |||
| 10 | Fixes go-runtime build issues | ||
| 11 | |||
| 12 | go install: CXX environment variable is relative; must be absolute path: powerpc64le-yoe-linux-musl-g++ -mlittle-endian -mhard-float -m64 -mabi=elfv2 -mcpu=power9 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mnt/b/yoe/master/build/tmp/work/ppc64p9le-yoe-linux-musl/go/1.16-r0/recipe-sysroot | ||
| 13 | |||
| 14 | This reverts commit aa161e799df7e1eba99d2be10271e76b6f758142. | ||
| 15 | |||
| 16 | Upstream-Status: Inappropriate [OE-Specific] | ||
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 18 | --- | ||
| 19 | src/cmd/go/internal/envcmd/env.go | 5 ----- | ||
| 20 | src/cmd/go/internal/work/init.go | 7 ------- | ||
| 21 | src/cmd/go/testdata/script/env_write.txt | 24 ------------------------ | ||
| 22 | 3 files changed, 36 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go | ||
| 25 | index 6937187522..29f9057c3f 100644 | ||
| 26 | --- a/src/cmd/go/internal/envcmd/env.go | ||
| 27 | +++ b/src/cmd/go/internal/envcmd/env.go | ||
| 28 | @@ -427,11 +427,6 @@ func checkEnvWrite(key, val string) error { | ||
| 29 | if !filepath.IsAbs(val) && val != "" { | ||
| 30 | return fmt.Errorf("GOPATH entry is relative; must be absolute path: %q", val) | ||
| 31 | } | ||
| 32 | - // Make sure CC and CXX are absolute paths | ||
| 33 | - case "CC", "CXX": | ||
| 34 | - if !filepath.IsAbs(val) && val != "" && val != filepath.Base(val) { | ||
| 35 | - return fmt.Errorf("%s entry is relative; must be absolute path: %q", key, val) | ||
| 36 | - } | ||
| 37 | } | ||
| 38 | |||
| 39 | if !utf8.ValidString(val) { | ||
| 40 | diff --git a/src/cmd/go/internal/work/init.go b/src/cmd/go/internal/work/init.go | ||
| 41 | index ba7c7c2fbb..3a6df5f758 100644 | ||
| 42 | --- a/src/cmd/go/internal/work/init.go | ||
| 43 | +++ b/src/cmd/go/internal/work/init.go | ||
| 44 | @@ -41,13 +41,6 @@ func BuildInit() { | ||
| 45 | cfg.BuildPkgdir = p | ||
| 46 | } | ||
| 47 | |||
| 48 | - // Make sure CC and CXX are absolute paths | ||
| 49 | - for _, key := range []string{"CC", "CXX"} { | ||
| 50 | - if path := cfg.Getenv(key); !filepath.IsAbs(path) && path != "" && path != filepath.Base(path) { | ||
| 51 | - base.Fatalf("go %s: %s environment variable is relative; must be absolute path: %s\n", flag.Args()[0], key, path) | ||
| 52 | - } | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | // For each experiment that has been enabled in the toolchain, define a | ||
| 56 | // build tag with the same name but prefixed by "goexperiment." which can be | ||
| 57 | // used for compiling alternative files for the experiment. This allows | ||
| 58 | diff --git a/src/cmd/go/testdata/script/env_write.txt b/src/cmd/go/testdata/script/env_write.txt | ||
| 59 | index bda1e57826..c99aadb7f2 100644 | ||
| 60 | --- a/src/cmd/go/testdata/script/env_write.txt | ||
| 61 | +++ b/src/cmd/go/testdata/script/env_write.txt | ||
| 62 | @@ -129,30 +129,6 @@ go env -w GOTMPDIR= | ||
| 63 | go env GOTMPDIR | ||
| 64 | stdout ^$ | ||
| 65 | |||
| 66 | -# go env -w rejects relative CC values | ||
| 67 | -[!windows] go env -w CC=/usr/bin/clang | ||
| 68 | -go env -w CC=clang | ||
| 69 | -[!windows] ! go env -w CC=./clang | ||
| 70 | -[!windows] ! go env -w CC=bin/clang | ||
| 71 | -[!windows] stderr 'go env -w: CC entry is relative; must be absolute path' | ||
| 72 | - | ||
| 73 | -[windows] go env -w CC=$WORK\bin\clang | ||
| 74 | -[windows] ! go env -w CC=.\clang | ||
| 75 | -[windows] ! go env -w CC=bin\clang | ||
| 76 | -[windows] stderr 'go env -w: CC entry is relative; must be absolute path' | ||
| 77 | - | ||
| 78 | -# go env -w rejects relative CXX values | ||
| 79 | -[!windows] go env -w CC=/usr/bin/cpp | ||
| 80 | -go env -w CXX=cpp | ||
| 81 | -[!windows] ! go env -w CXX=./cpp | ||
| 82 | -[!windows] ! go env -w CXX=bin/cpp | ||
| 83 | -[!windows] stderr 'go env -w: CXX entry is relative; must be absolute path' | ||
| 84 | - | ||
| 85 | -[windows] go env -w CXX=$WORK\bin\cpp | ||
| 86 | -[windows] ! go env -w CXX=.\cpp | ||
| 87 | -[windows] ! go env -w CXX=bin\cpp | ||
| 88 | -[windows] stderr 'go env -w: CXX entry is relative; must be absolute path' | ||
| 89 | - | ||
| 90 | # go env -w/-u checks validity of GOOS/ARCH combinations | ||
| 91 | env GOOS= | ||
| 92 | env GOARCH= | ||
| 93 | -- | ||
| 94 | 2.30.1 | ||
| 95 | |||
diff --git a/meta/recipes-devtools/go/go-binary-native_1.15.8.bb b/meta/recipes-devtools/go/go-binary-native_1.16.bb index df697e2781..155a475c95 100644 --- a/meta/recipes-devtools/go/go-binary-native_1.15.8.bb +++ b/meta/recipes-devtools/go/go-binary-native_1.16.bb | |||
| @@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" | |||
| 8 | PROVIDES = "go-native" | 8 | PROVIDES = "go-native" |
| 9 | 9 | ||
| 10 | SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}" | 10 | SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}" |
| 11 | SRC_URI[go_linux_amd64.sha256sum] = "d3379c32a90fdf9382166f8f48034c459a8cc433730bc9476d39d9082c94583b" | 11 | SRC_URI[go_linux_amd64.sha256sum] = "013a489ebb3e24ef3d915abe5b94c3286c070dfe0818d5bca8108f1d6e8440d2" |
| 12 | SRC_URI[go_linux_arm64.sha256sum] = "0e31ea4bf53496b0f0809730520dee98c0ae5c530f3701a19df0ba0a327bf3d2" | 12 | SRC_URI[go_linux_arm64.sha256sum] = "3770f7eb22d05e25fbee8fb53c2a4e897da043eb83c69b9a14f8d98562cd8098" |
| 13 | 13 | ||
| 14 | UPSTREAM_CHECK_URI = "https://golang.org/dl/" | 14 | UPSTREAM_CHECK_URI = "https://golang.org/dl/" |
| 15 | UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux" | 15 | UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux" |
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.15.bb b/meta/recipes-devtools/go/go-cross-canadian_1.16.bb index 7ac9449e47..7ac9449e47 100644 --- a/meta/recipes-devtools/go/go-cross-canadian_1.15.bb +++ b/meta/recipes-devtools/go/go-cross-canadian_1.16.bb | |||
diff --git a/meta/recipes-devtools/go/go-cross_1.15.bb b/meta/recipes-devtools/go/go-cross_1.16.bb index 80b5a03f6c..80b5a03f6c 100644 --- a/meta/recipes-devtools/go/go-cross_1.15.bb +++ b/meta/recipes-devtools/go/go-cross_1.16.bb | |||
diff --git a/meta/recipes-devtools/go/go-crosssdk_1.15.bb b/meta/recipes-devtools/go/go-crosssdk_1.16.bb index 1857c8a577..1857c8a577 100644 --- a/meta/recipes-devtools/go/go-crosssdk_1.15.bb +++ b/meta/recipes-devtools/go/go-crosssdk_1.16.bb | |||
diff --git a/meta/recipes-devtools/go/go-native_1.15.bb b/meta/recipes-devtools/go/go-native_1.16.bb index f14892cdb0..f14892cdb0 100644 --- a/meta/recipes-devtools/go/go-native_1.15.bb +++ b/meta/recipes-devtools/go/go-native_1.16.bb | |||
diff --git a/meta/recipes-devtools/go/go-runtime_1.15.bb b/meta/recipes-devtools/go/go-runtime_1.16.bb index d6ddb31ed4..d6ddb31ed4 100644 --- a/meta/recipes-devtools/go/go-runtime_1.15.bb +++ b/meta/recipes-devtools/go/go-runtime_1.16.bb | |||
diff --git a/meta/recipes-devtools/go/go_1.15.bb b/meta/recipes-devtools/go/go_1.16.bb index d4812c0f0a..d4812c0f0a 100644 --- a/meta/recipes-devtools/go/go_1.15.bb +++ b/meta/recipes-devtools/go/go_1.16.bb | |||
