On Fri, 2018-10-05 at 21:10 +0200, Svante Signell wrote:
> On Fri, 2018-10-05 at 01:38 +0200, Matthias Klose wrote:
> > Hi Svante,
> >
> > please have a look at the recent libgo build failure with GCC trunk
> > 20181004 after the libgo merge. Please could you update the
> > patches and send them upstream again?
>
> Well I don't really know where to submit the patches to upstream, but
> here they are. Cc:ing the gcc-snapshot bug 904...@bugs.debian.org
> too.
Hi again,
Seems like more changes were needed this time: Attached are three
updated patches:
src_libgo_go_syscall.diff
add-gnu-to-libgo-headers.diff
add-gnu-to-libgo-test-headers.diff
Thanks!
Index: gcc-snapshot-20181004/src/libgo/go/cmd/go/internal/base/signal_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/cmd/go/internal/base/signal_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/cmd/go/internal/base/signal_unix.go
@@ -1,8 +1,9 @@
+
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js linux nacl netbsd openbsd solaris
package base
Index: gcc-snapshot-20181004/src/libgo/go/crypto/x509/root_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/crypto/x509/root_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/crypto/x509/root_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package x509
Index: gcc-snapshot-20181004/src/libgo/go/net/interface_stub.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/interface_stub.go
+++ gcc-snapshot-20181004/src/libgo/go/net/interface_stub.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix nacl js,wasm
+// +build aix nacl gnu js,wasm
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/internal/socktest/switch_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/internal/socktest/switch_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/internal/socktest/switch_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package socktest
Index: gcc-snapshot-20181004/src/libgo/go/net/port_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/port_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/port_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris nacl
+// +build aix darwin dragonfly freebsd gnu js,wasm linux netbsd openbsd solaris nacl
// Read system port mappings from /etc/services
Index: gcc-snapshot-20181004/src/libgo/go/os/dir_largefile.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/dir_largefile.go
+++ gcc-snapshot-20181004/src/libgo/go/os/dir_largefile.go
@@ -5,7 +5,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix linux solaris,386 solaris,sparc
+// +build aix gnu linux solaris,386 solaris,sparc
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/dir_regfile.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/dir_regfile.go
+++ gcc-snapshot-20181004/src/libgo/go/os/dir_regfile.go
@@ -6,6 +6,7 @@
// license that can be found in the LICENSE file.
// +build !aix
+// +build !gnu
// +build !linux
// +build !solaris !386
// +build !solaris !sparc
Index: gcc-snapshot-20181004/src/libgo/go/os/dir_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/dir_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/dir_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/exec_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/exec_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/exec_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/stat_atim.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/stat_atim.go
+++ gcc-snapshot-20181004/src/libgo/go/os/stat_atim.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux openbsd solaristag
+// +build gnu linux openbsd solaristag
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/stat_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/stat_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/stat_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/sys_uname.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/sys_uname.go
+++ gcc-snapshot-20181004/src/libgo/go/os/sys_uname.go
@@ -4,7 +4,7 @@
// For systems which only store the hostname in uname (Solaris).
-// +build aix solaris irix rtems
+// +build aix gnu solaris irix rtems
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/user/listgroups_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/user/listgroups_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/user/listgroups_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build dragonfly darwin freebsd !android,linux netbsd openbsd
+// +build dragonfly darwin freebsd gnu !android,linux netbsd openbsd
// +build cgo,!osusergo
package user
Index: gcc-snapshot-20181004/src/libgo/go/os/wait_unimp.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/wait_unimp.go
+++ gcc-snapshot-20181004/src/libgo/go/os/wait_unimp.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly js,wasm nacl netbsd openbsd solaris
+// +build aix darwin dragonfly gnu js,wasm nacl netbsd openbsd solaris
package os
Index: gcc-snapshot-20181004/src/libgo/go/path/filepath/path_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/path/filepath/path_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/path/filepath/path_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package filepath
Index: gcc-snapshot-20181004/src/libgo/go/runtime/env_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/runtime/env_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/runtime/env_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package runtime
Index: gcc-snapshot-20181004/src/libgo/go/runtime/lock_sema.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/runtime/lock_sema.go
+++ gcc-snapshot-20181004/src/libgo/go/runtime/lock_sema.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin nacl netbsd openbsd plan9 solaris windows
+// +build aix darwin gnu nacl netbsd openbsd plan9 solaris windows
package runtime
Index: gcc-snapshot-20181004/src/libgo/go/runtime/netpoll.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/runtime/netpoll.go
+++ gcc-snapshot-20181004/src/libgo/go/runtime/netpoll.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package runtime
Index: gcc-snapshot-20181004/src/libgo/go/runtime/signal_gccgo.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/runtime/signal_gccgo.go
+++ gcc-snapshot-20181004/src/libgo/go/runtime/signal_gccgo.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package runtime
Index: gcc-snapshot-20181004/src/libgo/go/runtime/signal_sighandler.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/runtime/signal_sighandler.go
+++ gcc-snapshot-20181004/src/libgo/go/runtime/signal_sighandler.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris
package runtime
Index: gcc-snapshot-20181004/src/libgo/go/syscall/errstr.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/errstr.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/errstr.go
@@ -4,6 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// +build !gnu
// +build !linux
package syscall
Index: gcc-snapshot-20181004/src/libgo/go/syscall/libcall_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/libcall_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/libcall_posix.go
@@ -9,6 +9,8 @@
// Note that sometimes we use a lowercase //sys name and
// wrap it in our own nicer implementation.
+// +build !gnu
+
package syscall
import "unsafe"
Index: gcc-snapshot-20181004/src/libgo/go/syscall/libcall_posix_largefile.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/libcall_posix_largefile.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/libcall_posix_largefile.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix linux solaris,386 solaris,sparc
+// +build aix gnu linux solaris,386 solaris,sparc
// POSIX library calls on systems which use the largefile interface.
Index: gcc-snapshot-20181004/src/libgo/go/syscall/libcall_posix_regfile.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/libcall_posix_regfile.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/libcall_posix_regfile.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// +build !aix
+// +build !gnu
// +build !linux
// +build !solaris !386
// +build !solaris !sparc
Index: gcc-snapshot-20181004/src/libgo/go/syscall/libcall_posix_utimesnano.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/libcall_posix_utimesnano.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/libcall_posix_utimesnano.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd openbsd netbsd solaris
+// +build aix darwin dragonfly freebsd gnu openbsd netbsd solaris
// General POSIX version of UtimesNano.
Index: gcc-snapshot-20181004/src/libgo/go/net/cgo_resnew.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/cgo_resnew.go
+++ gcc-snapshot-20181004/src/libgo/go/net/cgo_resnew.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// +build cgo,!netgo
-// +build aix darwin linux,!android netbsd solaris
+// +build aix darwin gnu linux,!android netbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/cgo_sockold.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/cgo_sockold.go
+++ gcc-snapshot-20181004/src/libgo/go/net/cgo_sockold.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// +build cgo,!netgo
-// +build aix darwin dragonfly freebsd netbsd openbsd
+// +build aix darwin dragonfly freebsd gnu netbsd openbsd
package net
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/fd_poll_runtime.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/fd_poll_runtime.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/fd_poll_runtime.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd windows solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd windows solaris
package poll
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/hook_cloexec.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/hook_cloexec.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/hook_cloexec.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build dragonfly freebsd linux netbsd openbsd
+// +build dragonfly freebsd gnu linux netbsd openbsd
package poll
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/fd_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/fd_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/fd_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package poll
Index: gcc-snapshot-20181004/src/libgo/go/net/sock_cloexec.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/sock_cloexec.go
+++ gcc-snapshot-20181004/src/libgo/go/net/sock_cloexec.go
@@ -5,7 +5,7 @@
// This file implements sysSocket and accept for platforms that
// provide a fast path for setting SetNonblock and CloseOnExec.
-// +build dragonfly freebsd linux netbsd openbsd
+// +build dragonfly freebsd gnu linux netbsd openbsd
package net
Index: gcc-snapshot-20181004/src/libgo/go/syscall/exec_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/exec_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/exec_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
// Fork, exec, wait, etc.
Index: gcc-snapshot-20181004/src/libgo/go/os/exec/lp_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/exec/lp_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/exec/lp_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris
package exec
Index: gcc-snapshot-20181004/src/libgo/go/os/signal/signal_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/signal/signal_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/signal/signal_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package signal
Index: gcc-snapshot-20181004/src/libgo/go/os/error_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/error_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/error_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/file_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/file_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/file_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/path_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/path_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/path_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/sys_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/sys_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/sys_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/user/decls_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/user/decls_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/user/decls_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd
// +build cgo
package user
Index: gcc-snapshot-20181004/src/libgo/go/os/user/lookup_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/user/lookup_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/user/lookup_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd js,wasm !android,linux nacl netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu js,wasm !android,linux nacl netbsd openbsd solaris
// +build !cgo osusergo
package user
Index: gcc-snapshot-20181004/src/libgo/go/syscall/env_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/env_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/env_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
// Unix environment variables.
Index: gcc-snapshot-20181004/src/libgo/go/syscall/exec_bsd.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/exec_bsd.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/exec_bsd.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu netbsd openbsd solaris
package syscall
Index: gcc-snapshot-20181004/src/libgo/go/syscall/sockcmsg_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/sockcmsg_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/sockcmsg_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
// Socket control messages
Index: gcc-snapshot-20181004/src/libgo/go/syscall/syscall_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/syscall_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/syscall_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package syscall
Index: gcc-snapshot-20181004/src/libgo/go/time/sys_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/time/sys_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/time/sys_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package time
Index: gcc-snapshot-20181004/src/libgo/go/time/zoneinfo_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/time/zoneinfo_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/time/zoneinfo_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin,386 darwin,amd64 dragonfly freebsd js,wasm linux,!android nacl netbsd openbsd solaris
+// +build aix darwin,386 darwin,amd64 dragonfly freebsd gnu js,wasm linux,!android nacl netbsd openbsd solaris
// Parse "zoneinfo" time zone file.
// This is a fairly standard file format used on OS X, Linux, BSD, Sun, and others.
Index: gcc-snapshot-20181004/src/libgo/go/net/addrselect.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/addrselect.go
+++ gcc-snapshot-20181004/src/libgo/go/net/addrselect.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
// Minimal RFC 6724 address selection.
Index: gcc-snapshot-20181004/src/libgo/go/net/conf.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/conf.go
+++ gcc-snapshot-20181004/src/libgo/go/net/conf.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/dnsclient_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/dnsclient_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/dnsclient_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
// DNS client: see RFC 1035.
// Has to be linked into package net for Dial.
Index: gcc-snapshot-20181004/src/libgo/go/net/dnsconfig_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/dnsconfig_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/dnsconfig_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
// Read system DNS config from /etc/resolv.conf
Index: gcc-snapshot-20181004/src/libgo/go/net/fd_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/fd_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/fd_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/file_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/file_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/file_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/hook_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/hook_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/hook_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/iprawsock_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/iprawsock_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/iprawsock_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/ipsock_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/ipsock_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/ipsock_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/lookup_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/lookup_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/lookup_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/nss.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/nss.go
+++ gcc-snapshot-20181004/src/libgo/go/net/nss.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/sockopt_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/sockopt_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/sockopt_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/sock_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/sock_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/sock_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/tcpsockopt_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/tcpsockopt_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/tcpsockopt_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/tcpsockopt_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/tcpsockopt_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/tcpsockopt_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix freebsd linux netbsd
+// +build aix freebsd gnu linux netbsd
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/tcpsock_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/tcpsock_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/tcpsock_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/udpsock_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/udpsock_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/udpsock_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/unixsock_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/unixsock_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/unixsock_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/os/exec_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/exec_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/exec_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/file_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/file_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/file_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package os
Index: gcc-snapshot-20181004/src/libgo/go/os/executable_procfs.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/executable_procfs.go
+++ gcc-snapshot-20181004/src/libgo/go/os/executable_procfs.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux netbsd dragonfly nacl js,wasm
+// +build gnu linux netbsd dragonfly nacl js,wasm
package os
Index: gcc-snapshot-20181004/src/libgo/go/syscall/timestruct.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/timestruct.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/timestruct.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package syscall
Index: gcc-snapshot-20181004/src/libgo/go/net/cgo_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/cgo_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/cgo_unix.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// +build cgo,!netgo
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/archive/tar/stat_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/archive/tar/stat_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/archive/tar/stat_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix linux darwin dragonfly freebsd openbsd netbsd solaris
+// +build aix gnu linux darwin dragonfly freebsd openbsd netbsd solaris
package tar
Index: gcc-snapshot-20181004/src/libgo/go/crypto/rand/eagain.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/crypto/rand/eagain.go
+++ gcc-snapshot-20181004/src/libgo/go/crypto/rand/eagain.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris
package rand
Index: gcc-snapshot-20181004/src/libgo/go/crypto/rand/rand_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/crypto/rand/rand_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/crypto/rand/rand_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd plan9 solaris
// Unix cryptographically secure pseudorandom number
// generator.
Index: gcc-snapshot-20181004/src/libgo/go/mime/type_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/mime/type_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/mime/type_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package mime
Index: gcc-snapshot-20181004/src/libgo/go/plugin/plugin_dlopen.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/plugin/plugin_dlopen.go
+++ gcc-snapshot-20181004/src/libgo/go/plugin/plugin_dlopen.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux,cgo darwin,cgo
+// +build linux,cgo darwin,cgo gnu,cgo
package plugin
Index: gcc-snapshot-20181004/src/libgo/go/syscall/dirent.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/dirent.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/dirent.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package syscall
Index: gcc-snapshot-20181004/src/libgo/runtime/env_posix.c
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/runtime/env_posix.c
+++ gcc-snapshot-20181004/src/libgo/runtime/env_posix.c
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
+// +build darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris windows
#include "runtime.h"
#include "array.h"
Index: gcc-snapshot-20181004/src/libgo/go/net/internal/socktest/sys_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/internal/socktest/sys_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/internal/socktest/sys_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package socktest
Index: gcc-snapshot-20181004/src/libgo/go/plugin/plugin_stubs.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/plugin/plugin_stubs.go
+++ gcc-snapshot-20181004/src/libgo/go/plugin/plugin_stubs.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !linux,!darwin !cgo
+// +build !gnu !linux,!darwin !cgo
package plugin
Index: gcc-snapshot-20181004/src/libgo/go/net/internal/socktest/sys_cloexec.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/internal/socktest/sys_cloexec.go
+++ gcc-snapshot-20181004/src/libgo/go/net/internal/socktest/sys_cloexec.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build dragonfly freebsd linux netbsd openbsd
+// +build dragonfly freebsd gnu linux netbsd openbsd
package socktest
Index: gcc-snapshot-20181004/src/libgo/go/os/user/cgo_lookup_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/user/cgo_lookup_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/os/user/cgo_lookup_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd !android,linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu !android,linux netbsd openbsd solaris
// +build cgo,!osusergo
package user
Index: gcc-snapshot-20181004/src/libgo/go/net/error_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/error_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/error_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/fd_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/fd_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/fd_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package poll
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/hook_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/hook_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/hook_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package poll
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/sock_cloexec.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/sock_cloexec.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/sock_cloexec.go
@@ -5,7 +5,7 @@
// This file implements sysSocket and accept for platforms that
// provide a fast path for setting SetNonblock and CloseOnExec.
-// +build dragonfly freebsd linux netbsd openbsd
+// +build dragonfly freebsd gnu linux netbsd openbsd
package poll
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/sockopt.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/sockopt.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/sockopt.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris windows
package poll
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/sockoptip.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/sockoptip.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/sockoptip.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris windows
package poll
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/sockopt_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/sockopt_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/sockopt_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package poll
Index: gcc-snapshot-20181004/src/libgo/go/archive/tar/stat_actime1.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/archive/tar/stat_actime1.go
+++ gcc-snapshot-20181004/src/libgo/go/archive/tar/stat_actime1.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix linux dragonfly openbsd solaris
+// +build aix gnu linux dragonfly openbsd solaris
package tar
Index: gcc-snapshot-20181004/src/libgo/go/golang_org/x/net/internal/nettest/helper_nobsd.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/golang_org/x/net/internal/nettest/helper_nobsd.go
+++ gcc-snapshot-20181004/src/libgo/go/golang_org/x/net/internal/nettest/helper_nobsd.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix linux solaris
+// +build aix gnu linux solaris
package nettest
Index: gcc-snapshot-20181004/src/libgo/go/golang_org/x/net/internal/nettest/helper_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/golang_org/x/net/internal/nettest/helper_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/golang_org/x/net/internal/nettest/helper_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris windows
package nettest
Index: gcc-snapshot-20181004/src/libgo/go/golang_org/x/net/internal/nettest/helper_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/golang_org/x/net/internal/nettest/helper_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/golang_org/x/net/internal/nettest/helper_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package nettest
Index: gcc-snapshot-20181004/src/libgo/go/net/sockoptip_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/sockoptip_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/sockoptip_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/os/signal/internal/pty/pty.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/signal/internal/pty/pty.go
+++ gcc-snapshot-20181004/src/libgo/go/os/signal/internal/pty/pty.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux,!android netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux,!android netbsd openbsd solaris
// Package pty is a simple pseudo-terminal package for Unix systems,
// implemented by calling C functions via cgo.
Index: gcc-snapshot-20181004/src/libgo/go/syscall/forkpipe2.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/forkpipe2.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/forkpipe2.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build freebsd netbsd openbsd
+// +build freebsd gnu netbsd openbsd
package syscall
Index: gcc-snapshot-20181004/src/libgo/go/internal/syscall/unix/nonblocking.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/syscall/unix/nonblocking.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/syscall/unix/nonblocking.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package unix
Index: gcc-snapshot-20181004/src/libgo/go/net/sockaddr_posix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/sockaddr_posix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/sockaddr_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris windows
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/error_unix.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/error_unix.go
+++ gcc-snapshot-20181004/src/libgo/go/net/error_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd js linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu js linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/main_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/main_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/net/main_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/os/exec/lp_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/exec/lp_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/os/exec/lp_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package exec
Index: gcc-snapshot-20181004/src/libgo/go/os/os_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/os_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/os/os_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package os_test
Index: gcc-snapshot-20181004/src/libgo/go/os/signal/signal_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/signal/signal_test.go
+++ gcc-snapshot-20181004/src/libgo/go/os/signal/signal_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package signal
Index: gcc-snapshot-20181004/src/libgo/go/runtime/crash_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/runtime/crash_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/runtime/crash_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package runtime_test
Index: gcc-snapshot-20181004/src/libgo/go/syscall/exec_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/exec_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/exec_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package syscall_test
Index: gcc-snapshot-20181004/src/libgo/go/runtime/runtime_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/runtime/runtime_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/runtime/runtime_unix_test.go
@@ -6,7 +6,7 @@
// We need a fast system call to provoke the race,
// and Close(-1) is nearly universally fast.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd plan9
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd plan9
package runtime_test
Index: gcc-snapshot-20181004/src/libgo/go/syscall/export_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/export_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/export_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package syscall
Index: gcc-snapshot-20181004/src/libgo/go/syscall/mmap_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/mmap_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/syscall/mmap_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd
package syscall_test
Index: gcc-snapshot-20181004/src/libgo/go/net/addrselect_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/addrselect_test.go
+++ gcc-snapshot-20181004/src/libgo/go/net/addrselect_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/cgo_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/cgo_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/net/cgo_unix_test.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// +build cgo,!netgo
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/conf_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/conf_test.go
+++ gcc-snapshot-20181004/src/libgo/go/net/conf_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/dnsconfig_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/dnsconfig_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/net/dnsconfig_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/nss_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/nss_test.go
+++ gcc-snapshot-20181004/src/libgo/go/net/nss_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/cmd/go/go_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/cmd/go/go_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/cmd/go/go_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package main_test
Index: gcc-snapshot-20181004/src/libgo/go/net/dial_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/dial_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/net/dial_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/main_cloexec_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/main_cloexec_test.go
+++ gcc-snapshot-20181004/src/libgo/go/net/main_cloexec_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build dragonfly freebsd linux netbsd openbsd
+// +build dragonfly freebsd gnu linux netbsd openbsd
package net
Index: gcc-snapshot-20181004/src/libgo/go/net/dnsclient_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/dnsclient_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/net/dnsclient_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/os/env_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/env_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/os/env_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package os_test
Index: gcc-snapshot-20181004/src/libgo/go/os/error_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/os/error_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/os/error_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu js,wasm linux nacl netbsd openbsd solaris
package os_test
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/export_posix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/export_posix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/export_posix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris windows
// Export guts for testing on posix.
// Since testing imports os and os imports internal/poll,
Index: gcc-snapshot-20181004/src/libgo/go/runtime/export_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/runtime/export_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/runtime/export_unix_test.go
@@ -1,8 +1,9 @@
+
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package runtime
Index: gcc-snapshot-20181004/src/libgo/go/internal/poll/fd_posix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/internal/poll/fd_posix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/internal/poll/fd_posix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd gnu linux nacl netbsd openbsd solaris windows
package poll_test
Index: gcc-snapshot-20181004/src/libgo/go/net/rawconn_unix_test.go
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/net/rawconn_unix_test.go
+++ gcc-snapshot-20181004/src/libgo/go/net/rawconn_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd gnu linux netbsd openbsd solaris
package net
Index: gcc-snapshot-20181004/src/libgo/go/syscall/errstr_gnu.go
===================================================================
--- /dev/null
+++ gcc-snapshot-20181004/src/libgo/go/syscall/errstr_gnu.go
@@ -0,0 +1,32 @@
+// errstr_gnu.go -- GNU/Hurd specific error strings.
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// We use this rather than errstr.go because on GNU/Linux sterror_r
+// returns a pointer to the error message, and may not use buf at all.
+// This file is derived from errstr_linux.go
+
+package syscall
+
+import "unsafe"
+
+//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
+//strerror_r(errnum _C_int, b *byte, len Size_t) *byte
+
+func Errstr(errnum int) string {
+ a := make([]byte, 128)
+ p := strerror_r(errnum, a)
+ b := (*[1000]byte)(unsafe.Pointer(p))
+ i := 0
+ for b[i] != 0 {
+ i++
+ }
+ // Lowercase first letter: Bad -> bad, but STREAM -> STREAM.
+ if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
+ c := b[0] + 'a' - 'A'
+ return string(c) + string(b[1:i])
+ }
+ return string(b[:i])
+}
Index: gcc-snapshot-20181004/src/libgo/go/syscall/libcall_gnu_386.go
===================================================================
--- /dev/null
+++ gcc-snapshot-20181004/src/libgo/go/syscall/libcall_gnu_386.go
@@ -0,0 +1,10 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// GNU/Hurd library calls 386 specific.
+
+package syscall
+
+//sys Ioperm(from int, num int, on int) (err error)
+//ioperm(from _C_long, num _C_long, on _C_int) _C_int
Index: gcc-snapshot-20181004/src/libgo/go/syscall/libcall_gnu.go
===================================================================
--- /dev/null
+++ gcc-snapshot-20181004/src/libgo/go/syscall/libcall_gnu.go
@@ -0,0 +1,175 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// GNU/Hurd library calls.
+// This file is derived from libcall_linux.go
+// Dummy function: raw_ptrace
+// Removed functions: {P,p}trace*, Reboot, Gettid, Splice, Tgkill, Unlinkat, Unmount, Unshare
+
+package syscall
+
+import "unsafe"
+
+//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
+//__go_openat(dirfd _C_int, path *byte, flags _C_int, mode Mode_t) _C_int
+
+//sys futimesat(dirfd int, path *byte, times *[2]Timeval) (err error)
+//futimesat(dirfd _C_int, path *byte, times *[2]Timeval) _C_int
+func Futimesat(dirfd int, path string, tv []Timeval) (err error) {
+ if len(tv) != 2 {
+ return EINVAL
+ }
+ return futimesat(dirfd, StringBytePtr(path), (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+}
+
+func Futimes(fd int, tv []Timeval) (err error) {
+ // Believe it or not, this is the best we can do on GNU/Linux
+ // (and is what glibc does).
+ return Utimes("/proc/self/fd/"+itoa(fd), tv)
+}
+
+//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
+//ptrace(request _C_int, pid Pid_t, addr *byte, data *byte) _C_long
+
+// Dummy function
+func raw_ptrace(request int, pid int, addr *byte, data *byte) Errno {
+ return ENOSYS
+}
+
+//sys accept4(fd int, sa *RawSockaddrAny, len *Socklen_t, flags int) (nfd int, err error)
+//accept4(fd _C_int, sa *RawSockaddrAny, len *Socklen_t, flags _C_int) _C_int
+
+func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len Socklen_t = SizeofSockaddrAny
+ nfd, err = accept4(fd, &rsa, &len, flags)
+ if err != nil {
+ return -1, nil, err
+ }
+ sa, err = anyToSockaddr(&rsa)
+ if err != nil {
+ Close(nfd)
+ return -1, nil, err
+ }
+ return nfd, sa, nil
+}
+
+///INCLUDE?
+///sys Acct(path string) (err error)
+///acct(path *byte) _C_int
+
+//sysnb Dup3(oldfd int, newfd int, flags int) (err error)
+//dup3(oldfd _C_int, newfd _C_int, flags _C_int) _C_int
+
+//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
+//faccessat(dirfd _C_int, pathname *byte, mode _C_int, flags _C_int) _C_int
+
+//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
+//fallocate(fd _C_int, mode _C_int, offset Offset_t, len Offset_t) _C_int
+
+//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
+//fchmodat(dirfd _C_int, pathname *byte, mode Mode_t, flags _C_int) _C_int
+
+//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
+//fchownat(dirfd _C_int, path *byte, owner Uid_t, group Gid_t, flags _C_int) _C_int
+
+//sys Flock(fd int, how int) (err error)
+//flock(fd _C_int, how _C_int) _C_int
+
+//sys Fstatfs(fd int, buf *Statfs_t) (err error)
+//fstatfs(fd _C_int, buf *Statfs_t) _C_int
+
+func Getdents(fd int, buf []byte) (n int, err error) {
+ var p *byte
+ if len(buf) > 0 {
+ p = &buf[0]
+ } else {
+ p = (*byte)(unsafe.Pointer(&_zero))
+ }
+ s := SYS_GETDENTS64
+ if s == 0 {
+ s = SYS_GETDENTS
+ }
+ r1, _, errno := Syscall(uintptr(s), uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(len(buf)))
+ n = int(r1)
+ if n < 0 {
+ err = errno
+ }
+ return
+}
+
+func ReadDirent(fd int, buf []byte) (n int, err error) {
+ return Getdents(fd, buf)
+}
+
+
+///INCLUDE??
+///sys Getxattr(path string, attr string, dest []byte) (sz int, err error)
+///getxattr(path *byte, attr *byte, buf *byte, count Size_t) Ssize_t
+
+///INCLUDE??
+///sys Listxattr(path string, dest []byte) (sz int, err error)
+///listxattr(path *byte, list *byte, size Size_t) Ssize_t
+
+//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
+//mkdirat(dirfd _C_int, path *byte, mode Mode_t) _C_int
+
+//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
+//mknodat(dirfd _C_int, path *byte, mode Mode_t, dev _dev_t) _C_int
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//pipe2(p *[2]_C_int, flags _C_int) _C_int
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+///INCLUDE??
+///sys Removexattr(path string, attr string) (err error)
+///removexattr(path *byte, name *byte) _C_int
+
+///INCLUDE??
+///sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
+///renameat(olddirfd _C_int, oldpath *byte, newdirfd _C_int, newpath *byte) _C_int
+
+//INCLUDE??
+///sys Setxattr(path string, attr string, data []byte, flags int) (err error)
+///setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
+
+//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
+//sync_file_range(fd _C_int, off Offset_t, n Offset_t, flags _C_uint) _C_int
+
+//INCLUDE??
+///sysnb Sysinfo(info *Sysinfo_t) (err error)
+///sysinfo(info *Sysinfo_t) _C_int
+
+//func Unlinkat(dirfd int, path string) (err error) {
+// return unlinkat(dirfd, path, 0)
+//}
+
+///INCLUDE??
+///sys Ustat(dev int, ubuf *Ustat_t) (err error)
+///ustat(dev _dev_t, ubuf *Ustat_t) _C_int
+
+//sys sendfile(outfd int, infd int, offset *Offset_t, count int) (written int, err error)
+//sendfile64(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
+func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
+ var soff Offset_t
+ var psoff *Offset_t
+ if offset != nil {
+ soff = Offset_t(*offset)
+ psoff = &soff
+ }
+ written, err = sendfile(outfd, infd, psoff, count)
+ if offset != nil {
+ *offset = int64(soff)
+ }
+ return
+}
Index: gcc-snapshot-20181004/src/libgo/go/syscall/libcall_posix_gnu.go
===================================================================
--- /dev/null
+++ gcc-snapshot-20181004/src/libgo/go/syscall/libcall_posix_gnu.go
@@ -0,0 +1,400 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// POSIX library calls.
+// This file is compiled as ordinary Go code,
+// but it is also input to mksyscall,
+// which parses the //sys lines and generates library call stubs.
+// Note that sometimes we use a lowercase //sys name and
+// wrap it in our own nicer implementation.
+// Removed the mount call for GNU/Hurd, it exists but use translators.
+// Functionality is not the same as descibed in Linux <sys/mount.h>
+// Removed the madvise call for GNU/Hurd, not yet implemented.
+// This file is derived from libchall_posix.go
+
+// +build gnu
+
+package syscall
+
+import "unsafe"
+
+/*
+ * Wrapped
+ */
+
+//sysnb pipe(p *[2]_C_int) (err error)
+//pipe(p *[2]_C_int) _C_int
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe(&pp)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sys utimes(path string, times *[2]Timeval) (err error)
+//utimes(path *byte, times *[2]Timeval) _C_int
+func Utimes(path string, tv []Timeval) (err error) {
+ if len(tv) != 2 {
+ return EINVAL
+ }
+ return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+}
+
+//sys getcwd(buf *byte, size Size_t) (err error)
+//getcwd(buf *byte, size Size_t) *byte
+
+const ImplementsGetwd = true
+
+func Getwd() (ret string, err error) {
+ for len := Size_t(4096); ; len *= 2 {
+ b := make([]byte, len)
+ err := getcwd(&b[0], len)
+ if err == nil {
+ i := 0
+ for b[i] != 0 {
+ i++
+ }
+ return string(b[0:i]), nil
+ }
+ if err != ERANGE {
+ return "", err
+ }
+ }
+}
+
+func Getcwd(buf []byte) (n int, err error) {
+ err = getcwd(&buf[0], Size_t(len(buf)))
+ if err == nil {
+ i := 0
+ for buf[i] != 0 {
+ i++
+ }
+ n = i + 1
+ }
+ return
+}
+
+//sysnb getgroups(size int, list *Gid_t) (nn int, err error)
+//getgroups(size _C_int, list *Gid_t) _C_int
+
+func Getgroups() (gids []int, err error) {
+ n, err := getgroups(0, nil)
+ if err != nil {
+ return nil, err
+ }
+ if n == 0 {
+ return nil, nil
+ }
+
+ // Sanity check group count. Max is 1<<16 on GNU/Linux.
+ if n < 0 || n > 1<<20 {
+ return nil, EINVAL
+ }
+
+ a := make([]Gid_t, n)
+ n, err = getgroups(n, &a[0])
+ if err != nil {
+ return nil, err
+ }
+ gids = make([]int, n)
+ for i, v := range a[0:n] {
+ gids[i] = int(v)
+ }
+ return
+}
+
+//sysnb setgroups(n int, list *Gid_t) (err error)
+//setgroups(n Size_t, list *Gid_t) _C_int
+
+func Setgroups(gids []int) (err error) {
+ if len(gids) == 0 {
+ return setgroups(0, nil)
+ }
+
+ a := make([]Gid_t, len(gids))
+ for i, v := range gids {
+ a[i] = Gid_t(v)
+ }
+ return setgroups(len(a), &a[0])
+}
+
+type WaitStatus uint32
+
+// The WaitStatus methods are implemented in C, to pick up the macros
+// #defines in <sys/wait.h>.
+
+func (w WaitStatus) Exited() bool
+func (w WaitStatus) Signaled() bool
+func (w WaitStatus) Stopped() bool
+func (w WaitStatus) Continued() bool
+func (w WaitStatus) CoreDump() bool
+func (w WaitStatus) ExitStatus() int
+func (w WaitStatus) Signal() Signal
+func (w WaitStatus) StopSignal() Signal
+func (w WaitStatus) TrapCause() int
+
+//sys Mkfifo(path string, mode uint32) (err error)
+//mkfifo(path *byte, mode Mode_t) _C_int
+
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
+//select(nfd _C_int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) _C_int
+
+const nfdbits = int(unsafe.Sizeof(fds_bits_type(0)) * 8)
+
+type FdSet struct {
+ Bits [(FD_SETSIZE + nfdbits - 1) / nfdbits]fds_bits_type
+}
+
+func FDSet(fd int, set *FdSet) {
+ set.Bits[fd/nfdbits] |= (1 << (uint)(fd%nfdbits))
+}
+
+func FDClr(fd int, set *FdSet) {
+ set.Bits[fd/nfdbits] &^= (1 << (uint)(fd%nfdbits))
+}
+
+func FDIsSet(fd int, set *FdSet) bool {
+ if set.Bits[fd/nfdbits]&(1<<(uint)(fd%nfdbits)) != 0 {
+ return true
+ } else {
+ return false
+ }
+}
+
+func FDZero(set *FdSet) {
+ for i := range set.Bits {
+ set.Bits[i] = 0
+ }
+}
+
+//sys Access(path string, mode uint32) (err error)
+//access(path *byte, mode _C_int) _C_int
+
+//sys Chdir(path string) (err error)
+//chdir(path *byte) _C_int
+
+//sys Chmod(path string, mode uint32) (err error)
+//chmod(path *byte, mode Mode_t) _C_int
+
+//sys Chown(path string, uid int, gid int) (err error)
+//chown(path *byte, uid Uid_t, gid Gid_t) _C_int
+
+//sys Chroot(path string) (err error)
+//chroot(path *byte) _C_int
+
+//sys Close(fd int) (err error)
+//close(fd _C_int) _C_int
+
+//sys Creat(path string, mode uint32) (fd int, err error)
+//creat(path *byte, mode Mode_t) _C_int
+
+//sysnb Dup(oldfd int) (fd int, err error)
+//dup(oldfd _C_int) _C_int
+
+//sysnb Dup2(oldfd int, newfd int) (err error)
+//dup2(oldfd _C_int, newfd _C_int) _C_int
+
+//sys Fchdir(fd int) (err error)
+//fchdir(fd _C_int) _C_int
+
+//sys Fchmod(fd int, mode uint32) (err error)
+//fchmod(fd _C_int, mode Mode_t) _C_int
+
+//sys Fchown(fd int, uid int, gid int) (err error)
+//fchown(fd _C_int, uid Uid_t, gid Gid_t) _C_int
+
+//sys fcntl(fd int, cmd int, arg int) (val int, err error)
+//__go_fcntl(fd _C_int, cmd _C_int, arg _C_int) _C_int
+
+//sys FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error)
+//__go_fcntl_flock(fd _C_int, cmd _C_int, arg *Flock_t) _C_int
+
+//sys Fdatasync(fd int) (err error)
+//fdatasync(fd _C_int) _C_int
+
+//sys Fsync(fd int) (err error)
+//fsync(fd _C_int) _C_int
+
+//sysnb Getegid() (egid int)
+//getegid() Gid_t
+
+//sysnb Geteuid() (euid int)
+//geteuid() Uid_t
+
+//sysnb Getgid() (gid int)
+//getgid() Gid_t
+
+//sysnb Getpgid(pid int) (pgid int, err error)
+//getpgid(pid Pid_t) Pid_t
+
+//sysnb Getpgrp() (pid int)
+//getpgrp() Pid_t
+
+//sysnb Getpid() (pid int)
+//getpid() Pid_t
+
+//sysnb Getppid() (ppid int)
+//getppid() Pid_t
+
+//sys Getpriority(which int, who int) (prio int, err error)
+//getpriority(which _C_int, who _C_int) _C_int
+
+//sysnb Getrusage(who int, rusage *Rusage) (err error)
+//getrusage(who _C_int, rusage *Rusage) _C_int
+
+//sysnb gettimeofday(tv *Timeval, tz *byte) (err error)
+//gettimeofday(tv *Timeval, tz *byte) _C_int
+func Gettimeofday(tv *Timeval) (err error) {
+ return gettimeofday(tv, nil)
+}
+
+//sysnb Getuid() (uid int)
+//getuid() Uid_t
+
+//sysnb Kill(pid int, sig Signal) (err error)
+//kill(pid Pid_t, sig _C_int) _C_int
+
+//sys Lchown(path string, uid int, gid int) (err error)
+//lchown(path *byte, uid Uid_t, gid Gid_t) _C_int
+
+//sys Link(oldpath string, newpath string) (err error)
+//link(oldpath *byte, newpath *byte) _C_int
+
+//sys Mkdir(path string, mode uint32) (err error)
+//mkdir(path *byte, mode Mode_t) _C_int
+
+//sys Mknod(path string, mode uint32, dev int) (err error)
+//mknod(path *byte, mode Mode_t, dev _dev_t) _C_int
+
+//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
+//nanosleep(time *Timespec, leftover *Timespec) _C_int
+
+//sys Pause() (err error)
+//pause() _C_int
+
+//sys read(fd int, p []byte) (n int, err error)
+//read(fd _C_int, buf *byte, count Size_t) Ssize_t
+
+//sys readlen(fd int, p *byte, np int) (n int, err error)
+//read(fd _C_int, buf *byte, count Size_t) Ssize_t
+
+//sys Readlink(path string, buf []byte) (n int, err error)
+//readlink(path *byte, buf *byte, bufsiz Size_t) Ssize_t
+
+//sys Rename(oldpath string, newpath string) (err error)
+//rename(oldpath *byte, newpath *byte) _C_int
+
+//sys Rmdir(path string) (err error)
+//rmdir(path *byte) _C_int
+
+//sys Setdomainname(p []byte) (err error)
+//setdomainname(name *byte, len Size_t) _C_int
+
+//sys Sethostname(p []byte) (err error)
+//sethostname(name *byte, len Size_t) _C_int
+
+//sysnb Setgid(gid int) (err error)
+//setgid(gid Gid_t) _C_int
+
+//sysnb Setregid(rgid int, egid int) (err error)
+//setregid(rgid Gid_t, egid Gid_t) _C_int
+
+//sysnb Setpgid(pid int, pgid int) (err error)
+//setpgid(pid Pid_t, pgid Pid_t) _C_int
+
+//sys Setpriority(which int, who int, prio int) (err error)
+//setpriority(which _C_int, who _C_int, prio _C_int) _C_int
+
+//sysnb Setreuid(ruid int, euid int) (err error)
+//setreuid(ruid Uid_t, euid Uid_t) _C_int
+
+//sysnb Setsid() (pid int, err error)
+//setsid() Pid_t
+
+//sysnb settimeofday(tv *Timeval, tz *byte) (err error)
+//settimeofday(tv *Timeval, tz *byte) _C_int
+
+func Settimeofday(tv *Timeval) (err error) {
+ return settimeofday(tv, nil)
+}
+
+//sysnb Setuid(uid int) (err error)
+//setuid(uid Uid_t) _C_int
+
+//sys Symlink(oldpath string, newpath string) (err error)
+//symlink(oldpath *byte, newpath *byte) _C_int
+
+//sys Sync()
+//sync()
+
+//sysnb Time(t *Time_t) (tt Time_t, err error)
+//time(t *Time_t) Time_t
+
+//sysnb Times(tms *Tms) (ticks uintptr, err error)
+//times(tms *Tms) _clock_t
+
+//sysnb Umask(mask int) (oldmask int)
+//umask(mask Mode_t) Mode_t
+
+//sys Unlink(path string) (err error)
+//unlink(path *byte) _C_int
+
+//sys Utime(path string, buf *Utimbuf) (err error)
+//utime(path *byte, buf *Utimbuf) _C_int
+
+//sys write(fd int, p []byte) (n int, err error)
+//write(fd _C_int, buf *byte, count Size_t) Ssize_t
+
+//sys writelen(fd int, p *byte, np int) (n int, err error)
+//write(fd _C_int, buf *byte, count Size_t) Ssize_t
+
+//sys munmap(addr uintptr, length uintptr) (err error)
+//munmap(addr *byte, length Size_t) _C_int
+
+//sys Mprotect(b []byte, prot int) (err error)
+//mprotect(addr *byte, len Size_t, prot _C_int) _C_int
+
+//sys Mlock(b []byte) (err error)
+//mlock(addr *byte, len Size_t) _C_int
+
+//sys Munlock(b []byte) (err error)
+//munlock(addr *byte, len Size_t) _C_int
+
+//sys Mlockall(flags int) (err error)
+//mlockall(flags _C_int) _C_int
+
+//sys Munlockall() (err error)
+//munlockall() _C_int
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: Timespec_sec_t(sec), Nsec: Timespec_nsec_t(nsec)}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: Timeval_sec_t(sec), Usec: Timeval_usec_t(usec)}
+}
+
+//sysnb Tcgetattr(fd int, p *Termios) (err error)
+//tcgetattr(fd _C_int, p *Termios) _C_int
+
+//sys Tcsetattr(fd int, actions int, p *Termios) (err error)
+//tcsetattr(fd _C_int, actions _C_int, p *Termios) _C_int
+
+//sys sysconf(name int) (ret int64, err error)
+//sysconf(name _C_int) _C_long
+
+func Sysconf(name int) (ret int64, err error) {
+ // If an option is not available, sysconf returns -1 without
+ // changing errno. Detect this case and return err == nil.
+ SetErrno(0)
+ ret, err = sysconf(name)
+ if err == Errno(0) {
+ err = nil
+ }
+ return ret, err
+}
Index: gcc-snapshot-20181004/src/libgo/go/syscall/socket_gnu.go
===================================================================
--- /dev/null
+++ gcc-snapshot-20181004/src/libgo/go/syscall/socket_gnu.go
@@ -0,0 +1,91 @@
+// socket_gnu.go -- Socket handling specific to GNU/Hurd.
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+// This file is derived from syscall_bsd.go
+
+// +build gnu
+
+package syscall
+
+import "unsafe"
+
+const SizeofSockaddrInet4 = 16
+const SizeofSockaddrInet6 = 28
+const SizeofSockaddrUnix = 110
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+func (sa *RawSockaddrInet4) setLen() Socklen_t {
+ sa.Len = SizeofSockaddrInet4
+ return SizeofSockaddrInet4
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+func (sa *RawSockaddrInet6) setLen() Socklen_t {
+ sa.Len = SizeofSockaddrInet6
+ return SizeofSockaddrInet6
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [108]int8
+}
+
+func (sa *RawSockaddrUnix) setLen(n int) {
+ sa.Len = uint8(3 + n) // 2 for Family, Len; 1 for NUL.
+}
+
+func (sa *RawSockaddrUnix) getLen() (int, error) {
+ if sa.Len < 3 || sa.Len > SizeofSockaddrUnix {
+ return 0, EINVAL
+ }
+ // Assume path ends at NUL.
+ n := 0
+ for n < len(sa.Path) && sa.Path[n] != 0 {
+ n++
+ }
+ return n, nil
+}
+
+func (sa *RawSockaddrUnix) adjustAbstract(sl Socklen_t) Socklen_t {
+ return sl
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]int8
+}
+
+// BindToDevice binds the socket associated with fd to device.
+func BindToDevice(fd int, device string) (err error) {
+ return ENOSYS
+}
+
+func anyToSockaddrOS(rsa *RawSockaddrAny) (Sockaddr, error) {
+ return nil, EAFNOSUPPORT
+}
+
+func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
+ var value IPv6MTUInfo
+ vallen := Socklen_t(SizeofIPv6MTUInfo)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, err
+}
Index: gcc-snapshot-20181004/src/libgo/go/syscall/syscall_gnu.go
===================================================================
--- /dev/null
+++ gcc-snapshot-20181004/src/libgo/go/syscall/syscall_gnu.go
@@ -0,0 +1,24 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+// This file is identical to syscall_linux.go
+
+package syscall
+
+import "unsafe"
+
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
+}
+
+func direntReclen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ reclen, ok := direntReclen(buf)
+ if !ok {
+ return 0, false
+ }
+ return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
+}
Index: gcc-snapshot-20181004/src/libgo/go/syscall/wait.c
===================================================================
--- gcc-snapshot-20181004.orig/src/libgo/go/syscall/wait.c
+++ gcc-snapshot-20181004/src/libgo/go/syscall/wait.c
@@ -8,6 +8,9 @@
OS-independent. */
#include <stdint.h>
+#ifndef WCONTINUED
+#define WCONTINUED 0
+#endif
#include <sys/wait.h>
#include "runtime.h"