This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] MIPS gas/ld test suite portability fixes


Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de> writes:
> Richard Sandiford wrote:
>> Your proposal seems to be catering for the case where:
>> 
>>   (a) someone picks a 32-bit-only configuration that implies
>>       a particular architecture; and
>> 
>>   (b) then tries to use it to build 64-bit code.
>
> This currently works for
>
> 	mips-linux-gcc -mabi=n32
>
> thanks to from-abi but fails for
>
> 	mipsisa32-linux-gcc -mabi=n32
>
> This inconsistency is introduced just because the toolchain's ISA
> default is different to MIPS I.

But the default architecture settings for _both_ configurations are
different from MIPS I.  The default architecture for mips-linux-gnu
is "from-abi", not "mips1".  Like I said in my earlier message:

>> [from-abi] was deliberately added as a separate architecture setting
>> to cater for the case where you always want the "most compatible"
>> code possible.
>>
>> And that's why it's the default for mips-* and mips64-* configurations
>> (meaning when --with-arch isn't used).  Those configurations don't
>> imply that you're using a particular processor.

See also the long quote from the 2002 message wrt whether mips-*
is a "MIPS I" configuration or a "32-bit configuration" by default.
We settled on a situation where mips-* is a "32-bit configuration"
by default.  In contrast, mipsisa32-*-* is a "MIPS32 configuration"
by default.  So if you use:

        mips-linux-gnu-gcc -mabi=64

then you're overriding the default 32-bitness.  You're selecting
-march=from-abi -mabi=64, which is well-defined.  But if you use:

        mipsisa32-linux-gnu-gcc -mabi=64

then you're _not_ overriding the default MIPS32ness, at least not
explicitly.  Should this command generate MIPS III or MIPS64 code?
Both are justifiable, and I personally would have expected MIPS64.

>> Anyone who's seriously interested in building 64-bit
>> code should use a 64-bit configuration, not something like mipstx39-elf,
>> mipsisa32-linux-gnu or whatever. That's especially true when you
>> consider that a 32-bit-only configuration won't build any compatible
>> libraries.
>
> Which is IMHO a bug in gcc, because -mabi=n?? should be fully usable.
> (If this isn't true for some mips*-elf targets, then -mabi should
> probably be an invalid option for these.)

And mips-linux-gnu, mipsisa32-linux-gnu, etc. as well, presumably?
We don't build n32 libraries for them either, and nor should we.

I don't buy that, but it's probably best not to go there ;)

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]