bur wrote:It's been quite a while since I did a full update of my system, so I was wondering if there are any news on the cflags-front...
I have a Duron Morgan, which is identical to an Athlon XP when it comes to compiling.
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
LDFLAGS="-Wl,-O1"
Is there anything I could/should change to get better performance or stability?
Also I wonder if someone already did a run with Acovea for an Athlon XP and can say what cflags it suggests as being fastest.
I'm doing a new install right now on an athlon-xp laptop and intentionally trying to break my system to see which LDFLAGS and CFLAGS break which packages. And while I normally completely trust nxsty's opinion, I think I might give profiles a try.
It does seem to be perfectly suited from Gentoo, at least from what the GCC manuals reads to me.
-fprofile-generate
Enable options usually used for instrumenting application to produce profile useful for later recompilation with profile feedback based optimization. You must use -fprofile-generate both when compiling and when linking your program.
The following options are enabled: -fprofile-arcs, -fprofile-values, -fvpt.
Obviously, we use our computers, and we recompile when new versions come out. Why not generate profiles so that the next compile will be automatically more optimized? Is there a reason not to use this that I'm not aware of?
Code: Select all
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -ftracer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
CXXFLAGS="${CXXFLAGS} -ffriend-injection"
CXXFLAGS="${CXXFLAGS} -fvisibility-inlines-hidden"
#LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-Bdirect"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-Bdirect -Wl,-hashvals -Wl,-zdynsort"
Again, as you can see, I'm purposely trying to see what LDFLAGS especially break what packages. If only a few packages break with certain flags, then I will filter then with a packages.ldflags file and a bashrc script. If tons break because of a certain flag, then I'll remove it. But individually, people seem quite happy with --sort-common, --as-needed, -Bdirect, -hashvals and -zdynsort. Why not be stupid and try them all?
Nihilism makes me smile.