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 wrote:
[snip]
> > Right, I meant as long as they do this:
> > 
> > gas -march=from-abi -mabi=64
> > 
> > just as they would with a gcc that wasn't configured for the right
> > abi/isa.
> 
> Gcc does not behave that way for mips{,64}-linux, see MIPS_ISA_DEFAULT
> and MIPS_CPU_STRING_DEFAULT. If neither is defined, the arch will be
> figured out from the ABI. It would IMHO make no sense to fail on
> "mips-linux-gcc -mabi=64" just because there's no arch specified.
> 
> mipsisa32*-linux fails because it defines MIPS_ISA_DEFAULT instead
> of MIPS_CPU_STRING_DEFAULT.
> 
> Most of the mips*-elf targets define MIPS_ISA_DEFAULT, some define
> additionally MIPS_CPU_STRING_DEFAULT.
> 
> Those gcc configurations should probably be changed to define
> MIPS_CPU_STRING_DEFAULT only, with the ISA-generic default cpu value
> for an ISA-specific config.

This of course wouldn't change anything for the problem discussed
here, bacause any of both defines is enough to override the from-abi
selection. It would only avoid to have a (partial) duplicate ISA/CPU
table in the configuration script.

In the end we have two different approaches for ISA/ARCH selection,
a CPU-centric and an ABI-centric one. For the latter we want to have
sensible ISA defaults. This should be ok as long as we don't interfere
with the CPU-centric usage, which means elevating the ISA level to
the ABI requirement can be done, but lowering it from a higher level
can't.


Thiemo


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