public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-modules] cmd: add -maix32 to gcc calls for aix/ppc
@ 2020-08-28 16:07 Nathan Sidwell
  0 siblings, 0 replies; only message in thread
From: Nathan Sidwell @ 2020-08-28 16:07 UTC (permalink / raw)
  To: gcc-cvs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 2125 bytes --]

https://gcc.gnu.org/g:0c223b02b6e4dfbdeac9f1dcd64ee9d1cd04a5a2

commit 0c223b02b6e4dfbdeac9f1dcd64ee9d1cd04a5a2
Author: Clément Chigot <clement.chigot@atos.net>
Date:   Wed Aug 26 10:19:23 2020 +0200

    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

Diff:
---
 gcc/go/gofrontend/MERGE               | 2 +-
 libgo/go/cmd/cgo/gcc.go               | 5 ++++-
 libgo/go/cmd/go/internal/work/exec.go | 4 ++++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 2f0865b7c80..780588aabc5 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-aac2b382839154d74eeef160522c0a5c1ea8aadf
+9aed2d2c5e9c69aa530bf09d72d33c66e497d720
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/libgo/go/cmd/cgo/gcc.go b/libgo/go/cmd/cgo/gcc.go
index 249cfe4675d..f774cbb9353 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 d610410a72c..65f3011adfa 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
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-28 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 16:07 [gcc/devel/c++-modules] cmd: add -maix32 to gcc calls for aix/ppc Nathan Sidwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).