From patchwork Thu Jul 11 19:45:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1130994 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-504950-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="xYM5Qbei"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45l64Z37BCz9s3l for ; Fri, 12 Jul 2019 05:46:22 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=kP0O1eYxQkO6qpfmUjO2pmbPI6wuGkL2BGJvs6aqQJfDMtZLhrlpy dPyom0EBiJjmhBIxyej/aHngpyiqVnRG7y8blpvmgSBd2wB6+TA0UrV3ulQkM7Oc 5A/vRP9LgiQJb2+mSnWlEyvWYjmayyDa1pGbkLyNBrp0y3Asb0UxmM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=Xojv8ZbdRM6cFALw1rYiuJb4W3w=; b=xYM5QbeiR71qpZaQ7U9e Yw1TefYKmIxZwTuywWzarRaUnW2mNjfHy7SjP9qv0m8OO0X4JArpoqegNdYj36DI L/Pl5X0sfXKbmhIG93+W05MYynwy7zy+GnF5d04Dx/A7XDdAsYdSDsCDfBxBAMmK 7vCtBRf4xqtO+vdsMw3a3jI= Received: (qmail 115584 invoked by alias); 11 Jul 2019 19:45:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 115398 invoked by uid 89); 11 Jul 2019 19:45:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2642, para X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Jul 2019 19:45:18 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DC8F0308A9E0; Thu, 11 Jul 2019 19:45:16 +0000 (UTC) Received: from localhost (unknown [10.33.36.106]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A71019C4F; Thu, 11 Jul 2019 19:45:16 +0000 (UTC) Date: Thu, 11 Jul 2019 20:45:15 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] Improve docs for --enable-libstdcxx-time=rt Message-ID: <20190711194515.GA27586@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.11.3 (2019-02-01) * doc/xml/manual/configure.xml: Improve documentation of --enable-libstdcxx-time option. Committed to trunk. commit 6a7d6b5ea112fd5c14d5af2394817178293ac934 Author: redi Date: Thu Jul 11 19:43:32 2019 +0000 Improve docs for --enable-libstdcxx-time=rt * doc/xml/manual/configure.xml: Improve documentation of --enable-libstdcxx-time option. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273421 138bc75d-0d04-0410-961f-82ee72b054a4 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.