[CLUE-Tech] Athlon = i686 in kernel 2.4.7 Makefile

Timothy C. Klein teece at silverklein.net
Sun Mar 24 14:11:05 MST 2002


* Dave Anselmi (anselmi at americanisp.net) wrote:
> "Jed S. Baer" wrote:
> 
> > Hi Folks.
> >
> > I think this is the last strangeness from the RH7.2 upgrade. Searching
> > through the kernel mailing list archive, I see speculation on why make
> > would write -march=i686 instead of march=athlon, but no real explanations
> > about compiler bugs or capabilities, related to using gcc 2.96 for kernel
> > compiles.
> 
> IIRC, gcc 2.x doesn't have athlon support.  gcc 3.x is the first place that
> option shows up.  Now, should you use i586, i686, or k6?  I don't know and
> I've never found a discussion of how to decide.
> 
> It was suggested to me that the athlon architecture, because of pipelining or
> some such, was different than k6 so i686 was the way to go.  But when I asked
> how to tell, or how to know whether -malign-functions=4, e.g., was a good
> idea, I got nothing.
> 
> Maybe someone should write a "GCC Optimizations for Dummies".
> 

I found this as the 'best' optimizations for the Athlon.  Here is the
script I use if I want Athlon opts (which I rarely do):


#---
#!/bin/bash

export CC=gcc-3.0
export CFLAGS="-s -O3 -fomit-frame-pointer -Wall -march=athlon -mcpu=athlon \
   -malign-functions=4 -funroll-loops -fexpensive-optimizations \
   -malign-double -fschedule-insns2"
#---

Here is the source, but if I use all of these, I can never get anything
to compile.  Looks like -mwide-multiply is the culprit troublemaker.
This wep page apparently wasn't wriiten with GCC 3.0, as it doesn't use
the athlon arch.

#---
CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall
-mmpentiumpro -march=mpentiumpro -malign-functions=4
-funroll-loops -fexpensive-optimizations -malign-double
-fschedule-insns2 -mwide-multiply
#---

from http://AboutLinux.com/art_k7opt1_e.html

I have had mixed results getting things to compile with Athlon opts.  I
havn't ever been able to get the kernel to compile with that first
script.

Tim
--
==============================================
== Timothy Klein || teece at silverklein.net   ==
== ---------------------------------------- ==
== "Hello, World" 17 Errors, 31 Warnings... ==
==============================================



More information about the clue-tech mailing list