[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool breaks versioning information on symbols in libpthread.
From: |
Carlo Wood |
Subject: |
libtool breaks versioning information on symbols in libpthread. |
Date: |
Fri, 25 Jan 2002 00:51:21 +0100 |
User-agent: |
Mutt/1.2.5i |
When compiling a shared library that uses threads, I pass
-pthread to the compiler as option. There is no need to
pass -lpthread to the compiler in that case.
Also libtool does not pass -lpthread when not explicitely
provided by the user.
This leads to a very nasty bug that is hard to spot/find:
Because there is no -lpthread during linking of the shared
library, there is no versioning information available.
As a result, functions that are a part of this library will
call the wrong (old) functions.
There are two solutions:
1) Libtool should pass -lpthread to the linking stage
when it spots -pthread as argument.
2) Get gcc to do that itself.
I don't think that 2) is a reasonable option from YOUR point
of view, because that would mean that libtool will stay BROKEN
until this is added to -say- gcc-3.1, and even then continuous
to be broken for all older compiler versions.
--
Carlo Wood <address@hidden>
PS Attached the last mail from H.J.Lu who found the
solution to this problem (see binutils mailing
archive if you want more details).
msg.hAf
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- libtool breaks versioning information on symbols in libpthread.,
Carlo Wood <=