-lpthread -lstdc++ crashes on IRIX 6.5
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Tue Feb 22 20:50:00 GMT 2011
"Peter O'Gorman" <pogma@thewrittenword.com> writes:
> On Mon, Feb 21, 2011 at 07:24:00PM -0600, Peter O'Gorman wrote:
>>
>> While I agree with all of this, adding -lpthread to the link line as
>> well as -pthread should not cause the resulting application to crash.
>>
>> I see I never got to that in my original mail, sorry :(. Even if we
>> consistently use -pthread for compiling and linking with gcc, we
>> sometimes end up with a -lpthread on the link line (often because
>> libtool has it in some .la files dependency_libs, sometimes due to
>> pkgconfig), and when that happens the resulting application crashes at
>> launch.
>
> This patch (for gcc-4.4, but if this is the right way to go, we will
> forward port) works around the issue. Is it the correct approach? Or
> perhaps the problem is specific to our build of gcc-4.4 on IRIX?
Sorry for chiming in so late: I've been off for an extended weekend.
No, I don't think this is the right approach, but just a hack: if
libstdc++ needs the full/real libpthread to work on IRIX (which I assume
is the case, just as on Tru64 UNIX), it should be linked with it
directly instead of hacking around in the driver. If the library is
properly self-contained (as it should), it doesn't depend on being
linked with g++, but works with the gcc driver as well.
I'll check this out soon, but now it's time for bed.
Could you file a PR for this issue in the meantime and Cc: me?
Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Gcc-help
mailing list