This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB problem with statically linked application
On Tue, Sep 20, 2005 at 12:08:03PM -0700, David Highley wrote:
> I see that you have fallen into the same compiler trap we have just
> discovered. It appears to never be correct to use the flag "-lpthread"
> when using the compiler. You should always use "-pthread". This flag is
> used in the preprocessor to turn on different code generation and the
> reentrancy options. But....
Sorry, but welcome to the modern world. On most platforms -pthread
does nothing useful except -lpthread. It also defines -D_REENTRANT,
and on GNU/Linux this flag does nothing at all.
On some other operating systems (Solaris maybe?) it does more. In that
case using -pthread is correct, or defining the relevant options (found
in the system documentation) yourself.
--
Daniel Jacobowitz
CodeSourcery, LLC