Bug 14743 - clock_gettime et al from -lrt always bring in libpthread
Summary: clock_gettime et al from -lrt always bring in libpthread
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: Roland McGrath
URL:
Keywords:
: 14304 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-19 18:36 UTC by Roland McGrath
Modified: 2014-06-14 12:50 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


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