Commit a3a69aff authored by Clément Chigot's avatar Clément Chigot Committed by Ian Lance Taylor

cmd/dist: add AIX operating system.

This commit adds AIX operating system to cmd/dist package for ppc64
architecture.

The stack guard is increased because of syscalls made inside the runtime
which need a larger stack.

Disable cmd/vet/all tests until aix/ppc64 is fully available.

Change-Id: I7e3caf86724249ae564a152d90c1cbd4de288814
Reviewed-on: https://go-review.googlesource.com/c/138715
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 8919fe9e
...@@ -87,6 +87,7 @@ var okgoos = []string{ ...@@ -87,6 +87,7 @@ var okgoos = []string{
"openbsd", "openbsd",
"plan9", "plan9",
"windows", "windows",
"aix",
} }
// find reports the first index of p in l[0:n], or else -1. // find reports the first index of p in l[0:n], or else -1.
...@@ -1388,6 +1389,7 @@ func checkNotStale(goBinary string, targets ...string) { ...@@ -1388,6 +1389,7 @@ func checkNotStale(goBinary string, targets ...string) {
// single point of truth for supported platforms. This list is used // single point of truth for supported platforms. This list is used
// by 'go tool dist list'. // by 'go tool dist list'.
var cgoEnabled = map[string]bool{ var cgoEnabled = map[string]bool{
"aix/ppc64": false,
"darwin/386": true, "darwin/386": true,
"darwin/amd64": true, "darwin/amd64": true,
"darwin/arm": true, "darwin/arm": true,
......
...@@ -87,6 +87,10 @@ func mkzbootstrap(file string) { ...@@ -87,6 +87,10 @@ func mkzbootstrap(file string) {
// stack guard size. Larger multipliers are used for non-optimized // stack guard size. Larger multipliers are used for non-optimized
// builds that have larger stack frames. // builds that have larger stack frames.
func stackGuardMultiplier() int { func stackGuardMultiplier() int {
// On AIX, a larger stack is needed for syscalls
if goos == "aix" {
return 2
}
for _, s := range strings.Split(os.Getenv("GO_GCFLAGS"), " ") { for _, s := range strings.Split(os.Getenv("GO_GCFLAGS"), " ") {
if s == "-N" { if s == "-N" {
return 2 return 2
......
...@@ -81,6 +81,9 @@ func main() { ...@@ -81,6 +81,9 @@ func main() {
} }
case "windows": case "windows":
exe = ".exe" exe = ".exe"
case "aix":
// uname -m doesn't work under AIX
gohostarch = "ppc64"
} }
sysinit() sysinit()
......
...@@ -48,10 +48,13 @@ const ( ...@@ -48,10 +48,13 @@ const (
Hplan9 Hplan9
Hsolaris Hsolaris
Hwindows Hwindows
Haix
) )
func (h *HeadType) Set(s string) error { func (h *HeadType) Set(s string) error {
switch s { switch s {
case "aix":
*h = Haix
case "darwin": case "darwin":
*h = Hdarwin *h = Hdarwin
case "dragonfly": case "dragonfly":
...@@ -82,6 +85,8 @@ func (h *HeadType) Set(s string) error { ...@@ -82,6 +85,8 @@ func (h *HeadType) Set(s string) error {
func (h *HeadType) String() string { func (h *HeadType) String() string {
switch *h { switch *h {
case Haix:
return "aix"
case Hdarwin: case Hdarwin:
return "darwin" return "darwin"
case Hdragonfly: case Hdragonfly:
......
...@@ -204,6 +204,12 @@ func (p platform) vet() { ...@@ -204,6 +204,12 @@ func (p platform) vet() {
return return
} }
if p.os == "aix" && p.arch == "ppc64" {
// TODO(aix): enable as soon as the aix/ppc64 port has fully landed
fmt.Println("skipping aix/ppc64")
return
}
var buf bytes.Buffer var buf bytes.Buffer
fmt.Fprintf(&buf, "go run main.go -p %s\n", p) fmt.Fprintf(&buf, "go run main.go -p %s\n", p)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment