Should gcc configurted for CPU to generate code for CPU by default?

H. J. Lu hjl@lucon.org
Fri Jul 19 12:56:00 GMT 2002


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.


H.J.



More information about the Gcc mailing list