This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Add --with-arch=cpu (Re: Should gcc configurted for CPU to generate code for CPU by default?)
On Fri, Jul 19, 2002 at 02:03:29PM -0400, Daniel Jacobowitz wrote:
> On Fri, Jul 19, 2002 at 10:55:47AM -0700, H. J. Lu wrote:
> > On Fri, Jul 19, 2002 at 01:49:52PM -0400, Daniel Jacobowitz wrote:
> > > > >
> > > > > Can't this be done at the driver level? We have different handling of
> > > > >
> > > >
> > > > What do you mean by that?
> > >
> > > I.E. make the GCC driver supply a default value of -mcpu if none is
> > > specified on the command line, the same way sane programs set defaults.
> > >
> >
> > That is exactly what the gcc driver is doing today. My patch provides
> > a way to choose a different default value for -march at the configure
> > time. Without my change, the default value for -march is i386 for all
> > ia32 processors and it is fixed.
>
> No, that's not what the driver does today. I mean that if the driver
> was built with --with-arch=, and the driver does not see an -march=,
> then the driver should supply one. Then we won't need any changes to
> backends.
I am really confused here. To me, my patch does exactly what you said
above. Wait, did you mean gcc.c should handle -march=, not i386.c?
I have an impresssion that most, if not all, "-mxxx" switches are
handled in the backend. I don't see why my patch should change that.
FWIW, "-mxxx" switches are backend dependent by definition. Did I miss
something here?
H.J.