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

Re: [OT] Proper gcc -march for Athlon/Duron CPU?

On Tue, Apr 02, 2002 at 08:43:46AM -0500, Thomas J. Hamman wrote:
> What is the proper -march to use when compiling with gcc and optimizing
> for a Duron or Athlon CPU?  What man page lists the available options?
> I search for 'march' in gcc's man page finds nothing.

It's in the man page for gcc-3.0 in testing/unstable:

           Assume the defaults for the machine type cpu-type when
           scheduling instructions.  The choices for cpu-type are
           i386, i486, i586, i686, pentium, pentiumpro, k6, and

           While picking a specific cpu-type will schedule things
           appropriately for that particular chip, the compiler
           will not generate any code that does not run on the
           i386 without the -march=cpu-type option being used.
           i586 is equivalent to pentium and i686 is equivalent
           to pentiumpro.  k6 is the AMD chip as opposed to the
           Intel ones.

           Generate instructions for the machine type cpu-type.
           The choices for cpu-type are the same as for -mcpu.
           Moreover, specifying -march=cpu-type implies

For gcc-2.95, you'll have to look at the info documentation. Use Ctrl-S
to search through all nodes - '/' only searches through the current
node, which isn't terribly useful in this case.

> So, I tried googling and several documents suggest '-march=athlon', but
> that doesn't work for me (I've tried in gcc 2.95.4 in sid and 2.95.3 in
> an LFS installation).  So I've been using -march=k6 instead; but, then I
> noticed in my latest kernel recompilation that it was compiling with
> i686 when I chose Athlon/Duron in the config.  Bah.

You'll need to have gcc-3.0 installed and CC set to that before the
kernel Makefile will use -march=athlon. I'm not sure that gcc-3.0
generates reliable kernels yet, though.

Colin Watson                                  [cjwatson@flatline.org.uk]

To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: