gcc 3.4.1 and CPU optimization
Nix
nix@esperi.org.uk
Wed Dec 1 07:24:00 GMT 2004
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.'
More information about the Gcc
mailing list