sys-devel/libtool-2.2.4: When creating shared libraries libtool adds dependencies of specified libraries which causes needless linking against additional libraries. sys-devel/libtool-1.5.26 works correctly.
Created attachment 156935 [details] libtool-1.log
Created attachment 156937 [details] libtool-2.log
Created attachment 156939 [details] libtool_test.c
(In reply to comment #1 and comment #2) There should be: $ scanelf -qF "%F: %n" .libs/libtool_test.so.0.0.0 Instead of: $ scanelf -qF %F: %n .libs/libtool_test.so.0.0.0
Maybe this is related to the following patch applied in debian: http://patch-tracking.debian.net/patch/series/view/libtool/2.2.2-1/link_all_deplibs.patch
Any progress in this bug?
any work to be done is going to be on the upstream mailing lists
any news?
I'm here from 2016 :) It seems that it is fixed for sys-devel/libtool-2.4.6, sys-devel/gcc-4.9.3 and x86_64 arch. Please confirm on other platforms. $ scanelf -qF "%F: %n" .libs/libtool_test.so.0.0.0 .libs/libtool_test.so.0.0.0: libapr-1.so.0,libaprutil-1.so.0,libc.so.6
make sure you aren't using the gold linker or --as-needed. both of those will fix up the excess linkage.
Yeah, you're right, I'm using LDFLAGS="-Wl,-O1 -Wl,--as-needed" But it's in default profile, so probably it's fixed on every installation (besides of custom LDFLAGS users)