1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
|
Index: gcc-6-6.2.1-4.1/src/libgo/Makefile.am
===================================================================
--- gcc-6-6.2.1-4.1.orig/src/libgo/Makefile.am
+++ gcc-6-6.2.1-4.1/src/libgo/Makefile.am
@@ -419,6 +419,9 @@ else
if LIBGO_IS_NETBSD
runtime_getncpu_file = runtime/getncpu-bsd.c
else
+if LIBGO_IS_GNU
+runtime_getncpu_file = runtime/getncpu-gnu.c
+else
runtime_getncpu_file = runtime/getncpu-none.c
endif
endif
@@ -426,6 +429,7 @@ endif
endif
endif
endif
+endif
if LIBGO_IS_LINUX
runtime_netpoll_files = runtime/netpoll_epoll.c
@@ -433,9 +437,13 @@ else
if LIBGO_IS_SOLARIS
runtime_netpoll_files = runtime/netpoll_select.c
else
+if LIBGO_IS_GNU
+runtime_netpoll_files = runtime/netpoll_select.c
+else
runtime_netpoll_files = runtime/netpoll_kqueue.c
endif
endif
+endif
runtime_files = \
runtime/go-append.c \
@@ -744,6 +752,14 @@ go_net_sockoptip_file = go/net/sockoptip
go_net_cgo_sock_file = go/net/cgo_sockold.go
go_net_cgo_res_file = go/net/cgo_resnew.go
else
+if LIBGO_IS_GNU
+go_net_cgo_file = go/net/cgo_linux.go
+go_net_sock_file = go/net/sock_gnu.go
+go_net_sockopt_file = go/net/sockopt_gnu.go
+go_net_sockoptip_file = go/net/sockoptip_gnu.go go/net/sockoptip_posix.go
+go_net_cgo_sock_file = go/net/cgo_socknew.go
+go_net_cgo_res_file = go/net/cgo_resnew.go
+else
go_net_cgo_file = go/net/cgo_bsd.go
go_net_sock_file = go/net/sock_bsd.go
go_net_sockopt_file = go/net/sockopt_bsd.go
@@ -755,6 +771,7 @@ endif
endif
endif
endif
+endif
if LIBGO_IS_LINUX
go_net_sendfile_file = go/net/sendfile_linux.go
@@ -768,11 +785,15 @@ else
if LIBGO_IS_SOLARIS
go_net_sendfile_file = go/net/sendfile_solaris.go
else
+if LIBGO_IS_GNU
+go_net_sendfile_file = go/net/sendfile_gnu.go
+else
go_net_sendfile_file = go/net/sendfile_stub.go
endif
endif
endif
endif
+endif
if LIBGO_IS_LINUX
go_net_interface_file = go/net/interface_linux.go
@@ -794,9 +815,13 @@ else
if LIBGO_IS_FREEBSD
go_net_cloexec_file = go/net/sock_cloexec.go go/net/hook_cloexec.go
else
+if LIBGO_IS_GNU
+go_net_cloexec_file = go/net/sock_cloexec.go go/net/hook_cloexec.go
+else
go_net_cloexec_file = go/net/sys_cloexec.go
endif
endif
+endif
if LIBGO_IS_OPENBSD
go_net_tcpsockopt_file = go/net/tcpsockopt_openbsd.go
@@ -889,9 +914,13 @@ else
if LIBGO_IS_LINUX
go_os_dir_file = go/os/dir_largefile.go
else
+if LIBGO_IS_GNU
+go_os_dir_file = go/os/dir_largefile.go
+else
go_os_dir_file = go/os/dir_regfile.go
endif
endif
+endif
if LIBGO_IS_DARWIN
go_os_getwd_file = go/os/getwd_darwin.go
@@ -911,11 +940,15 @@ else
if LIBGO_IS_RTEMS
go_os_sys_file = go/os/sys_uname.go
else
+if LIBGO_IS_GNU
+go_os_sys_file = go/os/sys_uname.go
+else
go_os_sys_file = go/os/sys_bsd.go
endif
endif
endif
endif
+endif
if LIBGO_IS_FREEBSD
go_os_cloexec_file = go/os/sys_freebsd.go
@@ -937,6 +970,9 @@ else
if LIBGO_IS_LINUX
go_os_stat_file = go/os/stat_atim.go
else
+if LIBGO_IS_GNU
+go_os_stat_file = go/os/stat_atim.go
+else
if LIBGO_IS_OPENBSD
go_os_stat_file = go/os/stat_atim.go
else
@@ -960,12 +996,17 @@ endif
endif
endif
endif
+endif
if LIBGO_IS_LINUX
go_os_pipe_file = go/os/pipe_linux.go
else
+if LIBGO_IS_GNU
+go_os_pipe_file = go/os/pipe_linux.go
+else
go_os_pipe_file = go/os/pipe_bsd.go
endif
+endif
if LIBGO_IS_DARWIN
go_os_sticky_file = go/os/sticky_bsd.go
@@ -1158,6 +1199,9 @@ go_unicode_files = \
if LIBGO_IS_LINUX
archive_tar_atim_file = go/archive/tar/stat_atim.go
endif
+if LIBGO_IS_GNU
+archive_tar_atim_file = go/archive/tar/stat_atim.go
+endif
if LIBGO_IS_OPENBSD
archive_tar_atim_file = go/archive/tar/stat_atim.go
endif
@@ -1322,6 +1366,9 @@ else
if LIBGO_IS_DARWIN
go_crypto_x509_root_file = go/crypto/x509/root_darwin.go
else
+if LIBGO_IS_GNU
+go_crypto_x509_root_file = go/crypto/x509/root_linux.go
+else
go_crypto_x509_root_file =
endif
endif
@@ -1330,6 +1377,7 @@ endif
endif
endif
endif
+endif
go_crypto_x509_files = \
go/crypto/x509/cert_pool.go \
@@ -1857,10 +1905,15 @@ if LIBGO_IS_LINUX
syscall_exec_file = go/syscall/exec_unix.go
syscall_exec_os_file = go/syscall/exec_linux.go
else
+if LIBGO_IS_GNU
+syscall_exec_file = go/syscall/exec_unix.go
+syscall_exec_os_file = go/syscall/exec_bsd.go
+else
syscall_exec_file = go/syscall/exec_unix.go
syscall_exec_os_file = go/syscall/exec_bsd.go
endif
endif
+endif
# Define Wait4.
if LIBGO_IS_RTEMS
@@ -1894,6 +1947,9 @@ else
if LIBGO_IS_RTEMS
syscall_errstr_file = go/syscall/errstr_linux.go
else
+if LIBGO_IS_GNU
+syscall_errstr_file = go/syscall/errstr_linux.go
+else
if HAVE_STRERROR_R
syscall_errstr_file = go/syscall/errstr.go
else
@@ -1901,12 +1957,16 @@ syscall_errstr_file = go/syscall/errstr_
endif
endif
endif
+endif
# Declare libc functions that vary for largefile systems.
if LIBGO_IS_LINUX
# Always use lseek64 on GNU/Linux.
syscall_size_file = go/syscall/libcall_posix_largefile.go
else # !LIBGO_IS_LINUX
+if LIBGO_IS_GNU
+syscall_size_file = go/syscall/libcall_posix_largefile.go
+else # !LIBGO_IS_LINUX && !LIBGO_IS_GNU
if LIBGO_IS_SOLARIS
if LIBGO_IS_386
# Use lseek64 on 32-bit Solaris/x86.
@@ -1924,6 +1984,7 @@ else # !LIBGO_IS_LINUX && !LIBGO_IS_SOLA
# Use lseek by default.
syscall_size_file = go/syscall/libcall_posix_regfile.go
endif # !LIBGO_IS_SOLARIS
+endif # !LIBGO_IS_LINUX && !LIBGO_IS_GNU
endif # !LIBGO_IS_LINUX
# Define socket sizes and types.
@@ -1946,10 +2007,14 @@ else
if LIBGO_IS_IRIX
syscall_socket_file = go/syscall/socket_irix.go
else
+if LIBGO_IS_GNU
+syscall_socket_file = go/syscall/socket_gnu.go
+else
syscall_socket_file = go/syscall/socket_bsd.go
endif
endif
endif
+endif
# Define socket functions.
if LIBGO_IS_SOLARIS
@@ -2028,11 +2093,20 @@ else
syscall_os_file = go/syscall/libcall_bsd.go
endif
+# GNU/Hurd specific library calls support.
+if LIBGO_IS_GNU
+syscall_libcall_file = go/syscall/libcall_posix-1.go
+syscall_os_test_file = go/syscall/syscall_gnu_test.go
+else
+syscall_libcall_file = go/syscall/libcall_posix.go
+syscall_os_test_file = go/syscall/syscall_unix_test.go
+endif
+
go_base_syscall_files = \
go/syscall/env_unix.go \
go/syscall/syscall_errno.go \
go/syscall/libcall_support.go \
- go/syscall/libcall_posix.go \
+ $(syscall_libcall_file) \
go/syscall/msan0.go \
go/syscall/socket.go \
go/syscall/sockcmsg_unix.go \
@@ -2078,7 +2152,7 @@ go_syscall_test_files = \
go/syscall/export_unix_test.go \
go/syscall/mmap_unix_test.go \
go/syscall/syscall_test.go \
- go/syscall/syscall_unix_test.go
+ $(syscall_os_test_file)
libcalls.go: s-libcalls; @true
s-libcalls: libcalls-list go/syscall/mksyscall.awk $(go_base_syscall_files)
@@ -4431,7 +4505,7 @@ mostlyclean-local:
find . -name '*-testsum' -print | xargs rm -f
find . -name '*-testlog' -print | xargs rm -f
-CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
+CLEANFILES = *.go *.gox goc2c *.c s-* libgo.sum libgo.log
clean-local:
find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
|