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: Updated --with-cpu patch, v9


On Tue, May 13, 2003 at 11:20:27AM +0100, Richard Earnshaw wrote:
> 
> > Index: gcc/config/arm/arm.h
> > ===================================================================
> > RCS file: /big/fsf/rsync/gcc-cvs/gcc/gcc/config/arm/arm.h,v
> > retrieving revision 1.189
> > diff -u -p -r1.189 arm.h
> > --- gcc/config/arm/arm.h	23 Apr 2003 16:39:30 -0000	1.189
> > +++ gcc/config/arm/arm.h	12 May 2003 20:12:56 -0000
> > @@ -525,6 +525,19 @@ Unrecognized value in TARGET_CPU_DEFAULT
> >     N_("Specify the register to be used for PIC addressing"), 0}	\
> >  }
> >  
> > +/* Support for a compile-time default CPU, et cetera.  The rules are:
> > +   --with-arch is ignored if -march or -mcpu are specified.
> > +   --with-cpu is ignored if -march or -mcpu are specified, and is overridden
> > +    by --with-arch.
> > +   --with-tune is ignored if -mtune is specified.
> > +   --with-float is ignored if -mhard-float or -msoft-float are
> > +    specified.  */
> > +#define OPTION_DEFAULT_SPECS \
> > +  {"arch", "%{!march=*:%{!mcpu=*:-march=VALUE}}" }, \
> > +  {"cpu", "%{!march=*:%{!mcpu=*:-mcpu=VALUE}}" }, \
> > +  {"tune", "%{!mtune=*:-mtune=VALUE}" }, \
> > +  {"float", "%{!msoft-float:%{!mhard-float:-mVALUE-float}}" }
> > +
> >  struct arm_cpu_select
> >  {
> >    const char *              string;
> 
> --with-tune should also be ignored if -mcpu= is specified.

I was going by what the current options do: -mtune is orthogonal to the
separate -mcpu.  --with-tune is like always specifying a tune unless
you manually specify something that would override the tune. 
Specifying -mcpu won't override a specified -mtune, which is why I did
it this way.

Looking at it another way, -mcpu by itself would normally imply a
matching -mtune, so I see your reasoning.  Since you prefer I'll change
it in the next revision.  I should probably check the other platforms
for similar.

-- 
Daniel Jacobowitz
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]