-lpthread vs -pthread: does -D_REENTRANT matter?
Eitan Adler
lists at eitanadler.com
Mon Oct 8 16:17:39 UTC 2012
The only difference between -lpthread and -pthread that I could see is
that the latter also sets -D_REENTRANT.
However, I can't find any uses of _REENTRANT anywhere outside of a few
utilities that seem to define it manually.
Testing with various manually written pthread programs resulted in
identical binaries, let alone identical results.
Is there an actual difference between -pthread and -lpthread or is
this just a historical artifact?
--
Eitan Adler
More information about the freebsd-hackers
mailing list