What you guys make of these optimizations? I know -ffast-math can be dodgy but it's supposed to be stable enough for a ~x86 desktop box, plus from what I hear there's a noticable performance increase. I omitted -funroll-loops because of the problems I've heard it can cause with the kernel (Im building the kernel and bootstrapping with very basic flags anyway), and the amount of bloat it creats.
My cpu is a Intel Celeron (Northwood P4 core), so it's basically a pentium 4 with a **** cache.
CFLAGS="-O3 -pipe -finline-functions -fgcse -fmove-all-movables -fomit-frame-pointer
-falign-functions=4 -falign-jumps=4 -fvisibility-inlines-hidden -fweb -fmerge-all-constants
-ffast-math -ftracer -fprefetch-loop-arrays -march=pentium4 -mtune=pentium4"
is what I have for my PII 300MHz machine.
CFLAGS="-O3 -march=pentium2 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
Something like this:
I don't think I've compiled an entire system with -O3 before, but I've used -O2 and -Os.
CFLAGS="-Os -march=atlhon-tbird -fomit-frame-pointer -pipe -mmmx -m3dnow -fforce-addr
I used to use -ffast-math, but I removed it after seing the warning in the GCC manual. Can you notice a huge performance gain?
Just regular stuff, since what I compile must be usable on other boxes too.
CFLAGS="-O2 -march=i486 -mcpu=i686"
mine's pretty simple:
it's a dual-cpu machine...
CFLAGS="-march=athlon-mp -mfpmath=sse -m3dnow -m32 -pipe -O3 -fomit-frame-pointer"