This is the mail archive of the
gcc-patches@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?)
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 19 Jul 2002 13:43:14 -0400
- Subject: Re: PATCH: Add --with-arch=cpu (Re: Should gcc configurted for CPU to generate code for CPU by default?)
- References: <20020719081402.A20608@lucon.org> <200207191525.QAA28849@cam-mail2.cambridge.arm.com> <20020719090207.A21169@lucon.org> <20020719104008.A22880@lucon.org>
On Fri, Jul 19, 2002 at 10:40:08AM -0700, H. J. Lu wrote:
> On Fri, Jul 19, 2002 at 09:02:07AM -0700, H. J. Lu wrote:
> > On Fri, Jul 19, 2002 at 04:25:00PM +0100, Richard Earnshaw wrote:
> > > > When I configure gcc for i686 with
> > > >
> > > > .../configure --target=i686-xxxxx
> > > >
> > > > I'd like to be able to make gcc generate code for i686 by default. It
> > > > is also useful for MIPS. I am thinking adding
> > > >
> > > > --with-default-ARCH=cpu
> > > >
> > > > or
> > > >
> > > > --with-default-CPU=cpu
> > > >
> > > > or
> > > >
> > > > --with-default-ISA=cpu
> > > >
> > > > Any comments?
> > > >
> > >
> > > What's wrong with the existing --with-cpu=... already supported by
> > > configure?
> > >
> >
> > Correct me if I am wrong. At least for x86, --with-cpu=i686 is no
> > different from --target=i686-xxxxx, as far as the default code
> > generation is concerned. For x86, there are -mcpu=xxx and -march=xxx.
> > -with-cpu=xxx sets the default -mcpu=xxx. I want something to set
> > the default -march=xxx. Looking at install.texi. --with-cpu should
> > be used to set -march=xxx for x86. But for x86, TARGET_CPU_DEFAULT
> > is for -mcpu=... I am looking for TARGET_ARCH_DEFAULT. --with-arch=...
> > will work for me.
> >
> >
>
> Here is a patch to add --with-arch=cpu.
>
>
> H.J.
Can't this be done at the driver level? We have different handling of
--with-cpu for every architecture already; I'd much rather not
proliferate that.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer