|
Those flags are for gcc-3.x and alike (mostly gcc-3.0, gcc-3.1.1 and gcc-3.2), you may check which gcc you're using with the following command : How to know your gcc version
[PHP]#gcc --version[/PHP]
You can know which CPU you have with the following command : How to know your CPU type
[PHP]cat /proc/cpuinfo[/PHP]
Ok, you really want to optimize your box to death, even if that means spending times experimenting stuff, and sometimes breaking your box ? Eventually, the flags combination that prove stable here will go on the safe flag page If you can't see any line here, that means nobody has reported either success or failure with any flags... wanna test ? The first thing you want to test are the following flags (don't forget to add -pipe -O3 -march=XXX -fomit-frame-pointer, which is the bare minimum)
[PHP]-fprefetch-loop-arrays
-ffast-math
-fforce-addr (-fforce-mem is implied by -O3)
-falign-functions=4
-funroll-loops ( bigger exe, maybe faster, usually not worth it, I don't use it) [/PHP]
The following flags have been reported to work with gentoo 1.4 (gcc-3.2). The CHOST is unrelated to compiler flags, you should use the exact same one as found on the safe flags page
note : -fstrict-aliasing -fexpensive-optimizations -force-mem -frerun-loop-opt -frerun-cse-after-loop are implied by -O3, see the FAQ
--------------------------------------------------------------------------------
Pentium III (Intel)
[PHP]CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer
-fforce-addr -falign-functions=4 -fprefetch-loop-arrays"
CXXFLAGS="${CFLAGS}"[/PHP]
note : -mmmx, -msse are implied by -march=pentium3
--------------------------------------------------------------------------------
Athlon (AMD)
[PHP]CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer
-ffast-math -funroll-loops -fforce-addr -falign-functions=4"
CXXFLAGS="${CFLAGS}"[/PHP]
note : -m3dnow and -mmmx optimisations are implied by -march=athlon
Athlon-tbird, aka K7 (AMD)
[PHP]CFLAGS="-march=athlon-tbird -O3 -pipe -fforce-addr -fomit-frame-pointer
-funroll-loops -falign-functions=4 -maccumulate-outgoing-args"
CXXFLAGS="${CFLAGS}"[/PHP]
note : -m3dnow and -mmmx optimisations are implied by -march=athlon-tbird
Someone reported having a system working with no problem on an Athlon XP 2000+ with : Athlon XP 2000+
[PHP]CFLAGS="-march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3
-pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop
-frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math
-fprefetch-loop-arrays"
CXXFLAGS="${CFLAGS}"[/PHP] |
|