diff options
| author | Lee Chee Yang <chee.yang.lee@intel.com> | 2020-12-01 22:00:13 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-09 23:49:01 +0000 |
| commit | 861cfcd52f0b769772c3726530210f2f43c3449b (patch) | |
| tree | c455cf15d3a969778f4c0e9a2433e9cbfb524f10 /meta | |
| parent | e6cb075cd37b379d97fab60eb0ecd3531523a793 (diff) | |
| download | poky-861cfcd52f0b769772c3726530210f2f43c3449b.tar.gz | |
go: update to 1.14.12
update minor version to 1.14.12
go1.14.8 includes security fixes to the net/http/cgi and net/http/fcgi packages.
go1.14.9 includes fixes to the compiler, linker, runtime, documentation, and the net/http and testing packages.
go1.14.10 includes fixes to the compiler, runtime, and the plugin and testing packages.
go1.14.11 includes fixes to the runtime, and the net/http and time packages.
go1.14.12 includes security fixes to the cmd/go and math/big packages.
Release notes:
https://golang.org/doc/devel/release.html#go1.14.minor
updates include fix for
CVE-2020-24553
CVE-2020-28362
CVE-2020-28366
CVE-2020-28367
Also backport patch to fix below CGO_LDFLAGS error
| Building std for target, linux/amd64.
| go build runtime/cgo: invalid flag in go:cgo_ldflag: -Wl,-O1
(From OE-Core rev: e216b2223cbe8c459348262f98b3cfbe79d12023)
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-devtools/go/go-1.14.inc | 5 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-1.14/0010-cmd-go-permit-CGO_LDFLAGS-to-appear-in-go-ldflag.patch | 98 |
2 files changed, 101 insertions, 2 deletions
diff --git a/meta/recipes-devtools/go/go-1.14.inc b/meta/recipes-devtools/go/go-1.14.inc index 8f8ed89de8..02c40f4e25 100644 --- a/meta/recipes-devtools/go/go-1.14.inc +++ b/meta/recipes-devtools/go/go-1.14.inc | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | require go-common.inc | 1 | require go-common.inc |
| 2 | 2 | ||
| 3 | GO_BASEVERSION = "1.14" | 3 | GO_BASEVERSION = "1.14" |
| 4 | GO_MINOR = ".7" | 4 | GO_MINOR = ".12" |
| 5 | PV .= "${GO_MINOR}" | 5 | PV .= "${GO_MINOR}" |
| 6 | FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" | 6 | FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" |
| 7 | 7 | ||
| @@ -16,6 +16,7 @@ SRC_URI += "\ | |||
| 16 | file://0006-cmd-dist-separate-host-and-target-builds.patch \ | 16 | file://0006-cmd-dist-separate-host-and-target-builds.patch \ |
| 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 | file://0010-cmd-go-permit-CGO_LDFLAGS-to-appear-in-go-ldflag.patch \ | ||
| 19 | " | 20 | " |
| 20 | SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch" | 21 | SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch" |
| 21 | SRC_URI[main.sha256sum] = "064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3" | 22 | SRC_URI[main.sha256sum] = "b34f4b7ad799eab4c1a52bdef253602ce957125a512f5a1b28dce43c6841b971" |
diff --git a/meta/recipes-devtools/go/go-1.14/0010-cmd-go-permit-CGO_LDFLAGS-to-appear-in-go-ldflag.patch b/meta/recipes-devtools/go/go-1.14/0010-cmd-go-permit-CGO_LDFLAGS-to-appear-in-go-ldflag.patch new file mode 100644 index 0000000000..85bf39c752 --- /dev/null +++ b/meta/recipes-devtools/go/go-1.14/0010-cmd-go-permit-CGO_LDFLAGS-to-appear-in-go-ldflag.patch | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | From 782cf560db4c919790fdb476d1bbe18e5ddf5ffd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ian Lance Taylor <iant@golang.org> | ||
| 3 | Date: Fri, 13 Nov 2020 11:05:37 -0800 | ||
| 4 | Subject: [PATCH] cmd/go: permit CGO_LDFLAGS to appear in //go:ldflag | ||
| 5 | |||
| 6 | Fixes #42565 | ||
| 7 | |||
| 8 | Change-Id: If7cf39905d124dbd54dfac6a53ee38270498efed | ||
| 9 | Reviewed-on: https://go-review.googlesource.com/c/go/+/269818 | ||
| 10 | Trust: Ian Lance Taylor <iant@golang.org> | ||
| 11 | Run-TryBot: Ian Lance Taylor <iant@golang.org> | ||
| 12 | TryBot-Result: Go Bot <gobot@golang.org> | ||
| 13 | Reviewed-by: Jay Conrod <jayconrod@google.com> | ||
| 14 | |||
| 15 | Upstream-Status: Backport [https://github.com/golang/go/commit/782cf560db4c919790fdb476d1bbe18e5ddf5ffd] | ||
| 16 | Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> | ||
| 17 | --- | ||
| 18 | src/cmd/go/internal/work/exec.go | 15 +++++++++ | ||
| 19 | src/cmd/go/testdata/script/ldflag.txt | 44 +++++++++++++++++++++++++++ | ||
| 20 | 2 files changed, 59 insertions(+) | ||
| 21 | create mode 100644 src/cmd/go/testdata/script/ldflag.txt | ||
| 22 | |||
| 23 | diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go | ||
| 24 | index 2c40a4bf001e..157ac4cafc70 100644 | ||
| 25 | --- a/src/cmd/go/internal/work/exec.go | ||
| 26 | +++ b/src/cmd/go/internal/work/exec.go | ||
| 27 | @@ -2883,6 +2883,21 @@ func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgo | ||
| 28 | idx = bytes.Index(src, []byte(cgoLdflag)) | ||
| 29 | } | ||
| 30 | } | ||
| 31 | + | ||
| 32 | + // We expect to find the contents of cgoLDFLAGS in flags. | ||
| 33 | + if len(cgoLDFLAGS) > 0 { | ||
| 34 | + outer: | ||
| 35 | + for i := range flags { | ||
| 36 | + for j, f := range cgoLDFLAGS { | ||
| 37 | + if f != flags[i+j] { | ||
| 38 | + continue outer | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + flags = append(flags[:i], flags[i+len(cgoLDFLAGS):]...) | ||
| 42 | + break | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | if err := checkLinkerFlags("LDFLAGS", "go:cgo_ldflag", flags); err != nil { | ||
| 47 | return nil, nil, err | ||
| 48 | } | ||
| 49 | diff --git a/src/cmd/go/testdata/script/ldflag.txt b/src/cmd/go/testdata/script/ldflag.txt | ||
| 50 | new file mode 100644 | ||
| 51 | index 000000000000..6ceb33bb70e7 | ||
| 52 | --- /dev/null | ||
| 53 | +++ b/src/cmd/go/testdata/script/ldflag.txt | ||
| 54 | @@ -0,0 +1,44 @@ | ||
| 55 | +# Issue #42565 | ||
| 56 | + | ||
| 57 | +[!cgo] skip | ||
| 58 | + | ||
| 59 | +# We can't build package bad, which uses #cgo LDFLAGS. | ||
| 60 | +cd bad | ||
| 61 | +! go build | ||
| 62 | +stderr no-such-warning | ||
| 63 | + | ||
| 64 | +# We can build package ok with the same flags in CGO_LDFLAGS. | ||
| 65 | +env CGO_LDFLAGS=-Wno-such-warning -Wno-unknown-warning-option | ||
| 66 | +cd ../ok | ||
| 67 | +go build | ||
| 68 | + | ||
| 69 | +# Build a main program that actually uses LDFLAGS. | ||
| 70 | +cd .. | ||
| 71 | +go build -ldflags=-v | ||
| 72 | + | ||
| 73 | +# Because we passed -v the Go linker should print the external linker | ||
| 74 | +# command which should include the flag we passed in CGO_LDFLAGS. | ||
| 75 | +stderr no-such-warning | ||
| 76 | + | ||
| 77 | +-- go.mod -- | ||
| 78 | +module ldflag | ||
| 79 | + | ||
| 80 | +-- bad/bad.go -- | ||
| 81 | +package bad | ||
| 82 | + | ||
| 83 | +// #cgo LDFLAGS: -Wno-such-warning -Wno-unknown-warning | ||
| 84 | +import "C" | ||
| 85 | + | ||
| 86 | +func F() {} | ||
| 87 | +-- ok/ok.go -- | ||
| 88 | +package ok | ||
| 89 | + | ||
| 90 | +import "C" | ||
| 91 | + | ||
| 92 | +func F() {} | ||
| 93 | +-- main.go -- | ||
| 94 | +package main | ||
| 95 | + | ||
| 96 | +import _ "ldflag/ok" | ||
| 97 | + | ||
| 98 | +func main() {} | ||
