Bug 14743 - clock_gettime et al from -lrt always bring in libpthread
: clock_gettime et al from -lrt always bring in libpthread
Status: RESOLVED FIXED
Product: glibc
Classification: Unclassified
Component: libc
: 2.17
: P2 normal
: ---
Assigned To: Roland McGrath
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-10-19 18:36 UTC by Roland McGrath
Modified: 2013-01-15 14:34 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland McGrath 2012-10-19 18:36:40 UTC
Just using clock_gettime in a dynamically linked program requires -lrt.
librt.so depends on libpthread.so, so such programs wind up loading libpthread
even if they have no need for it.  This enables libstdc++ locking code and the
like, slowing down single-threaded programs that only wanted clock_* calls.
Comment 1 Roland McGrath 2012-10-24 21:53:14 UTC
Implemented.  Cannot be backported.
Comment 2 Andreas Schwab 2013-01-15 14:34:56 UTC
*** Bug 14304 has been marked as a duplicate of this bug. ***