This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: New approach to --with-cpu
Daniel Jacobowitz <drow@mvista.com> writes:
> > I suppose you could have:
> >
> > if (!option_present (*argcp, *argvp, "-march=")
> > && (!option_present (*argcp, *argvp, "-mips")
> > || option_present (*argcp, *argvp, "-mips16")))
> > add_option (argcp, argvp, "-march=" XSTRING (TARGET_DEFAULT_OPTION_ARCH));
> >
> > (since -mips16 shouldn't change the default arch) but maybe
> > there needs to be some sort of target macro?
>
> That doesn't do quite the right thing, if you think about the logic.
> It'd have to be "-mips1" or "-mips2" or "-mips3" or "-mips4" or
> "-mips5" (?) or "-mips32" or "-mips64".
Well, all -mips* options are handled by one entry in TARGET_SWITCHES, so
-mips16 overrides a previous -mips3, silly as that might be. I guess to
be fully correct, you need to see if the last -mips option is -mips16, in
which case you keep the default, or something else, in which case you
don't. (half ;-)
Richard