[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: athlon configuration impossibilty

From: Aaron Lehmann
Subject: Re: athlon configuration impossibilty
Date: Sun, 14 Oct 2001 23:19:23 -0700
User-agent: Mutt/1.3.20i

On Sun, Oct 14, 2001 at 10:22:58AM -0700, Aaron Lehmann wrote:
> BTW, preliminary analysis suggests that using gcc 3.0.2-pre makes the
> library much slower than with gcc 2.95.4-pre. I'll see if I can get
> more conclusive results. My tested consisted of running 'primes', and
> it took a lot more CPU time when gmp was compiled with gcc 3.x.

I think I've figured out why.

My gcc 3.0 binary is named gcc-3.0. So I was running
"CC=gcc-3.0 ./configure". It turns out that the configure script only
really optimizes well if the binary is named "gcc".

For example, an athlon target type is treated like this:

      athlon-*-*)   gmp_optcflags_gcc="-mcpu=pentiumpro";;

Then, these options are later tested, and if successful they are added
to the CFLAGS:

  # Try compiler flags that may work with only some compiler versions.
  # gmp_optcflags: All or nothing.
  eval optcflags=\$gmp_optcflags_$CC
  if test -n "$optcflags"; then 

The problem with this is that it will be testing
$gmp_optcflags_gcc-3.0, when these cflags were appended to
$gmp_optcflags_gcc. That causes the options never to be tested, and
thus never to be used, resulting of course in a much less optimized

reply via email to

[Prev in Thread] Current Thread [Next in Thread]