[patch, mips] New mips triplet for multilib linux builds

Richard Sandiford rdsandiford@googlemail.com
Fri Sep 7 06:52:00 GMT 2012


Steve Ellcey <sellcey@mips.com> writes:
> On Thu, 2012-09-06 at 06:47 +0100, Richard Sandiford wrote:
>> > Is this an 'if-then-else' usage?
>> 
>> Yeah, but I typoed, sorry.  It should be:
>> 
>> %{mips32r2|mips64r2:-msynci;:-mno-synci}
>> 
>> Richard
>
> OK, I got that working now.  I am still having some issues though.  My
> original patch was setup to include mti-linux.h before mips.h and I
> think that is good for setting MIPS_ABI_DEFAULT and MIPS_ISA_DEFAULT
> because mips.h is going to look and see if those values are set.
>
> But now that I am setting DRIVER_SELF_SPECS in the header it seems
> like I should include it after mips.h (so I can override the setting
> of DRIVER_SELF_SPECS in mips.h).
>
> Do I need two header files?  One to include before mips.h and one to
> include after mips.h?

MIPS_ABI_DEFAULT and MIPS_ISA_DEFAULT are better set in config.gcc.
That also allows you to handle (say) mipsisa32-mti-linux-gnu vs.
mipsisa64-mti-linux-gnu.

I think in general we want more specific header files to come after
less specific ones, so that the more specific ones can override
whatever they like.  E.g. the order for the generic config/ *.hs
is "elfos.h gnu-user.h linux.h" and the order for the MIPS ones
is "mips.h gnu-user.h gnu-user64.h linux64.h".  linux-common.h
coming after linux64.h is an odd-one-out really.

Richard



More information about the Gcc-patches mailing list