Hi Ian, > I've committed a patch to update libgo to Go 1.14beta1. As usual with > these updates the patch is far too large to include in this e-mail > message. I've included the diffs for gccgo-specific files. > Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to > mainline.
the patch broke Solaris bootstrap: /vol/gcc/src/hg/master/local/libgo/go/runtime/os_only_solaris.go:11:1: error: redefinition of 'getncpu' 11 | func getncpu() int32 { | ^ /vol/gcc/src/hg/master/local/libgo/go/runtime/os3_solaris.go:20:1: note: previous definition of 'getncpu' was here 20 | func getncpu() int32 { | ^ There are 3 definitions in the Solaris/Illumos space: * os_only_solaris.go is guarded by !illumos * os3_solaris.go has no explicit guard * illumos hat its own one in os_illumos.go so the os3_solaris.go one can go. /vol/gcc/src/hg/master/local/libgo/go/runtime/stubs2.go:40:3: error: osinit is not defined 40 | //go:linkname osinit runtime.osinit | ^ Upstream has a definition in os3_solaris.go. The following patch allows compilation to succeed. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University
diff --git a/libgo/go/runtime/os3_solaris.go b/libgo/go/runtime/os3_solaris.go --- a/libgo/go/runtime/os3_solaris.go +++ b/libgo/go/runtime/os3_solaris.go @@ -17,12 +17,11 @@ func getPageSize() int32 //extern sysconf func sysconf(int32) _C_long -func getncpu() int32 { - n := int32(sysconf(__SC_NPROCESSORS_ONLN)) - if n < 1 { - return 1 +func osinit() { + ncpu = getncpu() + if physPageSize == 0 { + physPageSize = uintptr(getPageSize()) } - return n } func sysargs(argc int32, argv **byte) {