On 30-07-2012 09:27:00 -0500, Bob Friesenhahn wrote:
> Yesterday I took the link command that libtool was generating and 
> removed -lc from it.  GCC still produced -lc in its collect2 
> invocation.

it should, see link_gcc_c_sequence

> It seems that there are at least two issues.  In some cases libtool is 
> putting -lc into the .la files and in some cases (I am suspecting 
> pthreads) GCC injects -lc.

when used as -pthread, GCC wil do whatever is necessary to link
correctly, and is much preferred over -lpthread

What I see happening is that GCC emits this when -pthread is in use:
  -lstdc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc

I think libtool only injects -lc if it was actually explicitly given, or
do you suspect it to do otherwise?

Fabian

-- 
Fabian Groffen
Gentoo on a different level

Attachment: signature.asc
Description: Digital signature

Reply via email to