This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 00/30] [ARM] Reworking the -mcpu, -march and -mfpu options
On 12/06/17 22:27, Richard Earnshaw (lists) wrote:
> In fact I probably don't need the %<march=* part of the rule. I hadn't
> realized that is was possible to maintain all such options and just
> interpret the last one. So for my purposes that might be the best
> solution, since my canon_arch generated option will simply override any
> existing -march options.
It turns out this won't work. The multilib selection machinery looks at
all the -march= options to make its decision and it is completely
unaware of the fact that only the last one is relevant.
This was broken before my changes, but the consequences are more severe now.
I wonder if we should/could add a LAST attribute to the options
specification such that the driver discards all but the final instance
of such an option. This would also solve the -mcpu=native problem since
the discard rule would kick in and eliminate that option if it wasn't
the final one in the list.
We clearly can't apply that to every option, since for example -ffixed=
needs to accumulate, as do options such as -I; but others are clearly