gcc and -mcpu -march=athlon switch

Jeroen Coumans jeroencoumans at hotmail.com
Sat Nov 17 23:06:45 PST 2001

----- Original Message -----
From: "Lee Harris" <harris.lee at ntlworld.com>
To: <lfs-support at linuxfromscratch.org>
Sent: Sunday, November 18, 2001 3:31 AM
Subject: gcc and -mcpu -march=athlon switch

> Hi all
> If I compile on the mandrake 8.0 distribution I'm building LFS with, I can
> use the athlon switch with -mcpu & -march. When I try with LFS get an
> error during configure saying 'C compiler cannot create executables'
> If I try to compile a little bit of test code
> bash-2.05# cat > conftest.c << EOF
> >
> > #line 1029 "configure"
> > #include "confdefs.h"
> >
> > main(){return(0);}
> > EOF
> bash-2.05# gcc -mcpu=athlon conftest.c
> I get this error
> cc1: bad value (athlon) for -mcpu= switch
> What do I have to do or get to allow me to optimize for the athlon ?
> The gnu manual at http://gcc.gnu.org/onlinedocs/gcc_3.html#SEC35
> states
> ---
> -mcpu=cpu-type
>  Assume the defaults for the machine type cpu-type when scheduling
> instructions. The choices for cpu-type are `i386', `i486', `i586', `i686',
> `pentium', `pentiumpro', `pentium4', `k6', and `athlon'
> ---
> k6 works for me yet athlon doesn't ?
> (I've searched on the web and Its seems lots of people can do this but I
> can't find out how)
> lfs-20011027
LFS uses gcc-2.95.3, which doesn't have the m{cpu,arch}=athlon option. If
you desperately want it, try installing gcc-3.02 (which is the latest
version AFAIK) alongside gcc-2.95.3. Many packages aren't compatible with
the 3.x series yet, so YMMV. There's an lfs-hint which explains how to do
this, look at www.hints.linuxfromscratch.org.
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list