Hello,
On Fri, 19 Aug 2016 16:14:31 -0400, Rich Felker wrote:
Isn't it
like with librt? Usually you use -lrt when using any
advanced realtime functions from the C library.
And any tutorial you find with your favourite internet search engine
mentions to use -lpthread or -pthread when linking an application
which uses pthread.h.
So who is actually to blame for this situation that application
programmers try to use pthread.h without linking libpthread? :)
http://linux.die.net/man/7/pthreads
"On Linux, programs that use the Pthreads API should be compiled
using cc -pthread."
I agree but I think Thomas wants to avoid the need to patch/fix all
the broken application build systems out there.
I'm all for fixing things. But my fear is that it will probably be very
difficult to convince the different upstream project maintainers that
they *must* now link with libpthread.
Unless of course, we each time come up with a mechanism (autoconf
logic, CMake logic, etc.) that determines whether linking with
libpthread is needed or not.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com