On Wed, Oct 28, 2020 at 2:53 AM Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > > > This libgo patch by Nikhil Benesch imports additional code from > > upstream for handing system calls on BSD systems. This makes the > > syscall package on NetBSD complete enough to compile the standard > > library. Boostrapped and ran Go testsuite on x86_64-pc-linux-gnu. > > Committed to mainline. > > this patch broke Solaris bootstrap: > > /vol/gcc/src/hg/master/local/libgo/go/syscall/libcall_solaris_largefile.go:12:1: > error: redefinition of 'ReadDirent' > 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { > | ^ > /vol/gcc/src/hg/master/local/libgo/go/syscall/libcall_bsd.go:27:1: note: > previous definition of 'ReadDirent' was here > 27 | func ReadDirent(fd int, buf []byte) (n int, err error) { > | ^ > libcalls.go:2320:1: error: redefinition of 'raw_ptrace' > 2320 | func raw_ptrace(request int, pid int, addr uintptr, data uintptr) > (err Errno) { > | ^ > libcalls.go:383:1: note: previous definition of 'raw_ptrace' was here > 383 | func raw_ptrace(request int, pid int, addr uintptr, data uintptr) > (err Errno) { > | ^ > /vol/gcc/src/hg/master/local/libgo/go/syscall/libcall_bsd.go:33:16: error: > reference to undefined name 'Getdirentries' > 33 | return Getdirentries(fd, buf, base) > | ^ > /vol/gcc/src/hg/master/local/libgo/go/syscall/libcall_bsd.go:33:9: error: not > enough arguments to return > 33 | return Getdirentries(fd, buf, base) > | ^ > /vol/gcc/src/hg/master/local/libgo/go/syscall/libcall_bsd.go:69:21: error: > reference to undefined name 'nametomib' > 69 | mib, err := nametomib(name) > | ^ > /vol/gcc/src/hg/master/local/libgo/go/syscall/libcall_bsd.go:98:21: error: > reference to undefined name 'nametomib' > 98 | mib, err := nametomib(name) > | ^ > libcalls.go:2321:85: error: argument 4 has incompatible type > 2321 | _r := c_ptrace(_C_int(request), Pid_t(pid), > (*byte)(unsafe.Pointer(addr)), (*byte)(unsafe.Pointer(data))) > | > ^ > make[4]: *** [Makefile:2912: syscall.lo] Error 1 > > Of the functions used there, ptrace (32-bit only) is already handled and > sysctl, paccept and flock don't exist on Solaris. Only pipe2 does > exist, but it's only in Solaris 11.4 and Illumos, not Solaris 11.3, so > better left off for now. > > Fixed by removing the solaris build tag.
Thanks, yes, using the solaris build tag there was a clear mistake. Committed this patch. Ian
757c0310a69055e89e6abdf40acfd3de07ab927f diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 1f65809fc81..45aafaab5c5 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -be0d2cc2df9f98d967c242594838f86362dae2e7 +88a25df9133e9a1fc28a00b08ee30d7e5ab2cdbb The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/go/syscall/libcall_bsd.go b/libgo/go/syscall/libcall_bsd.go index f13d3bcbe16..1dd957c4531 100644 --- a/libgo/go/syscall/libcall_bsd.go +++ b/libgo/go/syscall/libcall_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 darwin dragonfly freebsd netbsd openbsd solaris +// +build darwin dragonfly freebsd netbsd openbsd // BSD library calls.