Message ID | 56181AD9.6080501@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
On Fri, Oct 9, 2015 at 3:51 PM, Lynn A. Boger <laboger@linux.vnet.ibm.com> wrote: > Here's a new one. > > Tried all the variations, verified that split stack is still enabled and > uses gold linker for 64 bit targets > when using a 64 bit default compiler, and does not give the split stack > error for 32 bit default > compilers. This is okay if Matthias confirms that it works. Thanks, David
On 10.10.2015 16:00, David Edelsohn wrote: > On Fri, Oct 9, 2015 at 3:51 PM, Lynn A. Boger > <laboger@linux.vnet.ibm.com> wrote: >> Here's a new one. >> >> Tried all the variations, verified that split stack is still enabled and >> uses gold linker for 64 bit targets >> when using a 64 bit default compiler, and does not give the split stack >> error for 32 bit default >> compilers. > > This is okay if Matthias confirms that it works. yes, that fixes the build error. using the preprocessor for this kind of check, you get wrong results for gcc -m32 on powerpc64, and for gcc -m64 on powerpc. The former looks like wrong code, while the latter is just missed optimization. Not sure if it is worth fixing this. I lost track of the x86 status. Is this now enabled there as well? Matthias
"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. Andreas.
Index: gcc/common/config/rs6000/rs6000-common.c =================================================================== --- gcc/common/config/rs6000/rs6000-common.c (revision 228653) +++ gcc/common/config/rs6000/rs6000-common.c (working copy) @@ -303,10 +303,12 @@ rs6000_supports_split_stack (bool report, #define TARGET_GLIBC_MINOR 0 #endif /* Note: Can't test DEFAULT_ABI here, it isn't set until later. */ +#ifdef TARGET_CAN_SPLIT_STACK_64BIT if (TARGET_GLIBC_MAJOR * 1000 + TARGET_GLIBC_MINOR >= 2018 && TARGET_64BIT && TARGET_ELF) return true; +#endif if (report) error ("%<-fsplit-stack%> currently only supported on PowerPC64 GNU/Linux with glibc-2.18 or later"); 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__) #if TARGET_GLIBC_MAJOR > 2 \ || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18) #define TARGET_CAN_SPLIT_STACK_64BIT #endif +#endif /* This target uses the sysv4.opt file. */ #define TARGET_USES_SYSV4_OPT 1