Message ID | 561556F9.8030802@ubuntu.com |
---|---|
State | New |
Headers | show |
On Wed, Oct 7, 2015 at 3:37 PM, Lynn A. Boger <laboger@linux.vnet.ibm.com> wrote: > Right I didn't think of the multilib on powerpc-linux-gnu (actually didn't > think that was allowed). > > I don't think TARGET_64BIT will work here (I tried it), because on ppc64 & > ppc64le it gets replaced with a code snippet to check > a value in rs6000_isa_flags. Based on how it is used here, it has to be a > compile time define, not a bit checked > at runtime. > > However, I think #if TARGET_POWERPC64 == 1 should work instead of > TARGET_64BIT and I believe that will do the trick. > > Let me try that out on the ppc64 & ppc64le targets to make sure it still > works as it should. TARGET_POWERPC64 is not the correct test. - David
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. As David noted, the use of TARGET_64BIT or TARGET_POWERPC64 won't work for this #define. On 10/07/2015 12:31 PM, Matthias Klose wrote: > On 07.10.2015 17:36, Lynn A. Boger wrote: >> Pretty sure this is the fix, but still doing some testing. > > linux.h isn't included for multilib enabled builds defaulting to > powerpc-linux-gnu, I am currently testing > > --- gcc/config/rs6000/sysv4.h (revision 228571) > +++ gcc/config/rs6000/sysv4.h (working copy) > @@ -943,8 +943,9 @@ > /* On ppc64 and ppc64le, split stack is only support for > 64 bit. */ > #undef TARGET_CAN_SPLIT_STACK_64BIT > -#if TARGET_GLIBC_MAJOR > 2 \ > - || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18) > +#if TARGET_64BIT \ > + && (TARGET_GLIBC_MAJOR > 2 \ > + || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18)) > #define TARGET_CAN_SPLIT_STACK_64BIT > #endif > > > >
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
--- gcc/config/rs6000/sysv4.h (revision 228571) +++ gcc/config/rs6000/sysv4.h (working copy) @@ -943,8 +943,9 @@ /* On ppc64 and ppc64le, split stack is only support for 64 bit. */ #undef TARGET_CAN_SPLIT_STACK_64BIT -#if TARGET_GLIBC_MAJOR > 2 \ - || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18) +#if TARGET_64BIT \ + && (TARGET_GLIBC_MAJOR > 2 \ + || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18)) #define TARGET_CAN_SPLIT_STACK_64BIT #endif
On 07.10.2015 17:36, Lynn A. Boger wrote: > Pretty sure this is the fix, but still doing some testing. linux.h isn't included for multilib enabled builds defaulting to powerpc-linux-gnu, I am currently testing