diff options
24 files changed, 0 insertions, 936 deletions
diff --git a/recipes-devtools/go-cross/go-1.4.inc b/recipes-devtools/go-cross/go-1.4.inc deleted file mode 100644 index a65459fc..00000000 --- a/recipes-devtools/go-cross/go-1.4.inc +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | require go-common.inc | ||
2 | |||
3 | PV = "1.4.3" | ||
4 | GO_BASEVERSION = "1.4" | ||
5 | FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" | ||
6 | |||
7 | SRC_URI += "\ | ||
8 | file://016-armhf-elf-header.patch \ | ||
9 | file://go-cross-backport-cmd-link-support-new-386-amd64-rel.patch \ | ||
10 | file://syslog.patch \ | ||
11 | " | ||
12 | |||
13 | LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81" | ||
14 | SRC_URI[md5sum] = "dfb604511115dd402a77a553a5923a04" | ||
15 | SRC_URI[sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959" | ||
diff --git a/recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch b/recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch deleted file mode 100644 index 1ae53a38..00000000 --- a/recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | Description: Use correct ELF header for armhf binaries. | ||
2 | Author: Adam Conrad <adconrad@ubuntu.com> | ||
3 | Last-Update: 2013-07-08 | ||
4 | |||
5 | Index: go/src/cmd/ld/elf.c | ||
6 | =================================================================== | ||
7 | --- go.orig/src/cmd/ld/elf.c 2015-02-20 10:49:58.763451586 -0800 | ||
8 | +++ go/src/cmd/ld/elf.c 2015-02-20 10:49:27.895478521 -0800 | ||
9 | @@ -57,7 +57,11 @@ | ||
10 | case '5': | ||
11 | // we use EABI on both linux/arm and freebsd/arm. | ||
12 | if(HEADTYPE == Hlinux || HEADTYPE == Hfreebsd) | ||
13 | - hdr.flags = 0x5000002; // has entry point, Version5 EABI | ||
14 | +#ifdef __ARM_PCS_VFP | ||
15 | + hdr.flags = 0x5000402; // has entry point, Version5 EABI, hard-float ABI | ||
16 | +#else | ||
17 | + hdr.flags = 0x5000202; // has entry point, Version5 EABI, soft-float ABI | ||
18 | +#endif | ||
19 | // fallthrough | ||
20 | default: | ||
21 | hdr.phoff = ELF32HDRSIZE; /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */ | ||
diff --git a/recipes-devtools/go-cross/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch b/recipes-devtools/go-cross/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch deleted file mode 100644 index de3f49c0..00000000 --- a/recipes-devtools/go-cross/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch +++ /dev/null | |||
@@ -1,223 +0,0 @@ | |||
1 | From d6eefad445831c161fca130f9bdf7b3848aac23c Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Gortmaker <paul.gortmaker@windriver.com> | ||
3 | Date: Tue, 29 Mar 2016 21:14:33 -0400 | ||
4 | Subject: [PATCH] go-cross: backport "cmd/link: support new 386/amd64 | ||
5 | relocations" | ||
6 | |||
7 | Newer binutils won't support building older go-1.4.3 as per: | ||
8 | |||
9 | https://github.com/golang/go/issues/13114 | ||
10 | |||
11 | Upstream commit 914db9f060b1fd3eb1f74d48f3bd46a73d4ae9c7 (see subj) | ||
12 | was identified as the fix and nominated for 1.4.4 but that release | ||
13 | never happened. The paths in 1.4.3 aren't the same as go1.6beta1~662 | ||
14 | where this commit appeared, but the NetBSD folks indicated what a | ||
15 | 1.4.3 backport would look like here: https://gnats.netbsd.org/50777 | ||
16 | |||
17 | This is based on that, but without the BSD wrapper infrastructure | ||
18 | layer that makes things look like patches of patches. | ||
19 | |||
20 | Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ||
21 | |||
22 | diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c | ||
23 | index 18b5aa311981..2e9d339aef87 100644 | ||
24 | --- a/src/cmd/6l/asm.c | ||
25 | +++ b/src/cmd/6l/asm.c | ||
26 | @@ -118,6 +118,8 @@ adddynrel(LSym *s, Reloc *r) | ||
27 | return; | ||
28 | |||
29 | case 256 + R_X86_64_GOTPCREL: | ||
30 | + case 256 + R_X86_64_GOTPCRELX: | ||
31 | + case 256 + R_X86_64_REX_GOTPCRELX: | ||
32 | if(targ->type != SDYNIMPORT) { | ||
33 | // have symbol | ||
34 | if(r->off >= 2 && s->p[r->off-2] == 0x8b) { | ||
35 | diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c | ||
36 | index 98c04240374f..cff29488e8af 100644 | ||
37 | --- a/src/cmd/8l/asm.c | ||
38 | +++ b/src/cmd/8l/asm.c | ||
39 | @@ -115,6 +115,7 @@ adddynrel(LSym *s, Reloc *r) | ||
40 | return; | ||
41 | |||
42 | case 256 + R_386_GOT32: | ||
43 | + case 256 + R_386_GOT32X: | ||
44 | if(targ->type != SDYNIMPORT) { | ||
45 | // have symbol | ||
46 | if(r->off >= 2 && s->p[r->off-2] == 0x8b) { | ||
47 | diff --git a/src/cmd/ld/elf.h b/src/cmd/ld/elf.h | ||
48 | index e84d996f2596..bbf2cfaa3cc0 100644 | ||
49 | --- a/src/cmd/ld/elf.h | ||
50 | +++ b/src/cmd/ld/elf.h | ||
51 | @@ -478,32 +478,47 @@ typedef struct { | ||
52 | * Relocation types. | ||
53 | */ | ||
54 | |||
55 | -#define R_X86_64_NONE 0 /* No relocation. */ | ||
56 | -#define R_X86_64_64 1 /* Add 64 bit symbol value. */ | ||
57 | -#define R_X86_64_PC32 2 /* PC-relative 32 bit signed sym value. */ | ||
58 | -#define R_X86_64_GOT32 3 /* PC-relative 32 bit GOT offset. */ | ||
59 | -#define R_X86_64_PLT32 4 /* PC-relative 32 bit PLT offset. */ | ||
60 | -#define R_X86_64_COPY 5 /* Copy data from shared object. */ | ||
61 | -#define R_X86_64_GLOB_DAT 6 /* Set GOT entry to data address. */ | ||
62 | -#define R_X86_64_JMP_SLOT 7 /* Set GOT entry to code address. */ | ||
63 | -#define R_X86_64_RELATIVE 8 /* Add load address of shared object. */ | ||
64 | -#define R_X86_64_GOTPCREL 9 /* Add 32 bit signed pcrel offset to GOT. */ | ||
65 | -#define R_X86_64_32 10 /* Add 32 bit zero extended symbol value */ | ||
66 | -#define R_X86_64_32S 11 /* Add 32 bit sign extended symbol value */ | ||
67 | -#define R_X86_64_16 12 /* Add 16 bit zero extended symbol value */ | ||
68 | -#define R_X86_64_PC16 13 /* Add 16 bit signed extended pc relative symbol value */ | ||
69 | -#define R_X86_64_8 14 /* Add 8 bit zero extended symbol value */ | ||
70 | -#define R_X86_64_PC8 15 /* Add 8 bit signed extended pc relative symbol value */ | ||
71 | -#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */ | ||
72 | -#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */ | ||
73 | -#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */ | ||
74 | -#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */ | ||
75 | -#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */ | ||
76 | -#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ | ||
77 | -#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ | ||
78 | -#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ | ||
79 | - | ||
80 | -#define R_X86_64_COUNT 24 /* Count of defined relocation types. */ | ||
81 | +#define R_X86_64_NONE 0 | ||
82 | +#define R_X86_64_64 1 | ||
83 | +#define R_X86_64_PC32 2 | ||
84 | +#define R_X86_64_GOT32 3 | ||
85 | +#define R_X86_64_PLT32 4 | ||
86 | +#define R_X86_64_COPY 5 | ||
87 | +#define R_X86_64_GLOB_DAT 6 | ||
88 | +#define R_X86_64_JMP_SLOT 7 | ||
89 | +#define R_X86_64_RELATIVE 8 | ||
90 | +#define R_X86_64_GOTPCREL 9 | ||
91 | +#define R_X86_64_32 10 | ||
92 | +#define R_X86_64_32S 11 | ||
93 | +#define R_X86_64_16 12 | ||
94 | +#define R_X86_64_PC16 13 | ||
95 | +#define R_X86_64_8 14 | ||
96 | +#define R_X86_64_PC8 15 | ||
97 | +#define R_X86_64_DTPMOD64 16 | ||
98 | +#define R_X86_64_DTPOFF64 17 | ||
99 | +#define R_X86_64_TPOFF64 18 | ||
100 | +#define R_X86_64_TLSGD 19 | ||
101 | +#define R_X86_64_TLSLD 20 | ||
102 | +#define R_X86_64_DTPOFF32 21 | ||
103 | +#define R_X86_64_GOTTPOFF 22 | ||
104 | +#define R_X86_64_TPOFF32 23 | ||
105 | +#define R_X86_64_PC64 24 | ||
106 | +#define R_X86_64_GOTOFF64 25 | ||
107 | +#define R_X86_64_GOTPC32 26 | ||
108 | +#define R_X86_64_GOT64 27 | ||
109 | +#define R_X86_64_GOTPCREL64 28 | ||
110 | +#define R_X86_64_GOTPC64 29 | ||
111 | +#define R_X86_64_GOTPLT64 30 | ||
112 | +#define R_X86_64_PLTOFF64 31 | ||
113 | +#define R_X86_64_SIZE32 32 | ||
114 | +#define R_X86_64_SIZE64 33 | ||
115 | +#define R_X86_64_GOTPC32_TLSDEC 34 | ||
116 | +#define R_X86_64_TLSDESC_CALL 35 | ||
117 | +#define R_X86_64_TLSDESC 36 | ||
118 | +#define R_X86_64_IRELATIVE 37 | ||
119 | +#define R_X86_64_PC32_BND 40 | ||
120 | +#define R_X86_64_GOTPCRELX 41 | ||
121 | +#define R_X86_64_REX_GOTPCRELX 42 | ||
122 | |||
123 | |||
124 | #define R_ALPHA_NONE 0 /* No reloc */ | ||
125 | @@ -581,39 +596,42 @@ typedef struct { | ||
126 | #define R_ARM_COUNT 38 /* Count of defined relocation types. */ | ||
127 | |||
128 | |||
129 | -#define R_386_NONE 0 /* No relocation. */ | ||
130 | -#define R_386_32 1 /* Add symbol value. */ | ||
131 | -#define R_386_PC32 2 /* Add PC-relative symbol value. */ | ||
132 | -#define R_386_GOT32 3 /* Add PC-relative GOT offset. */ | ||
133 | -#define R_386_PLT32 4 /* Add PC-relative PLT offset. */ | ||
134 | -#define R_386_COPY 5 /* Copy data from shared object. */ | ||
135 | -#define R_386_GLOB_DAT 6 /* Set GOT entry to data address. */ | ||
136 | -#define R_386_JMP_SLOT 7 /* Set GOT entry to code address. */ | ||
137 | -#define R_386_RELATIVE 8 /* Add load address of shared object. */ | ||
138 | -#define R_386_GOTOFF 9 /* Add GOT-relative symbol address. */ | ||
139 | -#define R_386_GOTPC 10 /* Add PC-relative GOT table address. */ | ||
140 | -#define R_386_TLS_TPOFF 14 /* Negative offset in static TLS block */ | ||
141 | -#define R_386_TLS_IE 15 /* Absolute address of GOT for -ve static TLS */ | ||
142 | -#define R_386_TLS_GOTIE 16 /* GOT entry for negative static TLS block */ | ||
143 | -#define R_386_TLS_LE 17 /* Negative offset relative to static TLS */ | ||
144 | -#define R_386_TLS_GD 18 /* 32 bit offset to GOT (index,off) pair */ | ||
145 | -#define R_386_TLS_LDM 19 /* 32 bit offset to GOT (index,zero) pair */ | ||
146 | -#define R_386_TLS_GD_32 24 /* 32 bit offset to GOT (index,off) pair */ | ||
147 | -#define R_386_TLS_GD_PUSH 25 /* pushl instruction for Sun ABI GD sequence */ | ||
148 | -#define R_386_TLS_GD_CALL 26 /* call instruction for Sun ABI GD sequence */ | ||
149 | -#define R_386_TLS_GD_POP 27 /* popl instruction for Sun ABI GD sequence */ | ||
150 | -#define R_386_TLS_LDM_32 28 /* 32 bit offset to GOT (index,zero) pair */ | ||
151 | -#define R_386_TLS_LDM_PUSH 29 /* pushl instruction for Sun ABI LD sequence */ | ||
152 | -#define R_386_TLS_LDM_CALL 30 /* call instruction for Sun ABI LD sequence */ | ||
153 | -#define R_386_TLS_LDM_POP 31 /* popl instruction for Sun ABI LD sequence */ | ||
154 | -#define R_386_TLS_LDO_32 32 /* 32 bit offset from start of TLS block */ | ||
155 | -#define R_386_TLS_IE_32 33 /* 32 bit offset to GOT static TLS offset entry */ | ||
156 | -#define R_386_TLS_LE_32 34 /* 32 bit offset within static TLS block */ | ||
157 | -#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */ | ||
158 | -#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */ | ||
159 | -#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */ | ||
160 | - | ||
161 | -#define R_386_COUNT 38 /* Count of defined relocation types. */ | ||
162 | +#define R_386_NONE 0 | ||
163 | +#define R_386_32 1 | ||
164 | +#define R_386_PC32 2 | ||
165 | +#define R_386_GOT32 3 | ||
166 | +#define R_386_PLT32 4 | ||
167 | +#define R_386_COPY 5 | ||
168 | +#define R_386_GLOB_DAT 6 | ||
169 | +#define R_386_JMP_SLOT 7 | ||
170 | +#define R_386_RELATIVE 8 | ||
171 | +#define R_386_GOTOFF 9 | ||
172 | +#define R_386_GOTPC 10 | ||
173 | +#define R_386_TLS_TPOFF 14 | ||
174 | +#define R_386_TLS_IE 15 | ||
175 | +#define R_386_TLS_GOTIE 16 | ||
176 | +#define R_386_TLS_LE 17 | ||
177 | +#define R_386_TLS_GD 18 | ||
178 | +#define R_386_TLS_LDM 19 | ||
179 | +#define R_386_TLS_GD_32 24 | ||
180 | +#define R_386_TLS_GD_PUSH 25 | ||
181 | +#define R_386_TLS_GD_CALL 26 | ||
182 | +#define R_386_TLS_GD_POP 27 | ||
183 | +#define R_386_TLS_LDM_32 28 | ||
184 | +#define R_386_TLS_LDM_PUSH 29 | ||
185 | +#define R_386_TLS_LDM_CALL 30 | ||
186 | +#define R_386_TLS_LDM_POP 31 | ||
187 | +#define R_386_TLS_LDO_32 32 | ||
188 | +#define R_386_TLS_IE_32 33 | ||
189 | +#define R_386_TLS_LE_32 34 | ||
190 | +#define R_386_TLS_DTPMOD32 35 | ||
191 | +#define R_386_TLS_DTPOFF32 36 | ||
192 | +#define R_386_TLS_TPOFF32 37 | ||
193 | +#define R_386_TLS_GOTDESC 39 | ||
194 | +#define R_386_TLS_DESC_CALL 40 | ||
195 | +#define R_386_TLS_DESC 41 | ||
196 | +#define R_386_IRELATIVE 42 | ||
197 | +#define R_386_GOT32X 43 | ||
198 | |||
199 | #define R_PPC_NONE 0 /* No relocation. */ | ||
200 | #define R_PPC_ADDR32 1 | ||
201 | diff --git a/src/cmd/ld/ldelf.c b/src/cmd/ld/ldelf.c | ||
202 | index dd5fa0d2a839..2e2fbd17377f 100644 | ||
203 | --- a/src/cmd/ld/ldelf.c | ||
204 | +++ b/src/cmd/ld/ldelf.c | ||
205 | @@ -888,12 +888,15 @@ reltype(char *pn, int elftype, uchar *siz) | ||
206 | case R('6', R_X86_64_PC32): | ||
207 | case R('6', R_X86_64_PLT32): | ||
208 | case R('6', R_X86_64_GOTPCREL): | ||
209 | + case R('6', R_X86_64_GOTPCRELX): | ||
210 | + case R('6', R_X86_64_REX_GOTPCRELX): | ||
211 | case R('8', R_386_32): | ||
212 | case R('8', R_386_PC32): | ||
213 | case R('8', R_386_GOT32): | ||
214 | case R('8', R_386_PLT32): | ||
215 | case R('8', R_386_GOTOFF): | ||
216 | case R('8', R_386_GOTPC): | ||
217 | + case R('8', R_386_GOT32X): | ||
218 | *siz = 4; | ||
219 | break; | ||
220 | case R('6', R_X86_64_64): | ||
221 | -- | ||
222 | 2.7.2 | ||
223 | |||
diff --git a/recipes-devtools/go-cross/go-1.4/syslog.patch b/recipes-devtools/go-cross/go-1.4/syslog.patch deleted file mode 100644 index ce82a4f2..00000000 --- a/recipes-devtools/go-cross/go-1.4/syslog.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go | ||
2 | --- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 | ||
3 | +++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 | ||
4 | @@ -33,6 +33,9 @@ | ||
5 | const severityMask = 0x07 | ||
6 | const facilityMask = 0xf8 | ||
7 | |||
8 | +var writeTimeout = 1 * time.Second | ||
9 | +var connectTimeout = 1 * time.Second | ||
10 | + | ||
11 | const ( | ||
12 | // Severity. | ||
13 | |||
14 | @@ -100,6 +103,7 @@ | ||
15 | type serverConn interface { | ||
16 | writeString(p Priority, hostname, tag, s, nl string) error | ||
17 | close() error | ||
18 | + setWriteDeadline(t time.Time) error | ||
19 | } | ||
20 | |||
21 | type netConn struct { | ||
22 | @@ -273,7 +277,11 @@ | ||
23 | nl = "\n" | ||
24 | } | ||
25 | |||
26 | - err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) | ||
27 | + err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) | ||
28 | + if err != nil { | ||
29 | + return 0, err | ||
30 | + } | ||
31 | + err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) | ||
32 | if err != nil { | ||
33 | return 0, err | ||
34 | } | ||
35 | @@ -305,6 +313,10 @@ | ||
36 | return n.conn.Close() | ||
37 | } | ||
38 | |||
39 | +func (n *netConn) setWriteDeadline(t time.Time) error { | ||
40 | + return n.conn.SetWriteDeadline(t) | ||
41 | +} | ||
42 | + | ||
43 | // NewLogger creates a log.Logger whose output is written to | ||
44 | // the system log service with the specified priority. The logFlag | ||
45 | // argument is the flag set passed through to log.New to create | ||
46 | diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go | ||
47 | --- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 | ||
48 | +++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 | ||
49 | @@ -19,7 +19,7 @@ | ||
50 | logPaths := []string{"/dev/log", "/var/run/syslog"} | ||
51 | for _, network := range logTypes { | ||
52 | for _, path := range logPaths { | ||
53 | - conn, err := net.Dial(network, path) | ||
54 | + conn, err := net.DialTimeout(network, path, connectTimeout) | ||
55 | if err != nil { | ||
56 | continue | ||
57 | } else { | ||
diff --git a/recipes-devtools/go-cross/go-1.5.inc b/recipes-devtools/go-cross/go-1.5.inc deleted file mode 100644 index bb91ed8a..00000000 --- a/recipes-devtools/go-cross/go-1.5.inc +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | require go-common.inc | ||
2 | |||
3 | PV = "1.5.2" | ||
4 | GO_BASEVERSION = "1.5" | ||
5 | FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" | ||
6 | |||
7 | |||
8 | SRC_URI += "\ | ||
9 | file://armhf-elf-header.patch \ | ||
10 | file://syslog.patch \ | ||
11 | file://fix-target-cc-for-build.patch \ | ||
12 | file://fix-cc-handling.patch \ | ||
13 | file://split-host-and-target-build.patch \ | ||
14 | file://gotooldir.patch \ | ||
15 | " | ||
16 | |||
17 | LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81" | ||
18 | SRC_URI[md5sum] = "38fed22e7b80672291e7cba7fb9c3475" | ||
19 | SRC_URI[sha256sum] = "f3ddd624c00461641ce3d3a8d8e3c622392384ca7699e901b370a4eac5987a74" | ||
diff --git a/recipes-devtools/go-cross/go-1.5/armhf-elf-header.patch b/recipes-devtools/go-cross/go-1.5/armhf-elf-header.patch deleted file mode 100644 index f56869b2..00000000 --- a/recipes-devtools/go-cross/go-1.5/armhf-elf-header.patch +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | Index: go/src/cmd/link/internal/ld/elf.go | ||
2 | =================================================================== | ||
3 | --- go.orig/src/cmd/link/internal/ld/elf.go 2015-07-29 13:05:25.952533140 -0700 | ||
4 | +++ go/src/cmd/link/internal/ld/elf.go 2015-07-29 13:14:53.413112995 -0700 | ||
5 | @@ -780,7 +780,13 @@ | ||
6 | // 32-bit architectures | ||
7 | case '5': | ||
8 | // we use EABI on both linux/arm and freebsd/arm. | ||
9 | - if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd { | ||
10 | + if HEADTYPE == obj.Hlinux { | ||
11 | + if Ctxt.Goarm == 7 { | ||
12 | + ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float | ||
13 | + } else { | ||
14 | + ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float | ||
15 | + } | ||
16 | + } else if HEADTYPE == obj.Hfreebsd { | ||
17 | ehdr.flags = 0x5000002 // has entry point, Version5 EABI | ||
18 | } | ||
19 | fallthrough | ||
diff --git a/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch b/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch deleted file mode 100644 index 85770a93..00000000 --- a/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | Index: go/src/cmd/go/build.go | ||
2 | =================================================================== | ||
3 | --- go.orig/src/cmd/go/build.go 2015-07-29 14:48:40.323185807 -0700 | ||
4 | +++ go/src/cmd/go/build.go 2015-07-30 07:37:40.529818586 -0700 | ||
5 | @@ -2805,12 +2805,24 @@ | ||
6 | return b.ccompilerCmd("CC", defaultCC, objdir) | ||
7 | } | ||
8 | |||
9 | +// gccCmd returns a gcc command line prefix | ||
10 | +// defaultCC is defined in zdefaultcc.go, written by cmd/dist. | ||
11 | +func (b *builder) gccCmdForReal() []string { | ||
12 | + return envList("CC", defaultCC) | ||
13 | +} | ||
14 | + | ||
15 | // gxxCmd returns a g++ command line prefix | ||
16 | // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. | ||
17 | func (b *builder) gxxCmd(objdir string) []string { | ||
18 | return b.ccompilerCmd("CXX", defaultCXX, objdir) | ||
19 | } | ||
20 | |||
21 | +// gxxCmd returns a g++ command line prefix | ||
22 | +// defaultCXX is defined in zdefaultcc.go, written by cmd/dist. | ||
23 | +func (b *builder) gxxCmdForReal() []string { | ||
24 | + return envList("CXX", defaultCXX) | ||
25 | +} | ||
26 | + | ||
27 | // ccompilerCmd returns a command line prefix for the given environment | ||
28 | // variable and using the default command when the variable is empty. | ||
29 | func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string { | ||
30 | Index: go/src/cmd/go/env.go | ||
31 | =================================================================== | ||
32 | --- go.orig/src/cmd/go/env.go 2015-07-29 14:48:40.323185807 -0700 | ||
33 | +++ go/src/cmd/go/env.go 2015-07-30 07:40:54.461655721 -0700 | ||
34 | @@ -52,10 +52,9 @@ | ||
35 | |||
36 | if goos != "plan9" { | ||
37 | cmd := b.gccCmd(".") | ||
38 | - env = append(env, envVar{"CC", cmd[0]}) | ||
39 | + env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")}) | ||
40 | env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")}) | ||
41 | - cmd = b.gxxCmd(".") | ||
42 | - env = append(env, envVar{"CXX", cmd[0]}) | ||
43 | + env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")}) | ||
44 | } | ||
45 | |||
46 | if buildContext.CgoEnabled { | ||
diff --git a/recipes-devtools/go-cross/go-1.5/fix-target-cc-for-build.patch b/recipes-devtools/go-cross/go-1.5/fix-target-cc-for-build.patch deleted file mode 100644 index adfeb6b5..00000000 --- a/recipes-devtools/go-cross/go-1.5/fix-target-cc-for-build.patch +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | Index: go/src/make.bash | ||
2 | =================================================================== | ||
3 | --- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700 | ||
4 | +++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700 | ||
5 | @@ -158,7 +158,7 @@ | ||
6 | fi | ||
7 | |||
8 | echo "##### Building packages and commands for $GOOS/$GOARCH." | ||
9 | -CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd | ||
10 | +CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd | ||
11 | echo | ||
12 | |||
13 | rm -f "$GOTOOLDIR"/go_bootstrap | ||
diff --git a/recipes-devtools/go-cross/go-1.5/gotooldir.patch b/recipes-devtools/go-cross/go-1.5/gotooldir.patch deleted file mode 100644 index 473a3280..00000000 --- a/recipes-devtools/go-cross/go-1.5/gotooldir.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | Index: go/src/go/build/build.go | ||
2 | =================================================================== | ||
3 | --- go.orig/src/go/build/build.go | ||
4 | +++ go/src/go/build/build.go | ||
5 | @@ -1388,7 +1388,7 @@ func init() { | ||
6 | } | ||
7 | |||
8 | // ToolDir is the directory containing build tools. | ||
9 | -var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) | ||
10 | +var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)) | ||
11 | |||
12 | // IsLocalImport reports whether the import path is | ||
13 | // a local import path, like ".", "..", "./foo", or "../foo". | ||
14 | Index: go/src/cmd/go/build.go | ||
15 | =================================================================== | ||
16 | --- go.orig/src/cmd/go/build.go | ||
17 | +++ go/src/cmd/go/build.go | ||
18 | @@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err | ||
19 | } | ||
20 | |||
21 | cgoExe := tool("cgo") | ||
22 | - if a.cgo != nil && a.cgo.target != "" { | ||
23 | + if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" { | ||
24 | cgoExe = a.cgo.target | ||
25 | } | ||
26 | outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles) | ||
diff --git a/recipes-devtools/go-cross/go-1.5/split-host-and-target-build.patch b/recipes-devtools/go-cross/go-1.5/split-host-and-target-build.patch deleted file mode 100644 index 85fb240a..00000000 --- a/recipes-devtools/go-cross/go-1.5/split-host-and-target-build.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | Index: go/src/make.bash | ||
2 | =================================================================== | ||
3 | --- go.orig/src/make.bash | ||
4 | +++ go/src/make.bash | ||
5 | @@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then | ||
6 | buildall="" | ||
7 | shift | ||
8 | fi | ||
9 | -./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap | ||
10 | -# Delay move of dist tool to now, because bootstrap may clear tool directory. | ||
11 | -mv cmd/dist/dist "$GOTOOLDIR"/dist | ||
12 | -echo | ||
13 | |||
14 | -if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then | ||
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 | +if [ "$do_host_build" = "yes" ]; then | ||
26 | + ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap | ||
27 | + # Delay move of dist tool to now, because bootstrap may clear tool directory. | ||
28 | + mv cmd/dist/dist "$GOTOOLDIR"/dist | ||
29 | + echo | ||
30 | + | ||
31 | echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." | ||
32 | # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, | ||
33 | # use the host compiler, CC, from `cmd/dist/dist env` instead. | ||
34 | @@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH | ||
35 | echo | ||
36 | fi | ||
37 | |||
38 | -echo "##### Building packages and commands for $GOOS/$GOARCH." | ||
39 | -CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd | ||
40 | -echo | ||
41 | +if [ "$do_target_build" = "yes" ]; then | ||
42 | + GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}" | ||
43 | + echo "##### Building packages and commands for $GOOS/$GOARCH." | ||
44 | + if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then | ||
45 | + rm -rf ./host-tools | ||
46 | + mkdir ./host-tools | ||
47 | + mv "$GOTOOLDIR"/* ./host-tools | ||
48 | + GOTOOLDIR="$PWD/host-tools" | ||
49 | + fi | ||
50 | + GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL} | ||
51 | + echo | ||
52 | |||
53 | -rm -f "$GOTOOLDIR"/go_bootstrap | ||
54 | + rm -f "$GOTOOLDIR"/go_bootstrap | ||
55 | +fi | ||
56 | |||
57 | if [ "$1" != "--no-banner" ]; then | ||
58 | "$GOTOOLDIR"/dist banner | ||
diff --git a/recipes-devtools/go-cross/go-1.5/syslog.patch b/recipes-devtools/go-cross/go-1.5/syslog.patch deleted file mode 100644 index ce82a4f2..00000000 --- a/recipes-devtools/go-cross/go-1.5/syslog.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go | ||
2 | --- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 | ||
3 | +++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 | ||
4 | @@ -33,6 +33,9 @@ | ||
5 | const severityMask = 0x07 | ||
6 | const facilityMask = 0xf8 | ||
7 | |||
8 | +var writeTimeout = 1 * time.Second | ||
9 | +var connectTimeout = 1 * time.Second | ||
10 | + | ||
11 | const ( | ||
12 | // Severity. | ||
13 | |||
14 | @@ -100,6 +103,7 @@ | ||
15 | type serverConn interface { | ||
16 | writeString(p Priority, hostname, tag, s, nl string) error | ||
17 | close() error | ||
18 | + setWriteDeadline(t time.Time) error | ||
19 | } | ||
20 | |||
21 | type netConn struct { | ||
22 | @@ -273,7 +277,11 @@ | ||
23 | nl = "\n" | ||
24 | } | ||
25 | |||
26 | - err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) | ||
27 | + err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) | ||
28 | + if err != nil { | ||
29 | + return 0, err | ||
30 | + } | ||
31 | + err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) | ||
32 | if err != nil { | ||
33 | return 0, err | ||
34 | } | ||
35 | @@ -305,6 +313,10 @@ | ||
36 | return n.conn.Close() | ||
37 | } | ||
38 | |||
39 | +func (n *netConn) setWriteDeadline(t time.Time) error { | ||
40 | + return n.conn.SetWriteDeadline(t) | ||
41 | +} | ||
42 | + | ||
43 | // NewLogger creates a log.Logger whose output is written to | ||
44 | // the system log service with the specified priority. The logFlag | ||
45 | // argument is the flag set passed through to log.New to create | ||
46 | diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go | ||
47 | --- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 | ||
48 | +++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 | ||
49 | @@ -19,7 +19,7 @@ | ||
50 | logPaths := []string{"/dev/log", "/var/run/syslog"} | ||
51 | for _, network := range logTypes { | ||
52 | for _, path := range logPaths { | ||
53 | - conn, err := net.Dial(network, path) | ||
54 | + conn, err := net.DialTimeout(network, path, connectTimeout) | ||
55 | if err != nil { | ||
56 | continue | ||
57 | } else { | ||
diff --git a/recipes-devtools/go-cross/go-1.6.inc b/recipes-devtools/go-cross/go-1.6.inc deleted file mode 100644 index 7a57eaf0..00000000 --- a/recipes-devtools/go-cross/go-1.6.inc +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | require go-common.inc | ||
2 | |||
3 | PV = "1.6.2" | ||
4 | GO_BASEVERSION = "1.6" | ||
5 | FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" | ||
6 | |||
7 | |||
8 | SRC_URI += "\ | ||
9 | file://armhf-elf-header.patch \ | ||
10 | file://syslog.patch \ | ||
11 | file://fix-target-cc-for-build.patch \ | ||
12 | file://fix-cc-handling.patch \ | ||
13 | file://split-host-and-target-build.patch \ | ||
14 | file://gotooldir.patch \ | ||
15 | " | ||
16 | |||
17 | LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81" | ||
18 | SRC_URI[md5sum] = "d1b50fa98d9a71eeee829051411e6207" | ||
19 | SRC_URI[sha256sum] = "787b0b750d037016a30c6ed05a8a70a91b2e9db4bd9b1a2453aa502a63f1bccc" | ||
diff --git a/recipes-devtools/go-cross/go-1.6/armhf-elf-header.patch b/recipes-devtools/go-cross/go-1.6/armhf-elf-header.patch deleted file mode 100644 index 6113138c..00000000 --- a/recipes-devtools/go-cross/go-1.6/armhf-elf-header.patch +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | Index: go/src/cmd/link/internal/ld/elf.go | ||
2 | =================================================================== | ||
3 | --- go.orig/src/cmd/link/internal/ld/elf.go | ||
4 | +++ go/src/cmd/link/internal/ld/elf.go | ||
5 | @@ -827,7 +827,13 @@ | ||
6 | // 32-bit architectures | ||
7 | case '5': | ||
8 | // we use EABI on both linux/arm and freebsd/arm. | ||
9 | - if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd { | ||
10 | + if HEADTYPE == obj.Hlinux { | ||
11 | + if Ctxt.Goarm == 7 { | ||
12 | + ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float | ||
13 | + } else { | ||
14 | + ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float | ||
15 | + } | ||
16 | + } else if HEADTYPE == obj.Hfreebsd { | ||
17 | // We set a value here that makes no indication of which | ||
18 | // float ABI the object uses, because this is information | ||
19 | // used by the dynamic linker to compare executables and | ||
diff --git a/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch b/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch deleted file mode 100644 index 85770a93..00000000 --- a/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | Index: go/src/cmd/go/build.go | ||
2 | =================================================================== | ||
3 | --- go.orig/src/cmd/go/build.go 2015-07-29 14:48:40.323185807 -0700 | ||
4 | +++ go/src/cmd/go/build.go 2015-07-30 07:37:40.529818586 -0700 | ||
5 | @@ -2805,12 +2805,24 @@ | ||
6 | return b.ccompilerCmd("CC", defaultCC, objdir) | ||
7 | } | ||
8 | |||
9 | +// gccCmd returns a gcc command line prefix | ||
10 | +// defaultCC is defined in zdefaultcc.go, written by cmd/dist. | ||
11 | +func (b *builder) gccCmdForReal() []string { | ||
12 | + return envList("CC", defaultCC) | ||
13 | +} | ||
14 | + | ||
15 | // gxxCmd returns a g++ command line prefix | ||
16 | // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. | ||
17 | func (b *builder) gxxCmd(objdir string) []string { | ||
18 | return b.ccompilerCmd("CXX", defaultCXX, objdir) | ||
19 | } | ||
20 | |||
21 | +// gxxCmd returns a g++ command line prefix | ||
22 | +// defaultCXX is defined in zdefaultcc.go, written by cmd/dist. | ||
23 | +func (b *builder) gxxCmdForReal() []string { | ||
24 | + return envList("CXX", defaultCXX) | ||
25 | +} | ||
26 | + | ||
27 | // ccompilerCmd returns a command line prefix for the given environment | ||
28 | // variable and using the default command when the variable is empty. | ||
29 | func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string { | ||
30 | Index: go/src/cmd/go/env.go | ||
31 | =================================================================== | ||
32 | --- go.orig/src/cmd/go/env.go 2015-07-29 14:48:40.323185807 -0700 | ||
33 | +++ go/src/cmd/go/env.go 2015-07-30 07:40:54.461655721 -0700 | ||
34 | @@ -52,10 +52,9 @@ | ||
35 | |||
36 | if goos != "plan9" { | ||
37 | cmd := b.gccCmd(".") | ||
38 | - env = append(env, envVar{"CC", cmd[0]}) | ||
39 | + env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")}) | ||
40 | env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")}) | ||
41 | - cmd = b.gxxCmd(".") | ||
42 | - env = append(env, envVar{"CXX", cmd[0]}) | ||
43 | + env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")}) | ||
44 | } | ||
45 | |||
46 | if buildContext.CgoEnabled { | ||
diff --git a/recipes-devtools/go-cross/go-1.6/fix-target-cc-for-build.patch b/recipes-devtools/go-cross/go-1.6/fix-target-cc-for-build.patch deleted file mode 100644 index adfeb6b5..00000000 --- a/recipes-devtools/go-cross/go-1.6/fix-target-cc-for-build.patch +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | Index: go/src/make.bash | ||
2 | =================================================================== | ||
3 | --- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700 | ||
4 | +++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700 | ||
5 | @@ -158,7 +158,7 @@ | ||
6 | fi | ||
7 | |||
8 | echo "##### Building packages and commands for $GOOS/$GOARCH." | ||
9 | -CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd | ||
10 | +CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd | ||
11 | echo | ||
12 | |||
13 | rm -f "$GOTOOLDIR"/go_bootstrap | ||
diff --git a/recipes-devtools/go-cross/go-1.6/gotooldir.patch b/recipes-devtools/go-cross/go-1.6/gotooldir.patch deleted file mode 100644 index 473a3280..00000000 --- a/recipes-devtools/go-cross/go-1.6/gotooldir.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | Index: go/src/go/build/build.go | ||
2 | =================================================================== | ||
3 | --- go.orig/src/go/build/build.go | ||
4 | +++ go/src/go/build/build.go | ||
5 | @@ -1388,7 +1388,7 @@ func init() { | ||
6 | } | ||
7 | |||
8 | // ToolDir is the directory containing build tools. | ||
9 | -var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) | ||
10 | +var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)) | ||
11 | |||
12 | // IsLocalImport reports whether the import path is | ||
13 | // a local import path, like ".", "..", "./foo", or "../foo". | ||
14 | Index: go/src/cmd/go/build.go | ||
15 | =================================================================== | ||
16 | --- go.orig/src/cmd/go/build.go | ||
17 | +++ go/src/cmd/go/build.go | ||
18 | @@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err | ||
19 | } | ||
20 | |||
21 | cgoExe := tool("cgo") | ||
22 | - if a.cgo != nil && a.cgo.target != "" { | ||
23 | + if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" { | ||
24 | cgoExe = a.cgo.target | ||
25 | } | ||
26 | outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles) | ||
diff --git a/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch b/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch deleted file mode 100644 index 85fb240a..00000000 --- a/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | Index: go/src/make.bash | ||
2 | =================================================================== | ||
3 | --- go.orig/src/make.bash | ||
4 | +++ go/src/make.bash | ||
5 | @@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then | ||
6 | buildall="" | ||
7 | shift | ||
8 | fi | ||
9 | -./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap | ||
10 | -# Delay move of dist tool to now, because bootstrap may clear tool directory. | ||
11 | -mv cmd/dist/dist "$GOTOOLDIR"/dist | ||
12 | -echo | ||
13 | |||
14 | -if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then | ||
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 | +if [ "$do_host_build" = "yes" ]; then | ||
26 | + ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap | ||
27 | + # Delay move of dist tool to now, because bootstrap may clear tool directory. | ||
28 | + mv cmd/dist/dist "$GOTOOLDIR"/dist | ||
29 | + echo | ||
30 | + | ||
31 | echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." | ||
32 | # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, | ||
33 | # use the host compiler, CC, from `cmd/dist/dist env` instead. | ||
34 | @@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH | ||
35 | echo | ||
36 | fi | ||
37 | |||
38 | -echo "##### Building packages and commands for $GOOS/$GOARCH." | ||
39 | -CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd | ||
40 | -echo | ||
41 | +if [ "$do_target_build" = "yes" ]; then | ||
42 | + GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}" | ||
43 | + echo "##### Building packages and commands for $GOOS/$GOARCH." | ||
44 | + if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then | ||
45 | + rm -rf ./host-tools | ||
46 | + mkdir ./host-tools | ||
47 | + mv "$GOTOOLDIR"/* ./host-tools | ||
48 | + GOTOOLDIR="$PWD/host-tools" | ||
49 | + fi | ||
50 | + GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL} | ||
51 | + echo | ||
52 | |||
53 | -rm -f "$GOTOOLDIR"/go_bootstrap | ||
54 | + rm -f "$GOTOOLDIR"/go_bootstrap | ||
55 | +fi | ||
56 | |||
57 | if [ "$1" != "--no-banner" ]; then | ||
58 | "$GOTOOLDIR"/dist banner | ||
diff --git a/recipes-devtools/go-cross/go-1.6/syslog.patch b/recipes-devtools/go-cross/go-1.6/syslog.patch deleted file mode 100644 index ce82a4f2..00000000 --- a/recipes-devtools/go-cross/go-1.6/syslog.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go | ||
2 | --- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 | ||
3 | +++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 | ||
4 | @@ -33,6 +33,9 @@ | ||
5 | const severityMask = 0x07 | ||
6 | const facilityMask = 0xf8 | ||
7 | |||
8 | +var writeTimeout = 1 * time.Second | ||
9 | +var connectTimeout = 1 * time.Second | ||
10 | + | ||
11 | const ( | ||
12 | // Severity. | ||
13 | |||
14 | @@ -100,6 +103,7 @@ | ||
15 | type serverConn interface { | ||
16 | writeString(p Priority, hostname, tag, s, nl string) error | ||
17 | close() error | ||
18 | + setWriteDeadline(t time.Time) error | ||
19 | } | ||
20 | |||
21 | type netConn struct { | ||
22 | @@ -273,7 +277,11 @@ | ||
23 | nl = "\n" | ||
24 | } | ||
25 | |||
26 | - err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) | ||
27 | + err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) | ||
28 | + if err != nil { | ||
29 | + return 0, err | ||
30 | + } | ||
31 | + err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) | ||
32 | if err != nil { | ||
33 | return 0, err | ||
34 | } | ||
35 | @@ -305,6 +313,10 @@ | ||
36 | return n.conn.Close() | ||
37 | } | ||
38 | |||
39 | +func (n *netConn) setWriteDeadline(t time.Time) error { | ||
40 | + return n.conn.SetWriteDeadline(t) | ||
41 | +} | ||
42 | + | ||
43 | // NewLogger creates a log.Logger whose output is written to | ||
44 | // the system log service with the specified priority. The logFlag | ||
45 | // argument is the flag set passed through to log.New to create | ||
46 | diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go | ||
47 | --- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 | ||
48 | +++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 | ||
49 | @@ -19,7 +19,7 @@ | ||
50 | logPaths := []string{"/dev/log", "/var/run/syslog"} | ||
51 | for _, network := range logTypes { | ||
52 | for _, path := range logPaths { | ||
53 | - conn, err := net.Dial(network, path) | ||
54 | + conn, err := net.DialTimeout(network, path, connectTimeout) | ||
55 | if err != nil { | ||
56 | continue | ||
57 | } else { | ||
diff --git a/recipes-devtools/go-cross/go-common.inc b/recipes-devtools/go-cross/go-common.inc deleted file mode 100644 index f9587ea9..00000000 --- a/recipes-devtools/go-cross/go-common.inc +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | SUMMARY = "Go programming language compiler" | ||
2 | DESCRIPTION = " The Go programming language is an open source project to make \ | ||
3 | programmers more productive. Go is expressive, concise, clean, and\ | ||
4 | efficient. Its concurrency mechanisms make it easy to write programs\ | ||
5 | that get the most out of multicore and networked machines, while its\ | ||
6 | novel type system enables flexible and modular program construction.\ | ||
7 | Go compiles quickly to machine code yet has the convenience of\ | ||
8 | garbage collection and the power of run-time reflection. It's a\ | ||
9 | fast, statically typed, compiled language that feels like a\ | ||
10 | dynamically typed, interpreted language." | ||
11 | HOMEPAGE = " http://golang.org/" | ||
12 | LICENSE = "BSD-3-Clause" | ||
13 | |||
14 | inherit go-osarchmap | ||
15 | |||
16 | SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz" | ||
17 | S = "${WORKDIR}/go" | ||
18 | B = "${S}" | ||
19 | |||
20 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
diff --git a/recipes-devtools/go-cross/go-cross.inc b/recipes-devtools/go-cross/go-cross.inc deleted file mode 100644 index a7117bcd..00000000 --- a/recipes-devtools/go-cross/go-cross.inc +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | inherit cross | ||
2 | |||
3 | # Produces target arch specific code so we should reflect this in the PN | ||
4 | PN = "go-cross-${TARGET_ARCH}" | ||
5 | |||
6 | # libgcc is required for the target specific libraries to build properly | ||
7 | DEPENDS += "go-initial-native libgcc virtual/${TARGET_PREFIX}gcc" | ||
8 | |||
9 | do_compile[depends] += "go-initial-native:do_populate_sysroot" | ||
10 | |||
11 | # Prevent runstrip from running because you get errors when the host arch != target arch | ||
12 | #INHIBIT_PACKAGE_STRIP = "1" | ||
13 | STRIP = "echo" | ||
14 | |||
15 | export GOHOSTOS = "${BUILD_GOOS}" | ||
16 | export GOHOSTARCH = "${BUILD_GOARCH}" | ||
17 | export GOOS = "${TARGET_GOOS}" | ||
18 | export GOARCH = "${TARGET_GOARCH}" | ||
19 | export GOARM = "${TARGET_GOARM}" | ||
20 | export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" | ||
21 | export GOROOT_FINAL = "${libdir}/go" | ||
22 | export CGO_ENABLED = "1" | ||
23 | export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" | ||
24 | export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" | ||
25 | CC = "${@d.getVar('BUILD_CC').strip()}" | ||
26 | |||
27 | do_configure[noexec] = "1" | ||
28 | |||
29 | do_compile() { | ||
30 | export GOBIN="${B}/bin" | ||
31 | rm -rf ${GOBIN} ${B}/pkg | ||
32 | mkdir ${GOBIN} | ||
33 | |||
34 | export TMPDIR=${WORKDIR}/build-tmp | ||
35 | mkdir -p ${WORKDIR}/build-tmp | ||
36 | |||
37 | cd src | ||
38 | ./make.bash --host-only | ||
39 | # Ensure cgo.a is built with the target toolchain | ||
40 | export GOBIN="${B}/target/bin" | ||
41 | rm -rf ${GOBIN} | ||
42 | mkdir -p ${GOBIN} | ||
43 | GO_FLAGS="-a" ./make.bash | ||
44 | } | ||
45 | |||
46 | do_install() { | ||
47 | install -d ${D}${libdir}/go | ||
48 | cp -a ${B}/pkg ${D}${libdir}/go/ | ||
49 | install -d ${D}${libdir}/go/src | ||
50 | (cd ${S}/src; for d in *; do \ | ||
51 | [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ | ||
52 | done) | ||
53 | install -d ${D}${bindir} | ||
54 | for f in ${B}/bin/* | ||
55 | do | ||
56 | install -m755 $f ${D}${bindir} | ||
57 | done | ||
58 | } | ||
59 | |||
60 | do_package[noexec] = "1" | ||
61 | do_packagedata[noexec] = "1" | ||
62 | do_package_write_ipk[noexec] = "1" | ||
63 | do_package_write_deb[noexec] = "1" | ||
64 | do_package_write_rpm[noexec] = "1" | ||
diff --git a/recipes-devtools/go-cross/go-cross_1.5.bb b/recipes-devtools/go-cross/go-cross_1.5.bb deleted file mode 100644 index 80b5a03f..00000000 --- a/recipes-devtools/go-cross/go-cross_1.5.bb +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | require go-cross.inc | ||
2 | require go-${PV}.inc | ||
diff --git a/recipes-devtools/go-cross/go-cross_1.6.bb b/recipes-devtools/go-cross/go-cross_1.6.bb deleted file mode 100644 index 80b5a03f..00000000 --- a/recipes-devtools/go-cross/go-cross_1.6.bb +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | require go-cross.inc | ||
2 | require go-${PV}.inc | ||
diff --git a/recipes-devtools/go-cross/go-initial-native_1.4.bb b/recipes-devtools/go-cross/go-initial-native_1.4.bb deleted file mode 100644 index cf186e78..00000000 --- a/recipes-devtools/go-cross/go-initial-native_1.4.bb +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | require go-native.inc | ||
2 | require go-${PV}.inc | ||
diff --git a/recipes-devtools/go-cross/go-native.inc b/recipes-devtools/go-cross/go-native.inc deleted file mode 100644 index cb2dd2a7..00000000 --- a/recipes-devtools/go-cross/go-native.inc +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | inherit native | ||
2 | |||
3 | export GOOS = "${BUILD_GOOS}" | ||
4 | export GOARCH = "${BUILD_GOARCH}" | ||
5 | export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go" | ||
6 | export CGO_ENABLED = "1" | ||
7 | |||
8 | do_configure[noexec] = "1" | ||
9 | |||
10 | do_compile() { | ||
11 | export GOBIN="${B}/bin" | ||
12 | rm -rf ${GOBIN} | ||
13 | mkdir ${GOBIN} | ||
14 | |||
15 | export TMPDIR=${WORKDIR}/build-tmp | ||
16 | mkdir -p ${WORKDIR}/build-tmp | ||
17 | |||
18 | cd src | ||
19 | CGO_ENABLED=0 ./make.bash --host-only | ||
20 | } | ||
21 | |||
22 | |||
23 | make_wrapper() { | ||
24 | rm -f ${D}${bindir}/$2 | ||
25 | cat <<END >${D}${bindir}/$2 | ||
26 | #!/bin/bash | ||
27 | here=\`dirname \$0\` | ||
28 | export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" | ||
29 | \$here/../lib/go/bin/$1 "\$@" | ||
30 | END | ||
31 | chmod +x ${D}${bindir}/$2 | ||
32 | } | ||
33 | |||
34 | do_install() { | ||
35 | install -d ${D}${libdir}/go | ||
36 | cp -a ${B}/pkg ${D}${libdir}/go/ | ||
37 | install -d ${D}${libdir}/go/src | ||
38 | (cd ${S}/src; for d in *; do \ | ||
39 | [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ | ||
40 | done) | ||
41 | install -d ${D}${bindir} ${D}${libdir}/go/bin | ||
42 | for f in ${B}/bin/* | ||
43 | do | ||
44 | base=`basename $f` | ||
45 | install -m755 $f ${D}${libdir}/go/bin | ||
46 | make_wrapper $base $base | ||
47 | done | ||
48 | } | ||
49 | |||
50 | do_package[noexec] = "1" | ||
51 | do_packagedata[noexec] = "1" | ||
52 | do_package_write_ipk[noexec] = "1" | ||
53 | do_package_write_deb[noexec] = "1" | ||
54 | do_package_write_rpm[noexec] = "1" | ||