On 02/01/2012 05:49 PM, Bob Friesenhahn wrote:

The libltdl module loader does need to load the dependency libraries
since the system might not do this at all, or might not do it fully or
correctly. It can't do this without knowing the libraries used. This has
been known to be a definite factor for C-language modules which link
with C++ libraries.

If Gary is reading this, I assume that his memory would be better than
mine and perhaps he can add some wisdom.

Note that the GCC maintainters closed the bug requesting -pthread still
add -lpthread even under -nostdlib as invalid.

I would have done the same.

The easiest fix is likely for libtool to know that if -pthread was
specified to the compiler that it should add -lthread while linking.

Well, I don't know why libtool insists on -nostdlib, but I think we should just give up on it and assume the compiler works.

If g++ creates output on any platform that is unable to find libstdc++ at runtime then that is a broken compiler, in my opinion.

It's easier by far to stop trying to second guess the compiler than adding more complications (translating -pthread to whatever the threads library is).

Peter


_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool

Reply via email to