"-pthread" == "-lpthread" for shared libs in -CURRENT

Kris Kennaway kris at obsecurity.org
Sat Jun 2 16:36:09 UTC 2007


On Sat, Jun 02, 2007 at 01:29:47AM +0300, Vladimir Kushnir wrote:
> Hello, guys.
> 
> In post-gcc42 -CURRENT:
> 
> cc -shared -fPIC -o libmts.so mtest.c -lm -pthread
> ldd ./libmts.so
> ./libmts.so:
>         libm.so.5 => /lib/libm.so.5 (0x800b01000)
>         libthr.so.3 => /lib/libthr.so.3 (0x800c1b000)
> 	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>         libc.so.7 => /lib/libc.so.7 (0x800631000)
> 
> Is this behaviour bug or feature?

Feature.  Look at libpthread to see why.

Kris


More information about the freebsd-current mailing list