On Mon, Mar 12, 2018 at 06:28:09PM +0100, Andreas Krebbel wrote:
> Currently the default ABI option for a GCC built on a 64 bit system is
> always -m64.  This is inconvenient when e.g. building 32 bit libraries
> on a 64 bit system.  The usual way to do this is to set the personality
> to s390 (32 bit) and let the configure script do the right thing.
> Having a GCC which defaults to -m64 also requires to get a -m31 somehow
> into the option list.
> 
> With that patch the GCC driver checks the current personality setting in
> order to figure out at runtime what the default is supposed to be.
> 
> Bootstrapped and regtested on s390x.
> 
> I will commit the patch after waiting a few days for comments.

I don't like this, it is inconsistent with how it is handled on all other
targets and how it worked for years.  Having setarch magically change the
default is dangerous.

> 2018-03-12  Andreas Krebbel  <kreb...@linux.vnet.ibm.com>
> 
>       * config/s390/driver-native.c (s390_host_detect_target_bits): New
>       function.
>       * config/s390/s390.h: Invoke s390_host_detect_target_bits if
>       neither -m31 nor -m64 has been specified.

        Jakub

Reply via email to