This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: New approach to --with-cpu


On Wed, Jul 31, 2002 at 02:15:53PM +0100, Richard Sandiford wrote:
> Daniel Jacobowitz <drow@mvista.com> writes:
> > +#ifdef TARGET_DEFAULT_OPTION_ARCH
> > +  if (! option_present (*argcp, *argvp, "-march="))
> > +    add_option (argcp, argvp, "-march=" XSTRING (TARGET_DEFAULT_OPTION_ARCH));
> > +#endif
> 
> On mips, what should happen if you give -mips3 on the command line?
> Should it override the default -march?  Seems like the default would
> win as things stand.
> 
> 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".  At this point there should
obviously be a target macro, which I was hoping to avoid, but at least
it can be a bit simpler.

Blast it, I knew the maze of twisty MIPS command line options was going
to bite me.  I'll resubmit the patch with a target macro for this,
then.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]