GNOME Bugzilla – Bug 563806
reduce unused direct dependencies
Last modified: 2009-06-01 03:11:18 UTC
ldd reports [mclasen@matthiasc devel]$ ldd -u -r /usr/lib/libcspi.so.0 Unused direct dependencies: /usr/lib/libXtst.so.6 /lib/libgmodule-2.0.so.0 /lib/libgthread-2.0.so.0 /lib/librt.so.1 /usr/lib/libSM.so.6 /usr/lib/libICE.so.6 /lib/libpthread.so.0 and similar for libspi and registryd. Here is a patch that reduces this overhead. It doesn't entirely eliminate it.
Created attachment 124238 [details] [review] patch
Created attachment 124321 [details] [review] additional patch accerciser can not be started after applying the patch. This patch can fix the problem.
That will probably add libSM and libICE back as unused direct deps of libatk-bridge.so. You probably want to change X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" in configure.in to X_LIBS="$X_LIBS -lX11"
Created attachment 124492 [details] [review] patch
Xtst detection is broken by the Comment #4 patch (as released in at-spi-1.26.0), which makes at-spi unbuildable for me (and probably most others with X11 libs installed somewhere other than the standard ld search paths): config.log reports: configure:15035: checking for X configure:15275: result: libraries /usr/X11R6/lib, headers /usr/X11R6/include [...] configure:17411: checking for XTestFakeKeyEvent in -lXtst configure:17446: gcc -o conftest -Os -I/sw/lib/fontconfig2/include -I/sw/include -L/sw/lib/fontconfig2/lib -L/sw/lib conftest.c -lXtst -lX11 -lXext >&5 /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: can't locate file for: -lXtst and X_LIBS correctly (for me) contains "-L/usr/X11R6/lib -lX11" The patch removed the line: LIBS="$LIBS $X_LIBS" just prior to the Xtst test, so the -L flag needed to find this x11 component is no longer passed. Maybe configure should distinguish x11ish lib linking -l flags, which can lead to unused dependencies, from lib searching -L flags, which have no harmful effect. After AC_PATH_XTRA, X_LIBS contains -L flags and then configure adds -lX11 to X_LIBS. Easiest solution is to add X_LIBS to LIBS prior to adding -lX11 to X_LIBS. That way all future lib tests get the -L flag, but no additional lib-linking is propagated.
Created attachment 135503 [details] [review] Propagate -L for x11