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
This commit is contained in:
parent
6b0b6a3868
commit
0c223b02b6
3 changed files with 9 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
aac2b382839154d74eeef160522c0a5c1ea8aadf
|
9aed2d2c5e9c69aa530bf09d72d33c66e497d720
|
||||||
|
|
||||||
The first line of this file holds the git revision number of the last
|
The first line of this file holds the git revision number of the last
|
||||||
merge done from the gofrontend repository.
|
merge done from the gofrontend repository.
|
||||||
|
|
|
@ -1573,6 +1573,10 @@ func (p *Package) gccMachine() []string {
|
||||||
if goos == "aix" {
|
if goos == "aix" {
|
||||||
return []string{"-maix64"}
|
return []string{"-maix64"}
|
||||||
}
|
}
|
||||||
|
case "ppc":
|
||||||
|
if goos == "aix" {
|
||||||
|
return []string{"-maix32"}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -1615,7 +1619,6 @@ func (p *Package) gccCmd() []string {
|
||||||
c = append(c, p.GccOptions...)
|
c = append(c, p.GccOptions...)
|
||||||
c = append(c, p.gccMachine()...)
|
c = append(c, p.gccMachine()...)
|
||||||
if goos == "aix" {
|
if goos == "aix" {
|
||||||
c = append(c, "-maix64")
|
|
||||||
c = append(c, "-mcmodel=large")
|
c = append(c, "-mcmodel=large")
|
||||||
}
|
}
|
||||||
c = append(c, "-") //read input from standard input
|
c = append(c, "-") //read input from standard input
|
||||||
|
|
|
@ -2503,6 +2503,10 @@ func (b *Builder) gccArchArgs() []string {
|
||||||
if cfg.Goos == "aix" {
|
if cfg.Goos == "aix" {
|
||||||
return []string{"-maix64"}
|
return []string{"-maix64"}
|
||||||
}
|
}
|
||||||
|
case "ppc":
|
||||||
|
if cfg.Goos == "aix" {
|
||||||
|
return []string{"-maix32"}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue