Summary: FreeBSD: -pthread is handled incompletely
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
This needs to be fixed in -pthread specifications for FreeBSD.