diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-10 15:18:55 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-10 15:18:55 +0000 |
commit | d0ac0d52e93267911a6ef1bcbde87bccdebd5058 (patch) | |
tree | 8e448f2f5bb776ee7297161dc7be9dd74e9d9161 /libgo/go | |
parent | 8c6e19c1c24794163bc9114bb367c9d61b7f839c (diff) | |
download | gcc-d0ac0d52e93267911a6ef1bcbde87bccdebd5058.zip gcc-d0ac0d52e93267911a6ef1bcbde87bccdebd5058.tar.gz gcc-d0ac0d52e93267911a6ef1bcbde87bccdebd5058.tar.bz2 |
cmd/go: check for another GCC error message
GCC always recognizes the -fsplit-stack option, but then tests whether
it is supported by the selected target. If not, it reports
cc1: error: ‘-fsplit-stack’ is not supported by this compiler configuration
Check for that error message when deciding whether a compiler option works.
Reviewed-on: https://go-review.googlesource.com/87137
From-SVN: r256433
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/cmd/go/internal/work/exec.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libgo/go/cmd/go/internal/work/exec.go b/libgo/go/cmd/go/internal/work/exec.go index f955573..963a515 100644 --- a/libgo/go/cmd/go/internal/work/exec.go +++ b/libgo/go/cmd/go/internal/work/exec.go @@ -1857,9 +1857,11 @@ func (b *Builder) gccSupportsFlag(compiler []string, flag string) bool { // GCC says "unrecognized command line option". // clang says "unknown argument". // Older versions of GCC say "unrecognised debug output level". + // For -fsplit-stack GCC says "'-fsplit-stack' is not supported". supported := !bytes.Contains(out, []byte("unrecognized")) && !bytes.Contains(out, []byte("unknown")) && - !bytes.Contains(out, []byte("unrecognised")) + !bytes.Contains(out, []byte("unrecognised")) && + !bytes.Contains(out, []byte("is not supported")) b.flagCache[key] = supported return supported } |