mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
all: add new GOOS=illumos, split out of GOOS=solaris
Like GOOS=android which implies the "linux" build tag, GOOS=illumos implies the "solaris" build tag. This lets the existing ecosystem of packages still work on illumos, but still permits packages to start differentiating between solaris and illumos. Fixes #20603 Change-Id: I8f4eabf1a66060538dca15d7658c1fbc6c826622 Reviewed-on: https://go-review.googlesource.com/c/go/+/174457 Run-TryBot: Benny Siegert <bsiegert@gmail.com> Reviewed-by: Benny Siegert <bsiegert@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
0c9e0c257b
commit
f686a2890b
57 changed files with 148 additions and 66 deletions
|
|
@ -486,7 +486,7 @@ func cpuinit() {
|
|||
var env string
|
||||
|
||||
switch GOOS {
|
||||
case "aix", "darwin", "dragonfly", "freebsd", "netbsd", "openbsd", "solaris", "linux":
|
||||
case "aix", "darwin", "dragonfly", "freebsd", "netbsd", "openbsd", "illumos", "solaris", "linux":
|
||||
cpu.DebugOptions = true
|
||||
|
||||
// Similar to goenv_unix but extracts the environment value for
|
||||
|
|
@ -638,7 +638,7 @@ func mcommoninit(mp *m) {
|
|||
unlock(&sched.lock)
|
||||
|
||||
// Allocate memory to hold a cgo traceback if the cgo call crashes.
|
||||
if iscgo || GOOS == "solaris" || GOOS == "windows" {
|
||||
if iscgo || GOOS == "solaris" || GOOS == "illumos" || GOOS == "windows" {
|
||||
mp.cgoCallers = new(cgoCallers)
|
||||
}
|
||||
}
|
||||
|
|
@ -1167,8 +1167,8 @@ func mstart() {
|
|||
mstart1()
|
||||
|
||||
// Exit this thread.
|
||||
if GOOS == "windows" || GOOS == "solaris" || GOOS == "plan9" || GOOS == "darwin" || GOOS == "aix" {
|
||||
// Window, Solaris, Darwin, AIX and Plan 9 always system-allocate
|
||||
if GOOS == "windows" || GOOS == "solaris" || GOOS == "illumos" || GOOS == "plan9" || GOOS == "darwin" || GOOS == "aix" {
|
||||
// Windows, Solaris, illumos, Darwin, AIX and Plan 9 always system-allocate
|
||||
// the stack, but put it in _g_.stack before mstart,
|
||||
// so the logic above hasn't set osStack yet.
|
||||
osStack = true
|
||||
|
|
@ -1488,9 +1488,9 @@ func allocm(_p_ *p, fn func()) *m {
|
|||
mp.mstartfn = fn
|
||||
mcommoninit(mp)
|
||||
|
||||
// In case of cgo or Solaris or Darwin, pthread_create will make us a stack.
|
||||
// In case of cgo or Solaris or illumos or Darwin, pthread_create will make us a stack.
|
||||
// Windows and Plan 9 will layout sched stack on OS stack.
|
||||
if iscgo || GOOS == "solaris" || GOOS == "windows" || GOOS == "plan9" || GOOS == "darwin" {
|
||||
if iscgo || GOOS == "solaris" || GOOS == "illumos" || GOOS == "windows" || GOOS == "plan9" || GOOS == "darwin" {
|
||||
mp.g0 = malg(-1)
|
||||
} else {
|
||||
mp.g0 = malg(8192 * sys.StackGuardMultiplier)
|
||||
|
|
@ -3747,7 +3747,7 @@ func sigprof(pc, sp, lr uintptr, gp *g, mp *m) {
|
|||
// Normal traceback is impossible or has failed.
|
||||
// See if it falls into several common cases.
|
||||
n = 0
|
||||
if (GOOS == "windows" || GOOS == "solaris" || GOOS == "darwin" || GOOS == "aix") && mp.libcallg != 0 && mp.libcallpc != 0 && mp.libcallsp != 0 {
|
||||
if (GOOS == "windows" || GOOS == "solaris" || GOOS == "illumos" || GOOS == "darwin" || GOOS == "aix") && mp.libcallg != 0 && mp.libcallpc != 0 && mp.libcallsp != 0 {
|
||||
// Libcall, i.e. runtime syscall on windows.
|
||||
// Collect Go stack that leads to the call.
|
||||
n = gentraceback(mp.libcallpc, mp.libcallsp, 0, mp.libcallg.ptr(), 0, &stk[0], len(stk), nil, nil, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue