[oe] [RFC] Enable --hash-style=both for all recent gcc4 targets

Phil Blundell pb at reciva.com
Wed Oct 15 08:54:41 UTC 2008


On Wed, 2008-10-15 at 10:22 +0200, Holger Freyther wrote:
> I would start linking everything with -Wl,--hash-style=both as this is said to 
> speed up the loading of shared libraries by about 50% (google is your 
> friend). This is an option for binutils and was introduced with binutils 
> 2.17. Now there are two ways to achieve this:

If you are using a modern GNU runtime then I think it should be safe to
just select --hash-style=gnu.  This will give you the speed improvement
without the space penalty of two hashes.

> Change TARGET_LDFLAGS in e.g. the distro config (as this knows if binutils has 
> this option available) or to change the "specs" of gcc to enable this by 
> default. There is a patch from debian for gcc4.3 but it is leaving 
> arm/armeabi out. What do you guys prefer?

I guess you might as well put it in TARGET_LDFLAGS.  That's the less
intrusive change and there are already plenty of other flags there.

> Again there are two ways. Use force and bump PE 
> on each package but we should avoid this. I propose to rename PR to FILE_PR 
> and change PR  to "${FILE_PR}${DISTRO_PR}" so everytime a distro is changing 
> something that effects every package we can bump (e.g. Setting DISTRO_PR 
> to .1 for Openmoko).

I think this is an excellent plan.  As you say, PE changes are not
something to be done frivolously.

p.






More information about the Openembedded-devel mailing list