[PATCH] S/390: Set ABI default based on uname

Andreas Krebbel krebbel@linux.vnet.ibm.com
Mon Mar 12 17:42:00 GMT 2018


On 03/12/2018 06:31 PM, Jakub Jelinek wrote:
> 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.

Wow, that was quick ;)

I didn't expect this to break things. Could you please elaborate where this might cause trouble?

-Andreas-


> 
>> 2018-03-12  Andreas Krebbel  <krebbel@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
> 



More information about the Gcc-patches mailing list