cmd/dist, cmd/link, runtime: fix stack size when cross-compiling aix/ppc64

This commit allows to cross-compiling aix/ppc64. The nosplit limit must
twice as large as on others platforms because of AIX syscalls.
The stack limit, especially stackGuardMultiplier, was set by cmd/dist
during the bootstrap and doesn't depend on GOOS/GOARCH target.

Fixes #29572

Change-Id: Id51e38885e1978d981aa9e14972eaec17294322e
Reviewed-on: https://go-review.googlesource.com/c/157117
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Clément Chigot 2019-01-09 14:05:17 +01:00 committed by Ian Lance Taylor
parent a5318bf5d6
commit 20ac64a2dd
10 changed files with 36 additions and 24 deletions

View file

@ -2007,7 +2007,7 @@ func stkcheck(ctxt *Link, up *chain, depth int) int {
if s.FuncInfo != nil {
locals = s.FuncInfo.Locals
}
limit = int(objabi.StackLimit+locals) + int(ctxt.FixedFrameSize())
limit = objabi.StackLimit + int(locals) + int(ctxt.FixedFrameSize())
}
// Walk through sp adjustments in function, consuming relocs.