summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-09-03 19:23:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-05 22:19:20 +0100
commit19e786b6fac8ecce6bb083db3dc9ff3ccc2584b2 (patch)
treeffc152bbad1291d0916d7dbe680aeb3c3e67377b /meta/recipes-devtools
parentd567c995c3b3aa844e20b5117d54c71d2987d8f2 (diff)
downloadpoky-19e786b6fac8ecce6bb083db3dc9ff3ccc2584b2.tar.gz
go: Upgrade to 1.15 major release
1.15 is latest major release changelog is [1] and detailed blog is [2] Drop hardcoding ldso patch in favor of setting it using GO_LDSO variable which can be defined in terms of linuxloader defined by OE Setting GOBUILDMODE to pie is no longer needed [1] https://golang.org/doc/go1.15 [2] https://blog.golang.org/go1.15 (From OE-Core rev: aa1bfaff4adc9246a2d65592b3a8061d55829086) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/go/go-1.14/0009-ld-replace-glibc-dynamic-linker-with-musl.patch115
-rw-r--r--meta/recipes-devtools/go/go-1.15.inc (renamed from meta/recipes-devtools/go/go-1.14.inc)7
-rw-r--r--meta/recipes-devtools/go/go-1.15/0001-allow-CC-and-CXX-to-have-multiple-words.patch (renamed from meta/recipes-devtools/go/go-1.14/0001-allow-CC-and-CXX-to-have-multiple-words.patch)2
-rw-r--r--meta/recipes-devtools/go/go-1.15/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch (renamed from meta/recipes-devtools/go/go-1.14/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch)22
-rw-r--r--meta/recipes-devtools/go/go-1.15/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch (renamed from meta/recipes-devtools/go/go-1.14/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch)0
-rw-r--r--meta/recipes-devtools/go/go-1.15/0004-ld-add-soname-to-shareable-objects.patch (renamed from meta/recipes-devtools/go/go-1.14/0004-ld-add-soname-to-shareable-objects.patch)6
-rw-r--r--meta/recipes-devtools/go/go-1.15/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch (renamed from meta/recipes-devtools/go/go-1.14/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch)0
-rw-r--r--meta/recipes-devtools/go/go-1.15/0006-cmd-dist-separate-host-and-target-builds.patch (renamed from meta/recipes-devtools/go/go-1.14/0006-cmd-dist-separate-host-and-target-builds.patch)0
-rw-r--r--meta/recipes-devtools/go/go-1.15/0007-cmd-go-make-GOROOT-precious-by-default.patch (renamed from meta/recipes-devtools/go/go-1.14/0007-cmd-go-make-GOROOT-precious-by-default.patch)6
-rw-r--r--meta/recipes-devtools/go/go-1.15/0008-use-GOBUILDMODE-to-set-buildmode.patch (renamed from meta/recipes-devtools/go/go-1.14/0008-use-GOBUILDMODE-to-set-buildmode.patch)2
-rw-r--r--meta/recipes-devtools/go/go-binary-native_1.15.1.bb (renamed from meta/recipes-devtools/go/go-binary-native_1.14.7.bb)4
-rw-r--r--meta/recipes-devtools/go/go-cross-canadian_1.15.bb (renamed from meta/recipes-devtools/go/go-cross-canadian_1.14.bb)0
-rw-r--r--meta/recipes-devtools/go/go-cross_1.15.bb (renamed from meta/recipes-devtools/go/go-cross_1.14.bb)0
-rw-r--r--meta/recipes-devtools/go/go-crosssdk_1.15.bb (renamed from meta/recipes-devtools/go/go-crosssdk_1.14.bb)0
-rw-r--r--meta/recipes-devtools/go/go-native_1.15.bb (renamed from meta/recipes-devtools/go/go-native_1.14.bb)1
-rw-r--r--meta/recipes-devtools/go/go-runtime_1.15.bb (renamed from meta/recipes-devtools/go/go-runtime_1.14.bb)0
-rw-r--r--meta/recipes-devtools/go/go_1.15.bb (renamed from meta/recipes-devtools/go/go_1.14.bb)9
17 files changed, 29 insertions, 145 deletions
diff --git a/meta/recipes-devtools/go/go-1.14/0009-ld-replace-glibc-dynamic-linker-with-musl.patch b/meta/recipes-devtools/go/go-1.14/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
deleted file mode 100644
index 427cfb0dd2..0000000000
--- a/meta/recipes-devtools/go/go-1.14/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
+++ /dev/null
@@ -1,115 +0,0 @@
1From 973251ae0c69a35721f6115345d3f57b2847979f Mon Sep 17 00:00:00 2001
2From: Alex Kube <alexander.j.kube@gmail.com>
3Date: Wed, 23 Oct 2019 21:20:13 +0430
4Subject: [PATCH 9/9] ld: replace glibc dynamic linker with musl
5
6Rework of patch by Khem Raj <raj.khem@gmail.com>
7for go 1.10. Should be applied conditionally on
8musl being the system C library.
9
10Adapted to Go 1.13 from patches originally submitted to
11the meta/recipes-devtools/go tree by
12Matt Madison <matt@madison.systems>.
13
14Upstream-Status: Inappropriate [Real fix should be portable across libcs]
15
16Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
17---
18 src/cmd/link/internal/amd64/obj.go | 2 +-
19 src/cmd/link/internal/arm/obj.go | 2 +-
20 src/cmd/link/internal/arm64/obj.go | 2 +-
21 src/cmd/link/internal/mips/obj.go | 2 +-
22 src/cmd/link/internal/mips64/obj.go | 2 +-
23 src/cmd/link/internal/ppc64/obj.go | 2 +-
24 src/cmd/link/internal/s390x/obj.go | 2 +-
25 src/cmd/link/internal/x86/obj.go | 2 +-
26 8 files changed, 8 insertions(+), 8 deletions(-)
27
28--- a/src/cmd/link/internal/amd64/obj.go
29+++ b/src/cmd/link/internal/amd64/obj.go
30@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) {
31 PEreloc1: pereloc1,
32 TLSIEtoLE: tlsIEtoLE,
33
34- Linuxdynld: "/lib64/ld-linux-x86-64.so.2",
35+ Linuxdynld: "/lib64/ld-musl-x86-64.so.1",
36 Freebsddynld: "/libexec/ld-elf.so.1",
37 Openbsddynld: "/usr/libexec/ld.so",
38 Netbsddynld: "/libexec/ld.elf_so",
39--- a/src/cmd/link/internal/arm/obj.go
40+++ b/src/cmd/link/internal/arm/obj.go
41@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) {
42 Machoreloc1: machoreloc1,
43 PEreloc1: pereloc1,
44
45- Linuxdynld: "/lib/ld-linux.so.3", // 2 for OABI, 3 for EABI
46+ Linuxdynld: "/lib/ld-musl-armhf.so.1",
47 Freebsddynld: "/usr/libexec/ld-elf.so.1",
48 Openbsddynld: "/usr/libexec/ld.so",
49 Netbsddynld: "/libexec/ld.elf_so",
50--- a/src/cmd/link/internal/arm64/obj.go
51+++ b/src/cmd/link/internal/arm64/obj.go
52@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
53 Gentext: gentext,
54 Machoreloc1: machoreloc1,
55
56- Linuxdynld: "/lib/ld-linux-aarch64.so.1",
57+ Linuxdynld: "/lib/ld-musl-aarch64.so.1",
58
59 Freebsddynld: "/usr/libexec/ld-elf.so.1",
60 Openbsddynld: "/usr/libexec/ld.so",
61--- a/src/cmd/link/internal/mips/obj.go
62+++ b/src/cmd/link/internal/mips/obj.go
63@@ -60,7 +60,7 @@ func Init() (*sys.Arch, ld.Arch) {
64 Gentext: gentext,
65 Machoreloc1: machoreloc1,
66
67- Linuxdynld: "/lib/ld.so.1",
68+ Linuxdynld: "/lib/ld-musl-mipsle.so.1",
69
70 Freebsddynld: "XXX",
71 Openbsddynld: "XXX",
72--- a/src/cmd/link/internal/mips64/obj.go
73+++ b/src/cmd/link/internal/mips64/obj.go
74@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) {
75 Gentext: gentext,
76 Machoreloc1: machoreloc1,
77
78- Linuxdynld: "/lib64/ld64.so.1",
79+ Linuxdynld: "/lib64/ld-musl-mips64le.so.1",
80 Freebsddynld: "XXX",
81 Openbsddynld: "XXX",
82 Netbsddynld: "XXX",
83--- a/src/cmd/link/internal/ppc64/obj.go
84+++ b/src/cmd/link/internal/ppc64/obj.go
85@@ -63,7 +63,7 @@ func Init() (*sys.Arch, ld.Arch) {
86 Xcoffreloc1: xcoffreloc1,
87
88 // TODO(austin): ABI v1 uses /usr/lib/ld.so.1,
89- Linuxdynld: "/lib64/ld64.so.1",
90+ Linuxdynld: "/lib64/ld-musl-powerpc64le.so.1",
91
92 Freebsddynld: "XXX",
93 Openbsddynld: "XXX",
94--- a/src/cmd/link/internal/s390x/obj.go
95+++ b/src/cmd/link/internal/s390x/obj.go
96@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
97 Gentext: gentext,
98 Machoreloc1: machoreloc1,
99
100- Linuxdynld: "/lib64/ld64.so.1",
101+ Linuxdynld: "/lib64/ld-musl-s390x.so.1",
102
103 // not relevant for s390x
104 Freebsddynld: "XXX",
105--- a/src/cmd/link/internal/x86/obj.go
106+++ b/src/cmd/link/internal/x86/obj.go
107@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
108 Machoreloc1: machoreloc1,
109 PEreloc1: pereloc1,
110
111- Linuxdynld: "/lib/ld-linux.so.2",
112+ Linuxdynld: "/lib/ld-musl-i386.so.1",
113 Freebsddynld: "/usr/libexec/ld-elf.so.1",
114 Openbsddynld: "/usr/libexec/ld.so",
115 Netbsddynld: "/usr/libexec/ld.elf_so",
diff --git a/meta/recipes-devtools/go/go-1.14.inc b/meta/recipes-devtools/go/go-1.15.inc
index 8f8ed89de8..48f523bb50 100644
--- a/meta/recipes-devtools/go/go-1.14.inc
+++ b/meta/recipes-devtools/go/go-1.15.inc
@@ -1,7 +1,7 @@
1require go-common.inc 1require go-common.inc
2 2
3GO_BASEVERSION = "1.14" 3GO_BASEVERSION = "1.15"
4GO_MINOR = ".7" 4GO_MINOR = ".1"
5PV .= "${GO_MINOR}" 5PV .= "${GO_MINOR}"
6FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" 6FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
7 7
@@ -17,5 +17,4 @@ SRC_URI += "\
17 file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ 17 file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
18 file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ 18 file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
19" 19"
20SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch" 20SRC_URI[main.sha256sum] = "d3743752a421881b5cc007c76b4b68becc3ad053e61275567edab1c99e154d30"
21SRC_URI[main.sha256sum] = "064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3"
diff --git a/meta/recipes-devtools/go/go-1.14/0001-allow-CC-and-CXX-to-have-multiple-words.patch b/meta/recipes-devtools/go/go-1.15/0001-allow-CC-and-CXX-to-have-multiple-words.patch
index d47664d8e2..5f4823be22 100644
--- a/meta/recipes-devtools/go/go-1.14/0001-allow-CC-and-CXX-to-have-multiple-words.patch
+++ b/meta/recipes-devtools/go/go-1.15/0001-allow-CC-and-CXX-to-have-multiple-words.patch
@@ -17,7 +17,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
17 17
18--- a/src/cmd/go/internal/envcmd/env.go 18--- a/src/cmd/go/internal/envcmd/env.go
19+++ b/src/cmd/go/internal/envcmd/env.go 19+++ b/src/cmd/go/internal/envcmd/env.go
20@@ -102,11 +102,11 @@ func MkEnv() []cfg.EnvVar { 20@@ -103,11 +103,11 @@ func MkEnv() []cfg.EnvVar {
21 21
22 cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch) 22 cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch)
23 if env := strings.Fields(cfg.Getenv("CC")); len(env) > 0 { 23 if env := strings.Fields(cfg.Getenv("CC")); len(env) > 0 {
diff --git a/meta/recipes-devtools/go/go-1.14/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch b/meta/recipes-devtools/go/go-1.15/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
index 9e88567ebd..d0511c0c40 100644
--- a/meta/recipes-devtools/go/go-1.14/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
+++ b/meta/recipes-devtools/go/go-1.15/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
@@ -52,7 +52,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
52 52
53--- a/src/cmd/go/internal/envcmd/env.go 53--- a/src/cmd/go/internal/envcmd/env.go
54+++ b/src/cmd/go/internal/envcmd/env.go 54+++ b/src/cmd/go/internal/envcmd/env.go
55@@ -156,7 +156,7 @@ func ExtraEnvVars() []cfg.EnvVar { 55@@ -157,7 +157,7 @@ func ExtraEnvVars() []cfg.EnvVar {
56 func ExtraEnvVarsCostly() []cfg.EnvVar { 56 func ExtraEnvVarsCostly() []cfg.EnvVar {
57 var b work.Builder 57 var b work.Builder
58 b.Init() 58 b.Init()
@@ -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@@ -32,6 +32,8 @@ import ( 66@@ -33,6 +33,8 @@ import (
67 "time" 67 "cmd/go/internal/str"
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@@ -208,7 +210,7 @@ func (b *Builder) buildActionID(a *Actio 75@@ -209,7 +211,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@@ -224,13 +226,13 @@ func (b *Builder) buildActionID(a *Actio 84@@ -228,13 +230,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@@ -2228,33 +2230,48 @@ var ( 102@@ -2298,33 +2300,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@@ -2263,11 +2280,16 @@ func (b *Builder) fcExe() []string { 160@@ -2333,11 +2350,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"].
@@ -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@@ -2428,7 +2450,7 @@ func envList(key, def string) []string { 178@@ -2510,7 +2532,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@@ -2447,6 +2469,14 @@ func (b *Builder) CFlags(p *load.Package 187@@ -2529,6 +2551,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@@ -2461,7 +2491,7 @@ var cgoRe = lazyregexp.New(`[/\\:]`) 202@@ -2543,7 +2573,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@@ -2820,7 +2850,7 @@ func (b *Builder) swigIntSize(objdir str 211@@ -2902,7 +2932,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.14/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/meta/recipes-devtools/go/go-1.15/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
index 662c705471..662c705471 100644
--- a/meta/recipes-devtools/go/go-1.14/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
+++ b/meta/recipes-devtools/go/go-1.15/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
diff --git a/meta/recipes-devtools/go/go-1.14/0004-ld-add-soname-to-shareable-objects.patch b/meta/recipes-devtools/go/go-1.15/0004-ld-add-soname-to-shareable-objects.patch
index 75c9c75211..da29923920 100644
--- a/meta/recipes-devtools/go/go-1.14/0004-ld-add-soname-to-shareable-objects.patch
+++ b/meta/recipes-devtools/go/go-1.15/0004-ld-add-soname-to-shareable-objects.patch
@@ -19,7 +19,7 @@ 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@@ -1280,6 +1280,7 @@ func (ctxt *Link) hostlink() { 22@@ -1446,6 +1446,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")
@@ -27,7 +27,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
27 if ctxt.HeadType != objabi.Hwindows { 27 if ctxt.HeadType != objabi.Hwindows {
28 // Pass -z nodelete to mark the shared library as 28 // Pass -z nodelete to mark the shared library as
29 // non-closeable: a dlclose will do nothing. 29 // non-closeable: a dlclose will do nothing.
30@@ -1291,6 +1292,7 @@ func (ctxt *Link) hostlink() { 30@@ -1457,6 +1458,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@@ -1299,6 +1301,7 @@ func (ctxt *Link) hostlink() { 38@@ -1465,6 +1467,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.14/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/meta/recipes-devtools/go/go-1.15/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
index 59c12d9546..59c12d9546 100644
--- a/meta/recipes-devtools/go/go-1.14/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
+++ b/meta/recipes-devtools/go/go-1.15/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
diff --git a/meta/recipes-devtools/go/go-1.14/0006-cmd-dist-separate-host-and-target-builds.patch b/meta/recipes-devtools/go/go-1.15/0006-cmd-dist-separate-host-and-target-builds.patch
index 7aee0bac43..7aee0bac43 100644
--- a/meta/recipes-devtools/go/go-1.14/0006-cmd-dist-separate-host-and-target-builds.patch
+++ b/meta/recipes-devtools/go/go-1.15/0006-cmd-dist-separate-host-and-target-builds.patch
diff --git a/meta/recipes-devtools/go/go-1.14/0007-cmd-go-make-GOROOT-precious-by-default.patch b/meta/recipes-devtools/go/go-1.15/0007-cmd-go-make-GOROOT-precious-by-default.patch
index b93f83de69..4b4d0d4f3d 100644
--- a/meta/recipes-devtools/go/go-1.14/0007-cmd-go-make-GOROOT-precious-by-default.patch
+++ b/meta/recipes-devtools/go/go-1.15/0007-cmd-go-make-GOROOT-precious-by-default.patch
@@ -63,7 +63,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
63 // Note that flags consulted by other parts of the code 63 // Note that flags consulted by other parts of the code
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@@ -464,6 +464,23 @@ func (b *Builder) build(a *Action) (err 66@@ -468,6 +468,23 @@ func (b *Builder) build(a *Action) (err
67 return errors.New("binary-only packages are no longer supported") 67 return errors.New("binary-only packages are no longer supported")
68 } 68 }
69 69
@@ -87,8 +87,8 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
87 if err := b.Mkdir(a.Objdir); err != nil { 87 if err := b.Mkdir(a.Objdir); err != nil {
88 return err 88 return err
89 } 89 }
90@@ -1493,6 +1510,14 @@ func BuildInstallFunc(b *Builder, a *Act 90@@ -1520,6 +1537,14 @@ func BuildInstallFunc(b *Builder, a *Act
91 return nil 91 return err
92 } 92 }
93 93
94+ if goRootPrecious && a.Package != nil { 94+ if goRootPrecious && a.Package != nil {
diff --git a/meta/recipes-devtools/go/go-1.14/0008-use-GOBUILDMODE-to-set-buildmode.patch b/meta/recipes-devtools/go/go-1.15/0008-use-GOBUILDMODE-to-set-buildmode.patch
index b15d9812aa..4e5d5021d6 100644
--- a/meta/recipes-devtools/go/go-1.14/0008-use-GOBUILDMODE-to-set-buildmode.patch
+++ b/meta/recipes-devtools/go/go-1.15/0008-use-GOBUILDMODE-to-set-buildmode.patch
@@ -25,7 +25,7 @@ Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
25 25
26--- a/src/cmd/go/internal/work/build.go 26--- a/src/cmd/go/internal/work/build.go
27+++ b/src/cmd/go/internal/work/build.go 27+++ b/src/cmd/go/internal/work/build.go
28@@ -251,7 +251,13 @@ func AddBuildFlags(cmd *base.Command, ma 28@@ -254,7 +254,13 @@ func AddBuildFlags(cmd *base.Command, ma
29 29
30 cmd.Flag.Var(&load.BuildAsmflags, "asmflags", "") 30 cmd.Flag.Var(&load.BuildAsmflags, "asmflags", "")
31 cmd.Flag.Var(buildCompiler{}, "compiler", "") 31 cmd.Flag.Var(buildCompiler{}, "compiler", "")
diff --git a/meta/recipes-devtools/go/go-binary-native_1.14.7.bb b/meta/recipes-devtools/go/go-binary-native_1.15.1.bb
index 3452ca46d4..a4eca7f4c1 100644
--- a/meta/recipes-devtools/go/go-binary-native_1.14.7.bb
+++ b/meta/recipes-devtools/go/go-binary-native_1.15.1.bb
@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
8PROVIDES = "go-native" 8PROVIDES = "go-native"
9 9
10SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}" 10SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
11SRC_URI[go_linux_amd64.sha256sum] = "4a7fa60f323ee1416a4b1425aefc37ea359e9d64df19c326a58953a97ad41ea5" 11SRC_URI[go_linux_amd64.sha256sum] = "70ac0dbf60a8ee9236f337ed0daa7a4c3b98f6186d4497826f68e97c0c0413f6"
12SRC_URI[go_linux_arm64.sha256sum] = "fe5b6f6e441f3cb7b53ebf1a010bbebcb720ac98124984cfe2e51d72b8a58c71" 12SRC_URI[go_linux_arm64.sha256sum] = "ca21c771d906fbba8840b3a4831b1aa118f6e09b5d028323592faba382787a03"
13 13
14UPSTREAM_CHECK_URI = "https://golang.org/dl/" 14UPSTREAM_CHECK_URI = "https://golang.org/dl/"
15UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux" 15UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.14.bb b/meta/recipes-devtools/go/go-cross-canadian_1.15.bb
index 7ac9449e47..7ac9449e47 100644
--- a/meta/recipes-devtools/go/go-cross-canadian_1.14.bb
+++ b/meta/recipes-devtools/go/go-cross-canadian_1.15.bb
diff --git a/meta/recipes-devtools/go/go-cross_1.14.bb b/meta/recipes-devtools/go/go-cross_1.15.bb
index 80b5a03f6c..80b5a03f6c 100644
--- a/meta/recipes-devtools/go/go-cross_1.14.bb
+++ b/meta/recipes-devtools/go/go-cross_1.15.bb
diff --git a/meta/recipes-devtools/go/go-crosssdk_1.14.bb b/meta/recipes-devtools/go/go-crosssdk_1.15.bb
index 1857c8a577..1857c8a577 100644
--- a/meta/recipes-devtools/go/go-crosssdk_1.14.bb
+++ b/meta/recipes-devtools/go/go-crosssdk_1.15.bb
diff --git a/meta/recipes-devtools/go/go-native_1.14.bb b/meta/recipes-devtools/go/go-native_1.15.bb
index c5cb97e73e..f14892cdb0 100644
--- a/meta/recipes-devtools/go/go-native_1.14.bb
+++ b/meta/recipes-devtools/go/go-native_1.15.bb
@@ -6,7 +6,6 @@ require go-${PV}.inc
6inherit native 6inherit native
7 7
8SRC_URI_append = " https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4" 8SRC_URI_append = " https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4"
9SRC_URI[bootstrap.md5sum] = "dbf727a4b0e365bf88d97cbfde590016"
10SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52" 9SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52"
11 10
12export GOOS = "${BUILD_GOOS}" 11export GOOS = "${BUILD_GOOS}"
diff --git a/meta/recipes-devtools/go/go-runtime_1.14.bb b/meta/recipes-devtools/go/go-runtime_1.15.bb
index 4eeee65e0c..4eeee65e0c 100644
--- a/meta/recipes-devtools/go/go-runtime_1.14.bb
+++ b/meta/recipes-devtools/go/go-runtime_1.15.bb
diff --git a/meta/recipes-devtools/go/go_1.14.bb b/meta/recipes-devtools/go/go_1.15.bb
index bc90a1329e..4bf9dd50b2 100644
--- a/meta/recipes-devtools/go/go_1.14.bb
+++ b/meta/recipes-devtools/go/go_1.15.bb
@@ -1,14 +1,15 @@
1require go-${PV}.inc 1require go-${PV}.inc
2require go-target.inc 2require go-target.inc
3 3
4inherit linuxloader
5
4export GOBUILDMODE="" 6export GOBUILDMODE=""
5export CGO_ENABLED_riscv64 = "" 7export CGO_ENABLED_riscv64 = ""
6# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips/riscv 8export GO_LDSO = "${@get_linuxloader(d)}"
7# doesn't support -buildmode=pie, so skip the QA checking for mips/riscv and its 9
10# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv and its
8# variants. 11# variants.
9python() { 12python() {
10 if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True): 13 if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True):
11 d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel") 14 d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel")
12 else:
13 d.setVar('GOBUILDMODE', 'pie')
14} 15}