diff options
author | Alan Modra <amodra@gmail.com> | 2015-10-20 10:20:30 +1030 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2015-10-20 10:20:30 +1030 |
commit | b2e4c071d7be806aae1a9d13190ed1a91fbb5480 (patch) | |
tree | f5d8ff4dbc0bc1de9017a02daa70e6e4f5fe7f2c /gcc/go | |
parent | 524d9b4b9035ff69f1024ca2c32c7217128f3cf9 (diff) | |
download | gcc-b2e4c071d7be806aae1a9d13190ed1a91fbb5480.zip gcc-b2e4c071d7be806aae1a9d13190ed1a91fbb5480.tar.gz gcc-b2e4c071d7be806aae1a9d13190ed1a91fbb5480.tar.bz2 |
PR66870 PowerPC64 Enable gold linker with split stack
A powerpc-linux/powerpc64-linux biarch compiler can default to either
-m32 or -m64, and we need to notice both -m32 and -m64 on the gccgo
command line. It's also possible to build a -m64 only compiler, so in
that case we can define TARGET_CAN_SPLIT_STACK.
gcc/
PR go/66870
* config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Don't define.
* config/rs6000/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
(TARGET_CAN_SPLIT_STACK_64BIT): Define.
gcc/go/
PR go/66870
* gospec.c (saw_opt_m32): Rename to..
(is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT.
Update uses.
(lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32.
From-SVN: r229009
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/go/gospec.c | 14 |
2 files changed, 18 insertions, 4 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index be1fd0c..f25c898 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,11 @@ +2015-10-20 Alan Modra <amodra@gmail.com> + + PR go/66870 + * gospec.c (saw_opt_m32): Rename to.. + (is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT. + Update uses. + (lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32. + 2015-10-01 Ian Lance Taylor <iant@google.com> PR go/66870 diff --git a/gcc/go/gospec.c b/gcc/go/gospec.c index ca3c2d7..a56ffe0 100644 --- a/gcc/go/gospec.c +++ b/gcc/go/gospec.c @@ -120,8 +120,10 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, /* Whether the -S option was used. */ bool saw_opt_S = false; - /* Whether the -m32 option was used. */ - bool saw_opt_m32 ATTRIBUTE_UNUSED = false; +#ifdef TARGET_CAN_SPLIT_STACK_64BIT + /* Whether the -m64 option is in force. */ + bool is_m64 = TARGET_CAN_SPLIT_STACK_64BIT; +#endif /* The first input file with an extension of .go. */ const char *first_go_file = NULL; @@ -160,7 +162,11 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, #ifdef TARGET_CAN_SPLIT_STACK_64BIT case OPT_m32: - saw_opt_m32 = true; + is_m64 = false; + break; + + case OPT_m64: + is_m64 = true; break; #endif @@ -253,7 +259,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, #endif #ifdef TARGET_CAN_SPLIT_STACK_64BIT - if (!saw_opt_m32) + if (is_m64) supports_split_stack = 1; #endif |