On Thu, 2005-03-31 at 22:29 +0100, Chris Lord wrote: >> An interesting article on OS-News recently: >> http://www.osnews.com/story.php?news_id=10152 >> >> The short of it is there's a gcc option '--as-needed' that tells the >> linker to only link to libraries that are used, as opposed to the ones >> that have been explicitly set as dependencies (or at least, that's how >> I've interpreted it, I may be wrong). >> >> It might be worth giving it a go and seeing if it reduces executable >> sizes for gpe apps - It would be very easy to do this in OE, for >> example, by adding the --as-needed flag to >> openembedded/classes/cross.bbclass CFLAGS, I think. >> >> Would anyone like to experiment with this, or explain how this doesn't >> help/is a bad thing? It won't reduce executable size by anything more than a trivial amount (a few tens of bytes, maybe). This optimization is aimed at reducing startup time and the number of binary dependencies, by eliminating unneeded shared libraries that would otherwise be dragged in by pkgconfig and libtool. (In the particular case of GPE apps, it probably won't do much of anything, because they tend to be fairly careful about their library dependencies anyway.) All that said, it is not a bad thing. It would certainly be worth playing with this flag, if for no other reason than to check that it doesn't break anything. I think you want to add it to LDFLAGS in bitbake.conf, not to cross.bbclass. p. _______________________________________________ GPE mailing list GPE@handhelds.org http://handhelds.org/mailman/listinfo/gpe