Skip to content

Commit 39fd3f7

Browse files
committed
bump version go1.17.13
1 parent 2c495c2 commit 39fd3f7

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
VERSION=1.17.3
3+
VERSION=1.17.13
44
ARTIFACT=go${VERSION}-CentOS5.linux-amd64.tar.xz
55
IMAGE_TAG=centos5-go${VERSION}
66
SOURCE_DIR=go-src

go1.17.13-fix.diff

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
2+
index a73e998877..c3d61f4c5e 100644
3+
--- a/src/cmd/cgo/gcc.go
4+
+++ b/src/cmd/cgo/gcc.go
5+
@@ -1639,7 +1639,7 @@ func (p *Package) gccCmd() []string {
6+
c = append(c, "-mcmodel=large")
7+
}
8+
// disable LTO so we get an object whose symbols we can read
9+
- c = append(c, "-fno-lto")
10+
+ // c = append(c, "-fno-lto")
11+
c = append(c, "-") //read input from standard input
12+
return c
13+
}
14+
diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go
15+
index 94152f4278..fa965d8362 100644
16+
--- a/src/cmd/cgo/out.go
17+
+++ b/src/cmd/cgo/out.go
18+
@@ -881,9 +881,9 @@ func (p *Package) writeExports(fgo2, fm, fgcc, fgcch io.Writer) {
19+
// We use packed structs, but they are always aligned.
20+
// The pragmas and address-of-packed-member are only recognized as
21+
// warning groups in clang 4.0+, so ignore unknown pragmas first.
22+
- fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n")
23+
- fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Wpragmas\"\n")
24+
- fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Waddress-of-packed-member\"\n")
25+
+ // fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n")
26+
+ // fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Wpragmas\"\n")
27+
+ // fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Waddress-of-packed-member\"\n")
28+
29+
fmt.Fprintf(fgcc, "extern void crosscall2(void (*fn)(void *), void *, int, __SIZE_TYPE__);\n")
30+
fmt.Fprintf(fgcc, "extern __SIZE_TYPE__ _cgo_wait_runtime_init_done(void);\n")
31+
@@ -1477,10 +1477,10 @@ extern char* _cgo_topofstack(void);
32+
We use packed structs, but they are always aligned.
33+
The pragmas and address-of-packed-member are only recognized as warning
34+
groups in clang 4.0+, so ignore unknown pragmas first.
35+
-*/
36+
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
37+
#pragma GCC diagnostic ignored "-Wpragmas"
38+
#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
39+
+*/
40+
41+
#include <errno.h>
42+
#include <string.h>
43+
diff --git a/src/runtime/sys_linux_amd64.s b/src/runtime/sys_linux_amd64.s
44+
index 33cc670b64..1b6abce31b 100644
45+
--- a/src/runtime/sys_linux_amd64.s
46+
+++ b/src/runtime/sys_linux_amd64.s
47+
@@ -43,6 +43,7 @@
48+
#define SYS_epoll_create 213
49+
#define SYS_clock_gettime 228
50+
#define SYS_exit_group 231
51+
+#define SYS_epoll_wait 232
52+
#define SYS_epoll_ctl 233
53+
#define SYS_tgkill 234
54+
#define SYS_openat 257
55+
@@ -660,8 +661,7 @@ TEXT runtime·epollwait(SB),NOSPLIT,$0
56+
MOVQ ev+8(FP), SI
57+
MOVL nev+16(FP), DX
58+
MOVL timeout+20(FP), R10
59+
- MOVQ $0, R8
60+
- MOVL $SYS_epoll_pwait, AX
61+
+ MOVL $SYS_epoll_wait, AX
62+
SYSCALL
63+
MOVL AX, ret+24(FP)
64+
RET

0 commit comments

Comments
 (0)