http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45808
Summary: FreeBSD: -pthread is handled incompletely
Product: gcc
Version: 4.5.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: [email protected]
ReportedBy: [email protected]
On recent (and maintained) versions of FreeBSD it is required that shared
libraries using pthread functions are linked to libpthread. This was not the
case in older and now unsupported versions of the OS.
So, currently GCC on FreeBSD expands -pthread option to -lpthread only when
target is a final binary. When compilation target is a shared library -pthread
is ignored.
This needs to be fixed in -pthread specifications for FreeBSD.