GNOME Bugzilla – Bug 656229
using --as-needed in LDFLAGS is not respected and it links on unneeded libs
Last modified: 2011-12-07 21:27:45 UTC
Lets take an as example /usr/lib/control-center-1/panels/libprinters.so and notice the soname that link to this file. readelf -d /usr/lib/control-center-1/panels/libprinters.so | grep NEEDED | wc -l returns 38 In total the gnome-control-center in arch, link on 437 sonames. Fedora has a hack in their spec similar with the one from gtk+ but more complicated. http://pkgs.fedoraproject.org/gitweb/?p=control-center.git;a=blob;f=control-center.spec;h=3ce220f6a961ef317731e1cdece4253b3c48d3f7;hb=HEAD#l131 In my opinion this issue should be fixed upstream instead of packaging. After applying that current hack, libprinters.so link on 12 soname and in total the package link on 200 sonames. A decrease of linkage of more than 50% System information: binutils 2.21.1-1 libtool 2.4 gcc 4.6.1 CFLAGS="-march=i686 -mtune=generic -O2 -pipe" CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe" LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"
What's the point you're trying to make here? Is there a patch coming? I'm certainly not going to take something which changes the linkage style for all the platforms.
Ionut, can you please respond to comment#1 ?
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!