Or --march=athlon64 I'm running the x86 (32bit) version of Gentoo on my Athlon 64 and when I did emerge -u world, gcc complained that it could not create an executable and refused to install until I changed the --march (from k8 to i686 I think.) Now when I try to emerge new packages, it's still rejecting k8 and athlon64. Here's some output: (athlon64) i686-pc-linux-gnu-gcc -O2 -march=athlon64 -m32 -ftracer -fomit-frame-pointer -pipe -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o example.o example.c i686-pc-linux-gnu-gcc -O2 -march=athlon64 -m32 -ftracer -fomit-frame-pointer -pipe -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o adler32.o adler32.c cc1: error: bad value (athlon64) for -march= switch cc1: error: bad value (athlon64) for -mcpu= switch make: *** [example.o] Error 1 make: *** Waiting for unfinished jobs.... cc1: error: bad value (athlon64) for -march= switch cc1: error: bad value (athlon64) for -mcpu= switch make: *** [adler32.o] Error 1 (and here's --march-k8, which was working fine under 3.3.4) Checking for mmap support... No. i686-pc-linux-gnu-gcc -O2 -march=k8 -m32 -ftracer -fomit-frame-pointer -pipe -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o example.o example.c cc1: error: bad value (k8) for -march= switch cc1: error: bad value (k8) for -mcpu= switch make: *** [example.o] Error 1
Sorry, but this is nonsense. -march=(k8|athlon64|opteron) is not supposed to work with <gcc-3.4. It _can't_ work, as it was only introduced by gcc-3.4.0. Marking as INVALID.
Sorry, but it *did* work with gcc-3.3.4. In fact, I emerged the old package (3.3.4-r1) and: nil / # gcc -march=k8 test.c -o test.o nil / # gcc -march=k9 test.c -o test.o cc1: error: bad value (k9) for -march= switch cc1: error: bad value (k9) for -mcpu= switch nil / # gcc --version gcc (GCC) 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Notice that 'k9' failed, so it's not just ignoring the option. If 'k8' actually does anything useful, I don't know, but it did not choke and die...
I don't know why it works with 3.3.4, but it is not supposed to work with any of gcc-3.3.x. -march=k8 was introduced in version 3.4.0 of gcc. You can start googling for "march k8 gcc config" and you will find a commit message from gcc CVS.
it worked with 3.3.4 because we added patches to support amd64 however, amd64 now uses 3.4.x which means we dropped it from 3.3.5