Hi, I recently encountered the problem that the patch "threadlib: Fix LIBMULTITHREAD on platforms where --as-needed is enabled" was intended to fix. But unfortunately, the fix doesn't actually work because libtool is re-ordering the linker commands. In particular "$stuff -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state" becomes "-Wl,--push-state -Wl,--no-as-needed -Wl,--pop-state $stuff -lpthread" which obviously doesn't achieve anything at all.
I googled a bit and found a 12 year old Debian bug complaining about this ( https://bugs.debian.org/347650) but no indication that anything has changed in libtool in this area. Does anyone on this list have an idea for how to work around this? Cheers, mwh