Bug 14743

Summary: clock_gettime et al from -lrt always bring in libpthread
Product: glibc Reporter: Roland McGrath <roland>
Component: libcAssignee: Roland McGrath <roland>
Status: RESOLVED FIXED    
Severity: normal CC: ajax, drepper.fsp, jwakely.gcc
Priority: P2 Flags: fweimer: security-
Version: 2.17   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

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. ***