diff --git a/programming/language/go/actions.py b/programming/language/go/actions.py index 00a744270c..c9535b1448 100644 --- a/programming/language/go/actions.py +++ b/programming/language/go/actions.py @@ -16,12 +16,12 @@ def build(): shelltools.export("go_platform","linux-amd64") shelltools.export("go_linker","/lib/ld-linux-x86-64.so.2") - shelltools.export("GOROOT", "%s/go-go1.7.5" % get.workDIR()) #0 + shelltools.export("GOROOT", "%s/go-go1.7.6" % get.workDIR()) #0 shelltools.export("GOBIN", "$GOROOT/bin") #1 shelltools.export("GOPATH", "%s" % get.workDIR()) shelltools.export("GOROOT_FINAL", "/usr/lib/go") - shelltools.export("GOROOT_BOOTSTRAP", "%s/go-go1.7.5/go-linux-amd64-bootstrap" % get.workDIR()) #2 + shelltools.export("GOROOT_BOOTSTRAP", "%s/go-go1.7.6/go-linux-amd64-bootstrap" % get.workDIR()) #2 shelltools.export("GOOS","linux") shelltools.export("GOARCH","amd64") diff --git a/programming/language/go/files/45f759500ec80a1362deecd3693cbe44a354bf98.patch b/programming/language/go/files/45f759500ec80a1362deecd3693cbe44a354bf98.patch new file mode 100644 index 0000000000..0283b762fa --- /dev/null +++ b/programming/language/go/files/45f759500ec80a1362deecd3693cbe44a354bf98.patch @@ -0,0 +1,63 @@ +Upstream: yes + +From 45f759500ec80a1362deecd3693cbe44a354bf98 Mon Sep 17 00:00:00 2001 +From: Ian Lance Taylor +Date: Mon, 28 Nov 2016 16:19:03 -0800 +Subject: [PATCH] cmd/link: handle STT_COMMON symbols + +Tested by running + +GOTRACEBACK=2 CGO_CFLAGS="-Wa,--elf-stt-common=yes" go test -ldflags=-linkmode=internal + +in misc/cgo/test. That failed before this CL, succeeded after. + +I don't think it's worth doing that as a regular test, though, +especially since only recent versions of the GNU binutils support the +--elf-stt-common option. + +Fixes #18088. + +Change-Id: I893d86181faee217b1504c054b0ed3f7c8d977d3 +Reviewed-on: https://go-review.googlesource.com/33653 +Run-TryBot: Ian Lance Taylor +TryBot-Result: Gobot Gobot +Reviewed-by: Brad Fitzpatrick +--- + src/cmd/link/internal/ld/ldelf.go | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/cmd/link/internal/ld/ldelf.go b/src/cmd/link/internal/ld/ldelf.go +index d700aa6..00e8f37 100644 +--- a/src/cmd/link/internal/ld/ldelf.go ++++ b/src/cmd/link/internal/ld/ldelf.go +@@ -137,6 +137,8 @@ const ( + ElfSymTypeFunc = 2 + ElfSymTypeSection = 3 + ElfSymTypeFile = 4 ++ ElfSymTypeCommon = 5 ++ ElfSymTypeTLS = 6 + ) + + const ( +@@ -751,10 +753,10 @@ func ldelf(ctxt *Link, f *bio.Reader, pkg string, length int64, pn string) { + goto bad + } + symbols[i] = sym.sym +- if sym.type_ != ElfSymTypeFunc && sym.type_ != ElfSymTypeObject && sym.type_ != ElfSymTypeNone { ++ if sym.type_ != ElfSymTypeFunc && sym.type_ != ElfSymTypeObject && sym.type_ != ElfSymTypeNone && sym.type_ != ElfSymTypeCommon { + continue + } +- if sym.shndx == ElfSymShnCommon { ++ if sym.shndx == ElfSymShnCommon || sym.type_ == ElfSymTypeCommon { + s = sym.sym + if uint64(s.Size) < sym.size { + s.Size = int64(sym.size) +@@ -1035,7 +1037,7 @@ func readelfsym(ctxt *Link, elfobj *ElfObj, i int, sym *ElfSym, needSym int, loc + case ElfSymTypeSection: + s = elfobj.sect[sym.shndx].sym + +- case ElfSymTypeObject, ElfSymTypeFunc, ElfSymTypeNone: ++ case ElfSymTypeObject, ElfSymTypeFunc, ElfSymTypeNone, ElfSymTypeCommon: + switch sym.bind { + case ElfSymBindGlobal: + if needSym != 0 { diff --git a/programming/language/go/pspec.xml b/programming/language/go/pspec.xml index c5ac6130a7..63066eb746 100644 --- a/programming/language/go/pspec.xml +++ b/programming/language/go/pspec.xml @@ -12,14 +12,17 @@ app:console Compiler and tools for the Go programming language from Google Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. - https://github.com/golang/go/archive/go1.7.5.tar.gz - https://dev.gentoo.org/~williamh/dist/go-linux-amd64-bootstrap.tbz + https://github.com/golang/go/archive/go1.7.6.tar.gz + https://dev.gentoo.org/~williamh/dist/go-linux-amd64-bootstrap.tbz + + 45f759500ec80a1362deecd3693cbe44a354bf98.patch + golang @@ -38,6 +41,13 @@ + + 2017-08-21 + 1.7.6 + Version bump. + Ertuğrul Erata + ertugrulerata@gmail.com + 2017-03-20 1.7.5