AlphaHeX wrote:I'm using the following LDFLAGS:
Code: Select all
LDFLAGS="-Wl,-O2 -Wl,--relax -Wl,--enable-new-dtags -Wl,--sort-common -Wl,-s,-Wl,--as-needed"
I'm also using per package CFLAGS and LDFLAGS as described here:
http://forums.gentoo.org/viewtopic-t-28 ... ight-.html
Could you please tell me if -Wl,-O2 is giving more speedup that -Wl,-O1. I have also another question if LDFLAGS I'm using are giving some speed improvement or I should use only these new as -hashvals, -Bdirect and -zdynsort ?
No, -Wl,-O2 doesnt optimize any more than -Wl,-O1........O1 is the highest for the LDFLAGS. Anything over -O1 just gets optimized at -O1 so it wont hurt if you have something higher but it wont help either.
I would use these LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,-Bdirect -Wl,-hashvals -Wl,-zdynsort"
I also use the -Wl,--as-needed flag but some ppl say it isnt stable....( i have only come across 1 package that didnt work with it)
Bdirect is probably the flag that speeds up the most out of all the LDFLAGS
just make sure if you use bdirect you get binutils-2.16.91.0.6 with the bdirect patch or else it wont work