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.

On 10/08/2015 03:46 PM, Matthias Klose wrote:
On 08.10.2015 20:56, Lynn A. Boger wrote:
I think my original fix with linux.h doing the #undef on
TARGET_CAN_SPLIT_STACK_64BIT is the right fix at least
for powerpc-linux-gnu 32 bit only.

It works for powerpc-linux-gnu without multilib and doesn't break
powerpc64-linux-gnu or powerpc64le-linux-gnu.

Can you tell me how you are configuring the multilib build that defaults to
powerpc-linux-gnu and how it
fails?  Maybe there is another problem for that combination.

Configured with: -v
     --with-pkgversion='Ubuntu 20151005-0ubuntu1'
--with-bugurl='file:///usr/share/doc/gcc-snapshot/README.Bugs'
     --enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++
     --prefix=/usr/lib/gcc-snapshot
     --enable-shared
     --enable-linker-build-id
     --disable-nls
     --with-sysroot=/
     --enable-clocale=gnu
     --enable-libstdcxx-debug
     --enable-libstdcxx-time=yes
     --with-default-libstdcxx-abi=new
     --enable-gnu-unique-object
     --disable-libitm
     --disable-libquadmath
     --enable-plugin
     --with-system-zlib
     --disable-browser-plugin
     --enable-java-awt=gtk
     --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-snap-powerpc/jre
     --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-snap-powerpc
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-snap-powerpc
     --with-arch-directory=ppc
     --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
     --enable-objc-gc
     --enable-secureplt
     --disable-softfloat
     --with-cpu=default32
     --disable-softfloat
     --enable-targets=powerpc-linux,powerpc64-linux
     --enable-multiarch
     --disable-werror
     --with-long-double-128
     --enable-multilib
     --enable-checking=yes
     --build=powerpc-linux-gnu
     --host=powerpc-linux-gnu
     --target=powerpc-linux-gnu

fails in gotools with:
cc1: error: '-fsplit-stack' currently only supported on PowerPC64 GNU/Linux with glibc-2.18 or later cc1: error: '-fsplit-stack' is not supported by this compiler configuration

this information is from the log below, but it's a parallel build, so a bit useless https://launchpadlibrarian.net/220374353/buildlog_ubuntu-wily-powerpc.gcc-snapshot_20151005-0ubuntu1_BUILDING.txt.gz

As David noted, the use of TARGET_64BIT or TARGET_POWERPC64 won't work for this
#define.

I found that out too =) Note that ada builds are currently broken on the trunk.

Matthias



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

Reply via email to