From f6822be73a5c0ca8e5f7af99b2827a14c9f5403e Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 11 Jul 2019 20:43:32 +0100 Subject: [PATCH] Improve docs for --enable-libstdcxx-time=rt * doc/xml/manual/configure.xml: Improve documentation of --enable-libstdcxx-time option. From-SVN: r273421 --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/doc/xml/manual/configure.xml | 20 +++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 688615f48c9..69f5b86f301 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2019-07-11 Jonathan Wakely + * doc/xml/manual/configure.xml: Improve documentation of + --enable-libstdcxx-time option. + * include/bits/atomic_base.h (__atomic_impl): New namespace for wrappers around atomic built-ins. (__atomic_float, __atomic_ref): New class templates for use as base diff --git a/libstdc++-v3/doc/xml/manual/configure.xml b/libstdc++-v3/doc/xml/manual/configure.xml index d296c8d8a49..58587e858a4 100644 --- a/libstdc++-v3/doc/xml/manual/configure.xml +++ b/libstdc++-v3/doc/xml/manual/configure.xml @@ -166,18 +166,24 @@ --enable-libstdcxx-time=OPTION Enables link-type checks for the availability of the - clock_gettime clocks, used in the implementation of [time.clock], - and of the nanosleep and sched_yield functions, used in the + clock_gettime clocks, used in the implementation + of [time.clock], and of the nanosleep and + sched_yield functions, used in the implementation of [thread.thread.this] of the 2011 ISO C++ standard. The choice OPTION=yes checks for the availability of the facilities in libc and libposix4. In case it's needed the latter is also linked - to libstdc++ as part of the build process. OPTION=rt also searches - (and, if needed, links) librt. Note that the latter is not always - desirable because, in glibc, for example, in turn it triggers the - linking of libpthread too, which activates locking, a large overhead - for single-thread programs. OPTION=no skips the tests completely. + to libstdc++ as part of the build process. OPTION=rt also checks in + librt (and, if it's needed, links to it). Note that linking to librt + is not always desirable because for glibc it requires linking to + libpthread too, which causes all reference counting to use atomic + operations, resulting in a potentially large overhead for + single-threaded programs. OPTION=no skips the tests completely. The default is OPTION=auto, which skips the checks and enables the features only for targets known to support them. + For Linux targets, if clock_gettime is not used + then the [time.clock] implementation will use a system call to access + the realtime and monotonic clocks, which is significantly slower than + the C library's clock_gettime function. -- 2.30.2