This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 3.4.1 and CPU optimization
- From: Nix <nix at esperi dot org dot uk>
- To: Zbigniew £uszpiñski <zbiggy at o2 dot pl>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 01 Dec 2004 07:24:19 +0000
- Subject: Re: gcc 3.4.1 and CPU optimization
- References: <200411302222.00566.zbiggy@o2.pl>
On 30 Nov 2004, Zbigniew said:
> I compile many programs from sources. A lot of them have optimizations like
> -m386, -mcpu=486, -mtune=i686, -march=i686 or other.
> I use AMD AthlonXP 2500+. Everytime I compile program first do ./configure
> CFLAGS="-march=athlon-xp". Could you tell me which one optimization will be
> used? These hardcoded into configure script or this one provided by me with
> CFLAGS parameter ?
If the configure script conforms to the GNU Coding Standards, the one you
provide will take precedence.
In my experience, about 10% of configure scripts don't conform; these need
to be fixed (normally a trivial job).
> What will happen when gcc will get -march=i586 from script and
> -march=athlon-xp from me?
That depends, but the configure script *should* choose to pass GCC only
the one you chose, not the configure script's choice. (This is not GCC's
concern: it doesn't know where its command-line options came from!)
> Which optimization will be used when some of them are placed together? e.g.
> -mtune=pentium -march=athlon-xp.
Later command-line options override earlier ones, so whichever comes
last on the command-line will be used.
(By the way, this is off-topic on this list, which is for discussing the
development *of* GCC. The gcc-help@gcc.gnu.org list is the one to use for
questions about development *with* GCC.)
--
`The sword we forged has turned upon us
Only now, at the end of all things do we see
The lamp-bearer dies; only the lamp burns on.'