This is the mail archive of the
mailing list for the binutils project.
Re: RFC & patch: Rework MIPS command-line handling
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, binutils at sources dot redhat dot com
- Date: Tue, 16 Jul 2002 12:24:02 +0200 (MET DST)
- Subject: Re: RFC & patch: Rework MIPS command-line handling
- Organization: Technical University of Gdansk
On 15 Jul 2002, Richard Sandiford wrote:
> It might also be nice to have a --with-abi configure option,
> although that's something we could add later...
I'm not sure that is desireable -- I think the default ABI would best be
selectable with the target triple. Like with "mips64abin32-*-*" or so.
> The reason for -mgp32 is for consitency with EABIs. If you
> have a 32-bit EABI configuration like mipstx39-elf, does
> -mips4 select 64-bit EABI code, or 32-bit EABI code? The
> first seems most natural to me, so the rule was: if you
> select a 64-bit processor, you get 64-bit code, unless
> you also select -mgp32.
The implicit dependencies seem unfortunate for me.
> In general, the main reason to keep the implicit ABI selection
> is that that's what we've done before. I didn't think there'd
> be much support for dropping it entirely.
Certainly we can't drop them immediately, if there is no alternative,
which seem to be true from what you wrote above. At least a single
release with both ways available must be created.
> The main difficulty with dropping the ABI selection entirely
> is: how do you select between the 32-bit and 64-bit versions
> of the EABIs? mipstx39-elf-gcc generates 32-bit EABI code
> by default. What happens if you select a 64-bit processor?
> Options I can see:
> 1. Stick with the idea in the patch I sent. Selecting a 64-bit
> processor would usually select the 64-bit EABI, but adding
> -mgp32 forces the 32-bit version.
> 2. Reverse of (1). You get the 32-bit version of the EABI
> unless you use -mgp64.
> 3. Add eabi32, eabi64, meabi32 and meabi64 to -mabi. You get
> the 32-bit version unless you use -mabi=eabi64.
The last option seems the cleanest to me. With your changes, it would
permit selecting a default ABI when configuring for certain embedded
targets as well (though I'm not sure how useful it would be in practice at
the moment, since I am not an embedded user).
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+ e-mail: email@example.com, PGP key available +