From patchwork Thu May 23 14:02:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 245953 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 62DA82C0182 for ; Fri, 24 May 2013 00:02:44 +1000 (EST) 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:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=Xb0Kd0zV+Yk4NK9WX L5dIpZv5eXILewu1Q0y/B0DAzsBQjxnzTTkRbu/wR+iEsnELg2LpjF0OYCKGzmLN tE1/eUPIjk6z3yWsSqRqddqf4oozuEMGhRQIXfRHj/cAOdOko+0EXVT3t9J8tfQ6 yZGzoodDqSM7JeM6JaKQgQus8Q= 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:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=fkeP+3NMXTVJwTG4oA87DxV VMIc=; b=CphnWpLYrBt3HW3B1Y+enx/gbv0xWY88RrI0l9aW47x2cjDnO2Q64en ZByDNfzNnESrdhYcE42jw6PIQrkDgch/ie5/7yPo0/0w072oyJ/h7S13plm0bgsR 6cKGzCSftH7Ow3BE3bECpVWFw3VBy326URHtAZzed8BKEYKaWyf0= Received: (qmail 27624 invoked by alias); 23 May 2013 14:02:36 -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 27605 invoked by uid 89); 23 May 2013 14:02:35 -0000 X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL, BAYES_00, KAM_STOCKGEN, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS, TW_CX, TW_DC autolearn=no version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 23 May 2013 14:02:32 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4NE2S96002580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 May 2013 10:02:28 -0400 Received: from zalov.cz (vpn-60-240.rdu2.redhat.com [10.10.60.240]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4NE2QYs020445 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 May 2013 10:02:27 -0400 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.cz (8.14.5/8.14.5) with ESMTP id r4NE2NNA009611; Thu, 23 May 2013 16:02:24 +0200 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r4NE2Kt6009609; Thu, 23 May 2013 16:02:20 +0200 Date: Thu, 23 May 2013 16:02:18 +0200 From: Jakub Jelinek To: Jonathan Wakely Cc: Benjamin Kosnik , Paolo Carlini , libstdc++ , gcc-patches , Rainer Orth Subject: Re: [patch] Default to --enable-libstdcxx-time=auto Message-ID: <20130523140218.GW1377@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <519C9AF5.8090300@oracle.com> <519C9CBC.4050606@oracle.com> <519C9E3B.60609@oracle.com> <20130522111543.GG1377@tucnak.redhat.com> <20130522123540.GH1377@tucnak.redhat.com> <20130523102827.GV1377@tucnak.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) On Thu, May 23, 2013 at 01:04:36PM +0100, Jonathan Wakely wrote: > > I mean something like completely untested following patch, then it would > > be pretty much enabled for all non-prehistoric Linux builds (there is a risk > > of it returning garbage on 2.4.x and earlier kernels, if you compile it on > > something that defines __NR_clock_gettime in their headers, but the exact > > same risk is if you do the same with --enable-libstdcxx-time=rt > > (clock_gettime wrapper in glibc will return -1/ENOSYS in that case, so will > > the syscall, but chrono.cc seems to ignore that return value)). > > 2.6+ kernels (2004-ish and later or so) should support CLOCK_MONOTONIC just > > This looks great to me, thanks. > > > fine. Of course, there is a possibility of fallback, at least for the > > clock_gettime/syscall CLOCK_RUNTIME or gettimeofday, if they fail, fall > > through into the time case, and for CLOCK_MONOTONIC perhaps just lie and > > return time as well, shouldn't really affect almost anybody. > > We should consider doing that yes, but it's less urgent. > > > Still, the ABI question is there, would we want to apply to 4.8.1 (can we > > get agreement on that RSN, this is pretty much the only blocker for 4.8.1 > > rc2 right now) and, would we export that symbol as @@GLIBCXX_3.4.18 (with > > all trunk @@GLIBCXX_3.4.18 symbols moved to 3.4.19) and add @GLIBCXX_3.4.17 > > alias for backwards compatibility with those that configured with > > --enable-libstdcxx-time=rt ? > > I like that plan. So, here is an untested 4.8 branch patch. The @GLIBCXX_3.4.17 + @@GLIBCXX_3.4.19 stuff gets ugly, I admit, but don't have other solution. Tested just that it compiles/links, abi list looks good and abi.exp testing, haven't actually tried to test it more than that. For the trunk the patch will need some adjustments (basically, rename everything GLIBCXX_3.4.19 to GLIBCXX_3.4.20 first). 2013-05-23 Jakub Jelinek * src/c++11/chrono.cc: If _GLIBCXX_USE_CLOCK_MONOTONIC_SYSCALL, include unistd.h and sys/syscall.h. If _GLIBCXX_COMPATIBILITY_CXX0X, don't define system_clock::is_steady, system_clock::now() and steady_clock::is_steady. (std::chrono::system_clock::now()): If _GLIBCXX_USE_CLOCK_MONOTONIC_SYSCALL, call syscall (SYS_clock_gettime, ...) instead of clock_gettime (...). (std::chrono::system_clock::now()): Likewise. Add weak attribute if _GLIBCXX_COMPATIBILITY_CXX0X and compatibility-chrono.cc will be non-empty. * src/Makefile.am (cxx11_sources): Add compatibility-chrono.cc. (compatibility-chrono.lo, compatibility-chrono.o): New goals. * src/c++11/compatibility-chrono.cc: New file. * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): On linux*, check for syscall (SYS_clock_gettime, CLOCK_MONOTONIC, &tp). * testsuite/util/testsuite_abi.cc (check_version): Add GLIBCXX_3.4.19 version and make it the latest. * config/abi/pre/gnu.ver (_ZNSt6chrono12steady_clock3nowEv): Export also @@GLIBCXX_3.4.19. * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Regenerated. * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Regenerated. * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Regenerated. * config.h.in: Regenerated. * src/Makefile.in: Regenerated. * configure: Regenerated. Jakub --- libstdc++-v3/src/c++11/chrono.cc.jj 2013-03-16 08:07:57.000000000 +0100 +++ libstdc++-v3/src/c++11/chrono.cc 2013-05-23 15:33:07.238690149 +0200 @@ -32,13 +32,18 @@ defined(_GLIBCXX_USE_GETTIMEOFDAY) #include #endif +#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC_SYSCALL +#include +#include +#endif namespace std _GLIBCXX_VISIBILITY(default) { namespace chrono { _GLIBCXX_BEGIN_NAMESPACE_VERSION - + +#ifndef _GLIBCXX_COMPATIBILITY_CXX0X constexpr bool system_clock::is_steady; system_clock::time_point @@ -47,7 +52,11 @@ namespace std _GLIBCXX_VISIBILITY(defaul #ifdef _GLIBCXX_USE_CLOCK_REALTIME timespec tp; // -EINVAL, -EFAULT +#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC_SYSCALL + syscall(SYS_clock_gettime, CLOCK_REALTIME, &tp); +#else clock_gettime(CLOCK_REALTIME, &tp); +#endif return time_point(duration(chrono::seconds(tp.tv_sec) + chrono::nanoseconds(tp.tv_nsec))); #elif defined(_GLIBCXX_USE_GETTIMEOFDAY) @@ -61,16 +70,29 @@ namespace std _GLIBCXX_VISIBILITY(defaul return system_clock::from_time_t(__sec); #endif } +#endif #ifdef _GLIBCXX_USE_CLOCK_MONOTONIC +#ifndef _GLIBCXX_COMPATIBILITY_CXX0X constexpr bool steady_clock::is_steady; +#endif +#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \ + && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ + && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) \ + && !defined(_GLIBCXX_COMPATIBILITY_CXX0X) + __attribute__((__weak__)) +#endif steady_clock::time_point steady_clock::now() noexcept { timespec tp; // -EINVAL, -EFAULT +#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC_SYSCALL + syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &tp); +#else clock_gettime(CLOCK_MONOTONIC, &tp); +#endif return time_point(duration(chrono::seconds(tp.tv_sec) + chrono::nanoseconds(tp.tv_nsec))); } --- libstdc++-v3/src/Makefile.am.jj 2013-03-22 15:05:13.000000000 +0100 +++ libstdc++-v3/src/Makefile.am 2013-05-23 15:18:13.030217244 +0200 @@ -50,7 +50,8 @@ cxx98_sources = \ cxx11_sources = \ compatibility-c++0x.cc \ compatibility-atomic-c++0x.cc \ - compatibility-thread-c++0x.cc + compatibility-thread-c++0x.cc \ + compatibility-chrono.cc libstdc___la_SOURCES = $(cxx98_sources) $(cxx11_sources) @@ -97,6 +98,11 @@ compatibility-thread-c++0x.lo: compatibi compatibility-thread-c++0x.o: compatibility-thread-c++0x.cc $(CXXCOMPILE) -std=gnu++11 -c $< +compatibility-chrono.lo: compatibility-chrono.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $< +compatibility-chrono.o: compatibility-chrono.cc + $(CXXCOMPILE) -std=gnu++11 -c $< + # A note on compatibility and static libraries. # # static lib == linked against only this version, should not need compat --- libstdc++-v3/src/c++11/compatibility-chrono.cc.jj 2013-05-23 15:05:13.907962675 +0200 +++ libstdc++-v3/src/c++11/compatibility-chrono.cc 2013-05-23 15:33:07.238690149 +0200 @@ -0,0 +1,58 @@ +// Compatibility symbols for previous versions, C++0x bits -*- C++ -*- + +// Copyright (C) 2013 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +#define _GLIBCXX_COMPATIBILITY_CXX0X +#include + +#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \ + && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE)\ + && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) + +#define steady_clock steady_clockXX +#include "chrono.cc" + +// The rename syntax for default exported names is +// asm (".symver name1,exportedname@GLIBCXX_3.4.17") +// asm (".symver name2,exportedname@@GLIBCXX_3.4.19") +// In the future, GLIBCXX_ABI > 6 should remove all uses of +// _GLIBCXX_*_SYMVER macros in this file. + +#define _GLIBCXX_3_4_17_SYMVER(XXname, name) \ + extern "C" void \ + _X##name() \ + __attribute__ ((alias(#XXname))); \ + asm (".symver " "_X" #name "," #name "@GLIBCXX_3.4.17"); + +#define _GLIBCXX_3_4_19_SYMVER(XXname, name) \ + extern "C" void \ + _Y##name() \ + __attribute__ ((alias(#XXname))); \ + asm (".symver " "_Y" #name "," #name "@@GLIBCXX_3.4.19"); + +_GLIBCXX_3_4_17_SYMVER(_ZNSt6chrono14steady_clockXX3nowEv, + _ZNSt6chrono12steady_clock3nowEv) +_GLIBCXX_3_4_19_SYMVER(_ZNSt6chrono14steady_clockXX3nowEv, + _ZNSt6chrono12steady_clock3nowEv) + +#endif --- libstdc++-v3/acinclude.m4.jj 2013-04-10 08:32:08.000000000 +0200 +++ libstdc++-v3/acinclude.m4 2013-05-23 14:13:34.546224986 +0200 @@ -1274,6 +1274,31 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME] fi fi + if test x"$ac_has_clock_monotonic" != x"yes"; then + case ${target_os} in + linux*) + AC_MSG_CHECKING([for clock_gettime syscall]) + AC_TRY_COMPILE( + [#include + #include + #include + ], + [#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK) + timespec tp; + #endif + syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &tp); + syscall(SYS_clock_gettime, CLOCK_REALTIME, &tp); + ], [ac_has_clock_monotonic_syscall=yes], [ac_has_clock_monotonic_syscall=no]) + AC_MSG_RESULT($ac_has_clock_monotonic_syscall) + if test x"$ac_has_clock_monotonic_syscall" = x"yes"; then + AC_DEFINE(_GLIBCXX_USE_CLOCK_MONOTONIC_SYSCALL, 1, + [ Defined if clock_gettime syscall has monotonic clock support. ]) + ac_has_clock_monotonic=yes + ac_has_clock_realtime=yes + fi;; + esac + fi + if test x"$ac_has_clock_monotonic" = x"yes"; then AC_DEFINE(_GLIBCXX_USE_CLOCK_MONOTONIC, 1, [ Defined if clock_gettime has monotonic clock support. ]) --- libstdc++-v3/testsuite/util/testsuite_abi.cc.jj 2013-03-16 08:09:29.000000000 +0100 +++ libstdc++-v3/testsuite/util/testsuite_abi.cc 2013-05-23 15:37:48.226285549 +0200 @@ -195,6 +195,7 @@ check_version(symbol& test, bool added) known_versions.push_back("GLIBCXX_3.4.16"); known_versions.push_back("GLIBCXX_3.4.17"); known_versions.push_back("GLIBCXX_3.4.18"); + known_versions.push_back("GLIBCXX_3.4.19"); known_versions.push_back("GLIBCXX_LDBL_3.4"); known_versions.push_back("GLIBCXX_LDBL_3.4.7"); known_versions.push_back("GLIBCXX_LDBL_3.4.10"); @@ -223,7 +224,7 @@ check_version(symbol& test, bool added) test.version_status = symbol::incompatible; // Check that added symbols are added in the latest pre-release version. - bool latestp = (test.version_name == "GLIBCXX_3.4.18" + bool latestp = (test.version_name == "GLIBCXX_3.4.19" || test.version_name == "CXXABI_1.3.7" || test.version_name == "CXXABI_TM_1"); if (added && !latestp) --- libstdc++-v3/config/abi/pre/gnu.ver.jj 2013-03-16 08:09:38.000000000 +0100 +++ libstdc++-v3/config/abi/pre/gnu.ver 2013-05-23 15:29:15.511112789 +0200 @@ -1344,6 +1344,11 @@ GLIBCXX_3.4.18 { } GLIBCXX_3.4.17; +GLIBCXX_3.4.19 { + # std::chrono::steady_clock::now() + _ZNSt6chrono12steady_clock3nowEv; +} GLIBCXX_3.4.18; + # Symbols in the support library (libsupc++) have their own tag. CXXABI_1.3 { --- libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt.jj 2013-03-16 08:09:37.423570786 +0100 +++ libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt 2013-05-23 15:43:37.846877915 +0200 @@ -1938,6 +1938,8 @@ FUNC:_ZNSt6__norm15_List_node_base7rever FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4 @@ -2514,6 +2516,7 @@ OBJECT:0:GLIBCXX_3.4.15 OBJECT:0:GLIBCXX_3.4.16 OBJECT:0:GLIBCXX_3.4.17 OBJECT:0:GLIBCXX_3.4.18 +OBJECT:0:GLIBCXX_3.4.19 OBJECT:0:GLIBCXX_3.4.2 OBJECT:0:GLIBCXX_3.4.3 OBJECT:0:GLIBCXX_3.4.4 --- libstdc++-v3/config/abi/post/s390x-linux-gnu/baseline_symbols.txt.jj 2013-03-16 08:09:36.882574033 +0100 +++ libstdc++-v3/config/abi/post/s390x-linux-gnu/baseline_symbols.txt 2013-05-23 15:45:51.432944873 +0200 @@ -2128,6 +2128,8 @@ FUNC:_ZNSt6__norm15_List_node_base7rever FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4 @@ -2748,6 +2750,7 @@ OBJECT:0:GLIBCXX_3.4.15 OBJECT:0:GLIBCXX_3.4.16 OBJECT:0:GLIBCXX_3.4.17 OBJECT:0:GLIBCXX_3.4.18 +OBJECT:0:GLIBCXX_3.4.19 OBJECT:0:GLIBCXX_3.4.2 OBJECT:0:GLIBCXX_3.4.3 OBJECT:0:GLIBCXX_3.4.4 --- libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt.jj 2013-03-16 08:09:37.648569439 +0100 +++ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt 2013-05-23 15:45:08.736291429 +0200 @@ -2128,6 +2128,8 @@ FUNC:_ZNSt6__norm15_List_node_base7rever FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4 @@ -2748,6 +2750,7 @@ OBJECT:0:GLIBCXX_3.4.15 OBJECT:0:GLIBCXX_3.4.16 OBJECT:0:GLIBCXX_3.4.17 OBJECT:0:GLIBCXX_3.4.18 +OBJECT:0:GLIBCXX_3.4.19 OBJECT:0:GLIBCXX_3.4.2 OBJECT:0:GLIBCXX_3.4.3 OBJECT:0:GLIBCXX_3.4.4 --- libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt.jj 2013-03-16 08:09:37.489570393 +0100 +++ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt 2013-05-23 15:45:13.783372530 +0200 @@ -2128,6 +2128,8 @@ FUNC:_ZNSt6__norm15_List_node_base7rever FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4 @@ -2748,6 +2750,7 @@ OBJECT:0:GLIBCXX_3.4.15 OBJECT:0:GLIBCXX_3.4.16 OBJECT:0:GLIBCXX_3.4.17 OBJECT:0:GLIBCXX_3.4.18 +OBJECT:0:GLIBCXX_3.4.19 OBJECT:0:GLIBCXX_3.4.2 OBJECT:0:GLIBCXX_3.4.3 OBJECT:0:GLIBCXX_3.4.4 --- libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt.jj 2013-03-16 08:09:36.000000000 +0100 +++ libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt 2013-05-23 15:41:27.344826481 +0200 @@ -1938,6 +1938,8 @@ FUNC:_ZNSt6__norm15_List_node_base7rever FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4 @@ -2514,6 +2516,7 @@ OBJECT:0:GLIBCXX_3.4.15 OBJECT:0:GLIBCXX_3.4.16 OBJECT:0:GLIBCXX_3.4.17 OBJECT:0:GLIBCXX_3.4.18 +OBJECT:0:GLIBCXX_3.4.19 OBJECT:0:GLIBCXX_3.4.2 OBJECT:0:GLIBCXX_3.4.3 OBJECT:0:GLIBCXX_3.4.4 --- libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt.jj 2013-03-16 08:09:35.000000000 +0100 +++ libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt 2013-05-23 15:41:36.474966903 +0200 @@ -1938,6 +1938,8 @@ FUNC:_ZNSt6__norm15_List_node_base7rever FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4 @@ -2514,6 +2516,7 @@ OBJECT:0:GLIBCXX_3.4.15 OBJECT:0:GLIBCXX_3.4.16 OBJECT:0:GLIBCXX_3.4.17 OBJECT:0:GLIBCXX_3.4.18 +OBJECT:0:GLIBCXX_3.4.19 OBJECT:0:GLIBCXX_3.4.2 OBJECT:0:GLIBCXX_3.4.3 OBJECT:0:GLIBCXX_3.4.4 --- libstdc++-v3/config/abi/post/powerpc-linux-gnu/baseline_symbols.txt.jj 2013-03-16 08:09:36.175578273 +0100 +++ libstdc++-v3/config/abi/post/powerpc-linux-gnu/baseline_symbols.txt 2013-05-23 15:44:36.216771955 +0200 @@ -2128,6 +2128,8 @@ FUNC:_ZNSt6__norm15_List_node_base7rever FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4 @@ -2748,6 +2750,7 @@ OBJECT:0:GLIBCXX_3.4.15 OBJECT:0:GLIBCXX_3.4.16 OBJECT:0:GLIBCXX_3.4.17 OBJECT:0:GLIBCXX_3.4.18 +OBJECT:0:GLIBCXX_3.4.19 OBJECT:0:GLIBCXX_3.4.2 OBJECT:0:GLIBCXX_3.4.3 OBJECT:0:GLIBCXX_3.4.4 --- libstdc++-v3/config/abi/post/s390-linux-gnu/baseline_symbols.txt.jj 2013-03-16 08:09:35.702581217 +0100 +++ libstdc++-v3/config/abi/post/s390-linux-gnu/baseline_symbols.txt 2013-05-23 15:45:32.397667896 +0200 @@ -2128,6 +2128,8 @@ FUNC:_ZNSt6__norm15_List_node_base7rever FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4 @@ -2748,6 +2750,7 @@ OBJECT:0:GLIBCXX_3.4.15 OBJECT:0:GLIBCXX_3.4.16 OBJECT:0:GLIBCXX_3.4.17 OBJECT:0:GLIBCXX_3.4.18 +OBJECT:0:GLIBCXX_3.4.19 OBJECT:0:GLIBCXX_3.4.2 OBJECT:0:GLIBCXX_3.4.3 OBJECT:0:GLIBCXX_3.4.4 --- libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt.jj 2013-03-16 08:09:38.030567148 +0100 +++ libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt 2013-05-23 15:43:55.152138816 +0200 @@ -1938,6 +1938,8 @@ FUNC:_ZNSt6__norm15_List_node_base7rever FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4 @@ -2514,6 +2516,7 @@ OBJECT:0:GLIBCXX_3.4.15 OBJECT:0:GLIBCXX_3.4.16 OBJECT:0:GLIBCXX_3.4.17 OBJECT:0:GLIBCXX_3.4.18 +OBJECT:0:GLIBCXX_3.4.19 OBJECT:0:GLIBCXX_3.4.2 OBJECT:0:GLIBCXX_3.4.3 OBJECT:0:GLIBCXX_3.4.4 --- libstdc++-v3/config.h.in.jj 2013-04-10 08:32:08.000000000 +0200 +++ libstdc++-v3/config.h.in 2013-05-23 14:10:35.000000000 +0200 @@ -813,6 +813,9 @@ /* Defined if clock_gettime has monotonic clock support. */ #undef _GLIBCXX_USE_CLOCK_MONOTONIC +/* Defined if clock_gettime syscall has monotonic clock support. */ +#undef _GLIBCXX_USE_CLOCK_MONOTONIC_SYSCALL + /* Defined if clock_gettime has realtime clock support. */ #undef _GLIBCXX_USE_CLOCK_REALTIME --- libstdc++-v3/src/Makefile.in.jj 2013-03-22 15:05:13.000000000 +0100 +++ libstdc++-v3/src/Makefile.in 2013-05-23 15:19:26.341768018 +0200 @@ -93,7 +93,7 @@ am__DEPENDENCIES_1 = am__objects_2 = compatibility.lo compatibility-debug_list.lo \ compatibility-debug_list-2.lo $(am__objects_1) am__objects_3 = compatibility-c++0x.lo compatibility-atomic-c++0x.lo \ - compatibility-thread-c++0x.lo + compatibility-thread-c++0x.lo compatibility-chrono.lo am_libstdc___la_OBJECTS = $(am__objects_2) $(am__objects_3) libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) @@ -351,7 +351,8 @@ cxx98_sources = \ cxx11_sources = \ compatibility-c++0x.cc \ compatibility-atomic-c++0x.cc \ - compatibility-thread-c++0x.cc + compatibility-thread-c++0x.cc \ + compatibility-chrono.cc libstdc___la_SOURCES = $(cxx98_sources) $(cxx11_sources) libstdc___la_LIBADD = \ @@ -848,6 +849,11 @@ compatibility-thread-c++0x.lo: compatibi compatibility-thread-c++0x.o: compatibility-thread-c++0x.cc $(CXXCOMPILE) -std=gnu++11 -c $< +compatibility-chrono.lo: compatibility-chrono.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $< +compatibility-chrono.o: compatibility-chrono.cc + $(CXXCOMPILE) -std=gnu++11 -c $< + # Symbol versioning for shared libraries. @ENABLE_SYMVERS_TRUE@libstdc++-symbols.ver: ${glibcxx_srcdir}/$(SYMVER_FILE) \ @ENABLE_SYMVERS_TRUE@ $(port_specific_symbol_files) --- libstdc++-v3/configure.jj 2013-04-10 08:32:08.000000000 +0200 +++ libstdc++-v3/configure 2013-05-23 14:16:06.508039167 +0200 @@ -19828,6 +19828,48 @@ $as_echo "$ac_has_nanosleep" >&6; } fi fi + if test x"$ac_has_clock_monotonic" != x"yes"; then + case ${target_os} in + linux*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime syscall" >&5 +$as_echo_n "checking for clock_gettime syscall... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + +int +main () +{ +#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK) + timespec tp; + #endif + syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &tp); + syscall(SYS_clock_gettime, CLOCK_REALTIME, &tp); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_has_clock_monotonic_syscall=yes +else + ac_has_clock_monotonic_syscall=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_clock_monotonic_syscall" >&5 +$as_echo "$ac_has_clock_monotonic_syscall" >&6; } + if test x"$ac_has_clock_monotonic_syscall" = x"yes"; then + +$as_echo "#define _GLIBCXX_USE_CLOCK_MONOTONIC_SYSCALL 1" >>confdefs.h + + ac_has_clock_monotonic=yes + ac_has_clock_realtime=yes + fi;; + esac + fi + if test x"$ac_has_clock_monotonic" = x"yes"; then $as_echo "#define _GLIBCXX_USE_CLOCK_MONOTONIC 1" >>confdefs.h