summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/go-cross/go-1.4
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/go-cross/go-1.4')
-rw-r--r--recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch21
-rw-r--r--recipes-devtools/go-cross/go-1.4/syslog.patch57
2 files changed, 78 insertions, 0 deletions
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
new file mode 100644
index 00000000..1ae53a38
--- /dev/null
+++ b/recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch
@@ -0,0 +1,21 @@
1Description: Use correct ELF header for armhf binaries.
2Author: Adam Conrad <adconrad@ubuntu.com>
3Last-Update: 2013-07-08
4
5Index: 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/syslog.patch b/recipes-devtools/go-cross/go-1.4/syslog.patch
new file mode 100644
index 00000000..ce82a4f2
--- /dev/null
+++ b/recipes-devtools/go-cross/go-1.4/syslog.patch
@@ -0,0 +1,57 @@
1diff -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
46diff -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 {