After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 656229 - using --as-needed in LDFLAGS is not respected and it links on unneeded libs
using --as-needed in LDFLAGS is not respected and it links on unneeded libs
Status: RESOLVED INCOMPLETE
Product: gnome-control-center
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-08-09 17:44 UTC by Ionut Biru
Modified: 2011-12-07 21:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ionut Biru 2011-08-09 17:44:16 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"
Comment 1 Bastien Nocera 2011-09-06 13:54:03 UTC
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.
Comment 2 Akhil Laddha 2011-10-21 05:45:14 UTC
Ionut, can you please respond to comment#1 ?
Comment 3 Fabio Durán Verdugo 2011-12-07 21:27:45 UTC
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!