libgo patch committed: Fix Solaris build
diff mbox series

Message ID CAOyqgcXDW_0t5imDbQK4w0qNAMBqaWmLyhJaRo4sDUSSUh4jCw@mail.gmail.com
State New
Headers show
Series
  • libgo patch committed: Fix Solaris build
Related show

Commit Message

Ian Lance Taylor Jan. 22, 2020, 11:10 p.m. UTC
This libgo patch fixes the build on Solaris after the 1.14beta
upgrade.  It adds a runtime.osinit function, and drops a duplicate
runtime.getncpu function.  Bootstrapped and tested on
x86_64-pc-solaris2.11.  Committed to mainline.

Ian
9e16359ce8db7180264fd5f047ca137ead8356dd

Patch
diff mbox series

diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 544c6e66e0d..a778a8540a5 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@ 
-9ae2223f91c4ca642885b80d88eb0baf756acf94
+1d64b76f559c0969ee2a6eb8e0ac9d268713880c
 
 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/runtime/os3_solaris.go b/libgo/go/runtime/os3_solaris.go
index 001feed3e06..b2fa1d35f0e 100644
--- 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) {