|
From: | Peter O'Gorman |
Subject: | Re: Libtool mishandling of C++ libraries requiring -pthread |
Date: | Wed, 01 Feb 2012 21:31:57 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.22) Gecko/20110906 Fedora/3.1.14-1.fc14 Thunderbird/3.1.14 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |