summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2017-09-08 18:04:33 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-11 17:30:30 +0100
commit30e23e15563dcee2e9d8d559a55bff97079cf713 (patch)
tree10c58f40fa85b63e27855fcf55cb374c47c4cecd /meta/recipes-devtools
parent8a43f94d1d5e3a7aed56a55447652618e7f0c4ef (diff)
downloadpoky-30e23e15563dcee2e9d8d559a55bff97079cf713.tar.gz
go: Remove Go 1.6 and 1.7 releases
The OE-Core has no reason to support multiple versions of Go as this increases the maintenance work and testing efforts. So we are going to support just a single version from now on which currently is 1.8.3. The 1.4 release is kept around as it is used for bootstrap, as such, it cannot be removed. (From OE-Core rev: 26abbf129d7ca0d36f6244f96fa8a572fd847899) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/go/go-1.6.inc19
-rw-r--r--meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch23
-rw-r--r--meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch50
-rw-r--r--meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch17
-rw-r--r--meta/recipes-devtools/go/go-1.6/gotooldir.patch30
-rw-r--r--meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch63
-rw-r--r--meta/recipes-devtools/go/go-1.6/syslog.patch62
-rw-r--r--meta/recipes-devtools/go/go-1.7.inc19
-rw-r--r--meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch23
-rw-r--r--meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch50
-rw-r--r--meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch17
-rw-r--r--meta/recipes-devtools/go/go-1.7/gotooldir.patch30
-rw-r--r--meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch62
-rw-r--r--meta/recipes-devtools/go/go-1.7/syslog.patch62
-rw-r--r--meta/recipes-devtools/go/go-cross_1.7.bb5
-rw-r--r--meta/recipes-devtools/go/go_1.6.bb4
-rw-r--r--meta/recipes-devtools/go/go_1.7.bb2
17 files changed, 0 insertions, 538 deletions
diff --git a/meta/recipes-devtools/go/go-1.6.inc b/meta/recipes-devtools/go/go-1.6.inc
deleted file mode 100644
index 769c1d8f22..0000000000
--- a/meta/recipes-devtools/go/go-1.6.inc
+++ /dev/null
@@ -1,19 +0,0 @@
1require go-common.inc
2
3PV = "1.6.3"
4GO_BASEVERSION = "1.6"
5FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
6
7LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81"
8
9SRC_URI += "\
10 file://armhf-elf-header.patch \
11 file://syslog.patch \
12 file://fix-target-cc-for-build.patch \
13 file://fix-cc-handling.patch \
14 file://split-host-and-target-build.patch \
15 file://gotooldir.patch \
16"
17SRC_URI[md5sum] = "bf3fce6ccaadd310159c9e874220e2a2"
18SRC_URI[sha256sum] = "6326aeed5f86cf18f16d6dc831405614f855e2d416a91fd3fdc334f772345b00"
19
diff --git a/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch b/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch
deleted file mode 100644
index 1e3a16b319..0000000000
--- a/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Encode arm EABI ( hard/soft ) calling convention in ELF header
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5Index: go/src/cmd/link/internal/ld/elf.go
6===================================================================
7--- go.orig/src/cmd/link/internal/ld/elf.go
8+++ go/src/cmd/link/internal/ld/elf.go
9@@ -827,7 +827,13 @@
10 // 32-bit architectures
11 case '5':
12 // we use EABI on both linux/arm and freebsd/arm.
13- if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd {
14+ if HEADTYPE == obj.Hlinux {
15+ if Ctxt.Goarm == 7 {
16+ ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float
17+ } else {
18+ ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float
19+ }
20+ } else if HEADTYPE == obj.Hfreebsd {
21 // We set a value here that makes no indication of which
22 // float ABI the object uses, because this is information
23 // used by the dynamic linker to compare executables and
diff --git a/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch b/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch
deleted file mode 100644
index 983323ace9..0000000000
--- a/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1Accept CC with multiple words in its name
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5Index: go/src/cmd/go/build.go
6===================================================================
7--- go.orig/src/cmd/go/build.go 2015-07-29 14:48:40.323185807 -0700
8+++ go/src/cmd/go/build.go 2015-07-30 07:37:40.529818586 -0700
9@@ -2805,12 +2805,24 @@
10 return b.ccompilerCmd("CC", defaultCC, objdir)
11 }
12
13+// gccCmd returns a gcc command line prefix
14+// defaultCC is defined in zdefaultcc.go, written by cmd/dist.
15+func (b *builder) gccCmdForReal() []string {
16+ return envList("CC", defaultCC)
17+}
18+
19 // gxxCmd returns a g++ command line prefix
20 // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
21 func (b *builder) gxxCmd(objdir string) []string {
22 return b.ccompilerCmd("CXX", defaultCXX, objdir)
23 }
24
25+// gxxCmd returns a g++ command line prefix
26+// defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
27+func (b *builder) gxxCmdForReal() []string {
28+ return envList("CXX", defaultCXX)
29+}
30+
31 // ccompilerCmd returns a command line prefix for the given environment
32 // variable and using the default command when the variable is empty.
33 func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string {
34Index: go/src/cmd/go/env.go
35===================================================================
36--- go.orig/src/cmd/go/env.go 2015-07-29 14:48:40.323185807 -0700
37+++ go/src/cmd/go/env.go 2015-07-30 07:40:54.461655721 -0700
38@@ -52,10 +52,9 @@
39
40 if goos != "plan9" {
41 cmd := b.gccCmd(".")
42- env = append(env, envVar{"CC", cmd[0]})
43+ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")})
44 env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
45- cmd = b.gxxCmd(".")
46- env = append(env, envVar{"CXX", cmd[0]})
47+ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")})
48 }
49
50 if buildContext.CgoEnabled {
diff --git a/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch b/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch
deleted file mode 100644
index 2f6156ecd2..0000000000
--- a/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1Put Quotes around CC_FOR_TARGET since it can be mutliple words e.g. in OE
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5Index: go/src/make.bash
6===================================================================
7--- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700
8+++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700
9@@ -158,7 +158,7 @@
10 fi
11
12 echo "##### Building packages and commands for $GOOS/$GOARCH."
13-CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
14+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
15 echo
16
17 rm -f "$GOTOOLDIR"/go_bootstrap
diff --git a/meta/recipes-devtools/go/go-1.6/gotooldir.patch b/meta/recipes-devtools/go/go-1.6/gotooldir.patch
deleted file mode 100644
index 94670259f2..0000000000
--- a/meta/recipes-devtools/go/go-1.6/gotooldir.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1Define tooldir in relation to GOTOOLDIR env var
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5Index: go/src/go/build/build.go
6===================================================================
7--- go.orig/src/go/build/build.go
8+++ go/src/go/build/build.go
9@@ -1388,7 +1388,7 @@ func init() {
10 }
11
12 // ToolDir is the directory containing build tools.
13-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
14+var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH))
15
16 // IsLocalImport reports whether the import path is
17 // a local import path, like ".", "..", "./foo", or "../foo".
18Index: go/src/cmd/go/build.go
19===================================================================
20--- go.orig/src/cmd/go/build.go
21+++ go/src/cmd/go/build.go
22@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err
23 }
24
25 cgoExe := tool("cgo")
26- if a.cgo != nil && a.cgo.target != "" {
27+ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" {
28 cgoExe = a.cgo.target
29 }
30 outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles)
diff --git a/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch b/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch
deleted file mode 100644
index afbae02b4e..0000000000
--- a/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch
+++ /dev/null
@@ -1,63 +0,0 @@
1Add new option --target-only to build target components
2Separates the host and target pieces of build
3
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5Upstream-Status: Pending
6Index: go/src/make.bash
7===================================================================
8--- go.orig/src/make.bash
9+++ go/src/make.bash
10@@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then
11 buildall=""
12 shift
13 fi
14-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
15-# Delay move of dist tool to now, because bootstrap may clear tool directory.
16-mv cmd/dist/dist "$GOTOOLDIR"/dist
17-echo
18
19-if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
20+do_host_build="yes"
21+do_target_build="yes"
22+if [ "$1" = "--target-only" ]; then
23+ do_host_build="no"
24+ shift
25+elif [ "$1" = "--host-only" ]; then
26+ do_target_build="no"
27+ shift
28+fi
29+
30+if [ "$do_host_build" = "yes" ]; then
31+ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
32+ # Delay move of dist tool to now, because bootstrap may clear tool directory.
33+ mv cmd/dist/dist "$GOTOOLDIR"/dist
34+ echo
35+
36 echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
37 # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
38 # use the host compiler, CC, from `cmd/dist/dist env` instead.
39@@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH
40 echo
41 fi
42
43-echo "##### Building packages and commands for $GOOS/$GOARCH."
44-CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
45-echo
46+if [ "$do_target_build" = "yes" ]; then
47+ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}"
48+ echo "##### Building packages and commands for $GOOS/$GOARCH."
49+ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then
50+ rm -rf ./host-tools
51+ mkdir ./host-tools
52+ mv "$GOTOOLDIR"/* ./host-tools
53+ GOTOOLDIR="$PWD/host-tools"
54+ fi
55+ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL}
56+ echo
57
58-rm -f "$GOTOOLDIR"/go_bootstrap
59+ rm -f "$GOTOOLDIR"/go_bootstrap
60+fi
61
62 if [ "$1" != "--no-banner" ]; then
63 "$GOTOOLDIR"/dist banner
diff --git a/meta/recipes-devtools/go/go-1.6/syslog.patch b/meta/recipes-devtools/go/go-1.6/syslog.patch
deleted file mode 100644
index 29be06f1bd..0000000000
--- a/meta/recipes-devtools/go/go-1.6/syslog.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1Add timeouts to logger
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5
6diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
7--- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800
8+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700
9@@ -33,6 +33,9 @@
10 const severityMask = 0x07
11 const facilityMask = 0xf8
12
13+var writeTimeout = 1 * time.Second
14+var connectTimeout = 1 * time.Second
15+
16 const (
17 // Severity.
18
19@@ -100,6 +103,7 @@
20 type serverConn interface {
21 writeString(p Priority, hostname, tag, s, nl string) error
22 close() error
23+ setWriteDeadline(t time.Time) error
24 }
25
26 type netConn struct {
27@@ -273,7 +277,11 @@
28 nl = "\n"
29 }
30
31- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
32+ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
33+ if err != nil {
34+ return 0, err
35+ }
36+ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
37 if err != nil {
38 return 0, err
39 }
40@@ -305,6 +313,10 @@
41 return n.conn.Close()
42 }
43
44+func (n *netConn) setWriteDeadline(t time.Time) error {
45+ return n.conn.SetWriteDeadline(t)
46+}
47+
48 // NewLogger creates a log.Logger whose output is written to
49 // the system log service with the specified priority. The logFlag
50 // argument is the flag set passed through to log.New to create
51diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
52--- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800
53+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700
54@@ -19,7 +19,7 @@
55 logPaths := []string{"/dev/log", "/var/run/syslog"}
56 for _, network := range logTypes {
57 for _, path := range logPaths {
58- conn, err := net.Dial(network, path)
59+ conn, err := net.DialTimeout(network, path, connectTimeout)
60 if err != nil {
61 continue
62 } else {
diff --git a/meta/recipes-devtools/go/go-1.7.inc b/meta/recipes-devtools/go/go-1.7.inc
deleted file mode 100644
index 5c3004e875..0000000000
--- a/meta/recipes-devtools/go/go-1.7.inc
+++ /dev/null
@@ -1,19 +0,0 @@
1require go-common.inc
2
3PV = "1.7.4"
4GO_BASEVERSION = "1.7"
5FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
6
7LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
8
9SRC_URI += "\
10 file://armhf-elf-header.patch \
11 file://syslog.patch \
12 file://fix-target-cc-for-build.patch \
13 file://fix-cc-handling.patch \
14 file://split-host-and-target-build.patch \
15 file://gotooldir.patch \
16"
17SRC_URI[md5sum] = "49c1076428a5d3b5ad7ac65233fcca2f"
18SRC_URI[sha256sum] = "4c189111e9ba651a2bb3ee868aa881fab36b2f2da3409e80885ca758a6b614cc"
19
diff --git a/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch b/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch
deleted file mode 100644
index 1e3a16b319..0000000000
--- a/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Encode arm EABI ( hard/soft ) calling convention in ELF header
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5Index: go/src/cmd/link/internal/ld/elf.go
6===================================================================
7--- go.orig/src/cmd/link/internal/ld/elf.go
8+++ go/src/cmd/link/internal/ld/elf.go
9@@ -827,7 +827,13 @@
10 // 32-bit architectures
11 case '5':
12 // we use EABI on both linux/arm and freebsd/arm.
13- if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd {
14+ if HEADTYPE == obj.Hlinux {
15+ if Ctxt.Goarm == 7 {
16+ ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float
17+ } else {
18+ ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float
19+ }
20+ } else if HEADTYPE == obj.Hfreebsd {
21 // We set a value here that makes no indication of which
22 // float ABI the object uses, because this is information
23 // used by the dynamic linker to compare executables and
diff --git a/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch b/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch
deleted file mode 100644
index a67caf41a5..0000000000
--- a/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1Accept CC with multiple words in its name
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5Index: go/src/cmd/go/build.go
6===================================================================
7--- go.orig/src/cmd/go/build.go
8+++ go/src/cmd/go/build.go
9@@ -2991,12 +2991,24 @@ func (b *builder) gccCmd(objdir string)
10 return b.ccompilerCmd("CC", defaultCC, objdir)
11 }
12
13+// gccCmd returns a gcc command line prefix
14+// defaultCC is defined in zdefaultcc.go, written by cmd/dist.
15+func (b *builder) gccCmdForReal() []string {
16+ return envList("CC", defaultCC)
17+}
18+
19 // gxxCmd returns a g++ command line prefix
20 // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
21 func (b *builder) gxxCmd(objdir string) []string {
22 return b.ccompilerCmd("CXX", defaultCXX, objdir)
23 }
24
25+// gxxCmd returns a g++ command line prefix
26+// defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
27+func (b *builder) gxxCmdForReal() []string {
28+ return envList("CXX", defaultCXX)
29+}
30+
31 // gfortranCmd returns a gfortran command line prefix.
32 func (b *builder) gfortranCmd(objdir string) []string {
33 return b.ccompilerCmd("FC", "gfortran", objdir)
34Index: go/src/cmd/go/env.go
35===================================================================
36--- go.orig/src/cmd/go/env.go
37+++ go/src/cmd/go/env.go
38@@ -51,10 +51,9 @@ func mkEnv() []envVar {
39
40 if goos != "plan9" {
41 cmd := b.gccCmd(".")
42- env = append(env, envVar{"CC", cmd[0]})
43+ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")})
44 env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
45- cmd = b.gxxCmd(".")
46- env = append(env, envVar{"CXX", cmd[0]})
47+ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")})
48 }
49
50 if buildContext.CgoEnabled {
diff --git a/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch b/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch
deleted file mode 100644
index 2f6156ecd2..0000000000
--- a/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1Put Quotes around CC_FOR_TARGET since it can be mutliple words e.g. in OE
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5Index: go/src/make.bash
6===================================================================
7--- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700
8+++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700
9@@ -158,7 +158,7 @@
10 fi
11
12 echo "##### Building packages and commands for $GOOS/$GOARCH."
13-CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
14+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
15 echo
16
17 rm -f "$GOTOOLDIR"/go_bootstrap
diff --git a/meta/recipes-devtools/go/go-1.7/gotooldir.patch b/meta/recipes-devtools/go/go-1.7/gotooldir.patch
deleted file mode 100644
index 94670259f2..0000000000
--- a/meta/recipes-devtools/go/go-1.7/gotooldir.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1Define tooldir in relation to GOTOOLDIR env var
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5Index: go/src/go/build/build.go
6===================================================================
7--- go.orig/src/go/build/build.go
8+++ go/src/go/build/build.go
9@@ -1388,7 +1388,7 @@ func init() {
10 }
11
12 // ToolDir is the directory containing build tools.
13-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
14+var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH))
15
16 // IsLocalImport reports whether the import path is
17 // a local import path, like ".", "..", "./foo", or "../foo".
18Index: go/src/cmd/go/build.go
19===================================================================
20--- go.orig/src/cmd/go/build.go
21+++ go/src/cmd/go/build.go
22@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err
23 }
24
25 cgoExe := tool("cgo")
26- if a.cgo != nil && a.cgo.target != "" {
27+ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" {
28 cgoExe = a.cgo.target
29 }
30 outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles)
diff --git a/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch b/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch
deleted file mode 100644
index b0dd95bbe7..0000000000
--- a/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1Add new option --target-only to build target components
2Separates the host and target pieces of build
3
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5Upstream-Status: Pending
6Index: go/src/make.bash
7===================================================================
8--- go.orig/src/make.bash
9+++ go/src/make.bash
10@@ -154,13 +154,22 @@ if [ "$1" = "--no-clean" ]; then
11 buildall=""
12 shift
13 fi
14-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
15+do_host_build="yes"
16+do_target_build="yes"
17+if [ "$1" = "--target-only" ]; then
18+ do_host_build="no"
19+ shift
20+elif [ "$1" = "--host-only" ]; then
21+ do_target_build="no"
22+ shift
23+fi
24
25-# Delay move of dist tool to now, because bootstrap may clear tool directory.
26-mv cmd/dist/dist "$GOTOOLDIR"/dist
27-echo
28+if [ "$do_host_build" = "yes" ]; then
29+ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
30+ # Delay move of dist tool to now, because bootstrap may clear tool directory.
31+ mv cmd/dist/dist "$GOTOOLDIR"/dist
32+ echo
33
34-if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
35 echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
36 # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
37 # use the host compiler, CC, from `cmd/dist/dist env` instead.
38@@ -169,11 +178,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH
39 echo
40 fi
41
42-echo "##### Building packages and commands for $GOOS/$GOARCH."
43-CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
44-echo
45+if [ "$do_target_build" = "yes" ]; then
46+ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}"
47+ echo "##### Building packages and commands for $GOOS/$GOARCH."
48+ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then
49+ rm -rf ./host-tools
50+ mkdir ./host-tools
51+ mv "$GOTOOLDIR"/* ./host-tools
52+ GOTOOLDIR="$PWD/host-tools"
53+ fi
54+ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL}
55+ echo
56
57-rm -f "$GOTOOLDIR"/go_bootstrap
58+ rm -f "$GOTOOLDIR"/go_bootstrap
59+fi
60
61 if [ "$1" != "--no-banner" ]; then
62 "$GOTOOLDIR"/dist banner
diff --git a/meta/recipes-devtools/go/go-1.7/syslog.patch b/meta/recipes-devtools/go/go-1.7/syslog.patch
deleted file mode 100644
index 29be06f1bd..0000000000
--- a/meta/recipes-devtools/go/go-1.7/syslog.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1Add timeouts to logger
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5
6diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
7--- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800
8+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700
9@@ -33,6 +33,9 @@
10 const severityMask = 0x07
11 const facilityMask = 0xf8
12
13+var writeTimeout = 1 * time.Second
14+var connectTimeout = 1 * time.Second
15+
16 const (
17 // Severity.
18
19@@ -100,6 +103,7 @@
20 type serverConn interface {
21 writeString(p Priority, hostname, tag, s, nl string) error
22 close() error
23+ setWriteDeadline(t time.Time) error
24 }
25
26 type netConn struct {
27@@ -273,7 +277,11 @@
28 nl = "\n"
29 }
30
31- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
32+ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
33+ if err != nil {
34+ return 0, err
35+ }
36+ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
37 if err != nil {
38 return 0, err
39 }
40@@ -305,6 +313,10 @@
41 return n.conn.Close()
42 }
43
44+func (n *netConn) setWriteDeadline(t time.Time) error {
45+ return n.conn.SetWriteDeadline(t)
46+}
47+
48 // NewLogger creates a log.Logger whose output is written to
49 // the system log service with the specified priority. The logFlag
50 // argument is the flag set passed through to log.New to create
51diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
52--- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800
53+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700
54@@ -19,7 +19,7 @@
55 logPaths := []string{"/dev/log", "/var/run/syslog"}
56 for _, network := range logTypes {
57 for _, path := range logPaths {
58- conn, err := net.Dial(network, path)
59+ conn, err := net.DialTimeout(network, path, connectTimeout)
60 if err != nil {
61 continue
62 } else {
diff --git a/meta/recipes-devtools/go/go-cross_1.7.bb b/meta/recipes-devtools/go/go-cross_1.7.bb
deleted file mode 100644
index 56ee084b10..0000000000
--- a/meta/recipes-devtools/go/go-cross_1.7.bb
+++ /dev/null
@@ -1,5 +0,0 @@
1require go-cross.inc
2require go_${PV}.bb
3
4# Go binaries are not understood by the strip tool.
5INHIBIT_SYSROOT_STRIP = "1"
diff --git a/meta/recipes-devtools/go/go_1.6.bb b/meta/recipes-devtools/go/go_1.6.bb
deleted file mode 100644
index 2f590338c4..0000000000
--- a/meta/recipes-devtools/go/go_1.6.bb
+++ /dev/null
@@ -1,4 +0,0 @@
1require go.inc
2require go-${PV}.inc
3
4BBCLASSEXTEND = "cross"
diff --git a/meta/recipes-devtools/go/go_1.7.bb b/meta/recipes-devtools/go/go_1.7.bb
deleted file mode 100644
index e7a6ab277e..0000000000
--- a/meta/recipes-devtools/go/go_1.7.bb
+++ /dev/null
@@ -1,2 +0,0 @@
1require go-${PV}.inc
2require go.inc