diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-07-14 22:21:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-07-14 22:21:37 +0000 |
commit | b9d36a8daf6a723afb333fac8e3128197c216bf9 (patch) | |
tree | 0f4bdcc81c3a5891b1e0c9aa6b448c48f92acd7e | |
parent | b70bb05bd189a80c79225f7056441d7e3e1c0b6c (diff) | |
download | gcc-b9d36a8daf6a723afb333fac8e3128197c216bf9.zip gcc-b9d36a8daf6a723afb333fac8e3128197c216bf9.tar.gz gcc-b9d36a8daf6a723afb333fac8e3128197c216bf9.tar.bz2 |
cmd/go: use gccSupportsFlag for -fsplit-stack
Don't assume that all (or only) 386/amd64 compilers support
-fsplit-stack.
Reviewed-on: https://go-review.googlesource.com/48592
From-SVN: r250216
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | libgo/go/cmd/go/build.go | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index efa2c01..5c56021 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -9294e79fced202ade7eb236bbe78b766e7e0374f +a77b1091fa83cfaf200e6dad26e92e42483bae43 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/go/build.go b/libgo/go/cmd/go/build.go index 72265ef..9623b9c 100644 --- a/libgo/go/cmd/go/build.go +++ b/libgo/go/cmd/go/build.go @@ -3092,8 +3092,7 @@ func (tools gccgoToolchain) cc(b *builder, p *Package, objdir, ofile, cfile stri if pkgpath := gccgoCleanPkgpath(p); pkgpath != "" { defs = append(defs, `-D`, `GOPKGPATH="`+pkgpath+`"`) } - switch goarch { - case "386", "amd64": + if b.gccSupportsFlag("-fsplit-stack") { defs = append(defs, "-fsplit-stack") } defs = tools.maybePIC(defs) @@ -3428,8 +3427,7 @@ func (b *builder) cgo(a *action, cgoExe, obj string, pcCFLAGS, pcLDFLAGS, cgofil } if _, ok := buildToolchain.(gccgoToolchain); ok { - switch goarch { - case "386", "amd64": + if b.gccSupportsFlag("-fsplit-stack") { cgoCFLAGS = append(cgoCFLAGS, "-fsplit-stack") } cgoflags = append(cgoflags, "-gccgo") |