]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
runtime: for Solaris, add osinit, and drop duplicate getncpu
authorIan Lance Taylor <iant@golang.org>
Wed, 22 Jan 2020 19:06:03 +0000 (11:06 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 22 Jan 2020 23:08:25 +0000 (15:08 -0800)
Fixes a build breakage introduced in the 1.14beta1 upgrade.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215857

gcc/go/gofrontend/MERGE
libgo/go/runtime/os3_solaris.go

index 544c6e66e0dd39e92634c6f5e4432918212cd590..a778a8540a553bbcd4632ebecc728b8886ff7461 100644 (file)
@@ -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.
index 001feed3e06cd09cdfc7e0fc05b86c11417606ba..b2fa1d35f0e3cc1856695d52907566fce05efd9d 100644 (file)
@@ -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) {