diff options
author | Clément Chigot <clement.chigot@atos.net> | 2020-08-26 10:19:23 +0200 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-08-26 16:29:03 -0700 |
commit | 0c223b02b6e4dfbdeac9f1dcd64ee9d1cd04a5a2 (patch) | |
tree | b1f116b9ba63e47e7de49e697dab7f82187bfc90 /libgo/go | |
parent | 6b0b6a3868f34b1462744cfa003c2c6ac18ef28e (diff) | |
download | gcc-0c223b02b6e4dfbdeac9f1dcd64ee9d1cd04a5a2.zip gcc-0c223b02b6e4dfbdeac9f1dcd64ee9d1cd04a5a2.tar.gz gcc-0c223b02b6e4dfbdeac9f1dcd64ee9d1cd04a5a2.tar.bz2 |
cmd: add -maix32 to gcc calls for aix/ppc
As gcc might now be compiled in 64bit, -maix32 must always be added
to ensure that created objects will be 32bit.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/250778
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/cmd/cgo/gcc.go | 5 | ||||
-rw-r--r-- | libgo/go/cmd/go/internal/work/exec.go | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libgo/go/cmd/cgo/gcc.go b/libgo/go/cmd/cgo/gcc.go index 249cfe4..f774cbb 100644 --- a/libgo/go/cmd/cgo/gcc.go +++ b/libgo/go/cmd/cgo/gcc.go @@ -1573,6 +1573,10 @@ func (p *Package) gccMachine() []string { if goos == "aix" { return []string{"-maix64"} } + case "ppc": + if goos == "aix" { + return []string{"-maix32"} + } } return nil } @@ -1615,7 +1619,6 @@ func (p *Package) gccCmd() []string { c = append(c, p.GccOptions...) c = append(c, p.gccMachine()...) if goos == "aix" { - c = append(c, "-maix64") c = append(c, "-mcmodel=large") } c = append(c, "-") //read input from standard input diff --git a/libgo/go/cmd/go/internal/work/exec.go b/libgo/go/cmd/go/internal/work/exec.go index d610410..65f3011 100644 --- a/libgo/go/cmd/go/internal/work/exec.go +++ b/libgo/go/cmd/go/internal/work/exec.go @@ -2503,6 +2503,10 @@ func (b *Builder) gccArchArgs() []string { if cfg.Goos == "aix" { return []string{"-maix64"} } + case "ppc": + if cfg.Goos == "aix" { + return []string{"-maix32"} + } } return nil } |