[PATCH] PR66870 PowerPC64 Enable gold linker with split stack

David Edelsohn dje.gcc@gmail.com
Thu Oct 15 18:40:00 GMT 2015


On Sun, Oct 11, 2015 at 9:07 AM, Alan Modra <amodra@gmail.com> wrote:
> On Sat, Oct 10, 2015 at 11:25:38PM +0200, Andreas Schwab wrote:
>> "Lynn A. Boger" <laboger@linux.vnet.ibm.com> writes:
>>
>> > Index: gcc/config/rs6000/sysv4.h
>> > ===================================================================
>> > --- gcc/config/rs6000/sysv4.h       (revision 228653)
>> > +++ gcc/config/rs6000/sysv4.h       (working copy)
>> > @@ -940,13 +940,15 @@ ncrtn.o%s"
>> >  #undef TARGET_ASAN_SHADOW_OFFSET
>> >  #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
>> >
>> > -/* On ppc64 and ppc64le, split stack is only support for
>> > -   64 bit. */
>> > +/* On ppc64 and ppc64le, split stack is only supported for
>> > +   64 bit targets with a 64 bit compiler. */
>> >  #undef TARGET_CAN_SPLIT_STACK_64BIT
>> > +#if defined (__64BIT__) || defined (__powerpc64__) || defined (__ppc64__)
>>
>> This doesn't make sense.  A target header cannot use host defines.
>
> Right.  Here's a better fix.  A powerpc-linux biarch compiler can
> default to either -m32 or -m64 so we need to take that into account,
> and 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.
>
> Bootstrapped etc. powerpc64-linux, powerpc-linux and
> powerpc64le-linux.  OK?
>
> gcc/
>         * 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/
>         * 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.

The rs6000 bits are okay with me, although I never saw a full test for
all configurations from Lynn.

Thanks, David



More information about the Gcc-patches mailing list