This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Using .opt files for target options
Richard Sandiford wrote:-
> The idea is that the new machinery will work alongside TARGET_SWITCHES
> and TARGET_OPTIONS for the time being. We can remove things like the
> "" hack if (when?) we remove support for TARGET_SWITCHES and
> TARGET_OPTIONS.
>
> The alternative would be to remove all "" entries from TARGET_SWITCHES
> on-masse, but I'd much rather move each port individually.
>
> > I don't see why you needed to change this. I believe the existing
> > code only does this for -f and -W flags, so -m should be unaffected.
> > Can you explain?
>
> I forgot to mention this in the covering note, but the patch extends the
> same behaviour to -m. Most -m flags have the same kind of negatives as
> the -f flags; certainly most of the MIPS ones do.
>
> The point I was trying to make was that the automatic negative of
> "-mips16" would be "-mno-ips16", not "-mno-mips16", so we need the
> flexibility to list unusually-spelt "-mno-" options separately.
> Normal -f, -m and -W negatives will still work OK.
>
> FWIW, I don't think the overhead of two look-ups is going to be
> significant. It also doesn't need much extra code (+3 lines, -1 line).
>
> > Is there a good reason you don't simply enforce it being called
> > target.opt? Wouldn't that be simpler?
>
> The idea is that you'd put options that apply to all i386 targets
> in i386.opt and those that apply only to cygwin (such as -mcygwin)
> in cygwin.opt.
Thanks for the clarifications. This is OK. Please do try to transition
as much as you can stomach.
Neil.