diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fabbb803de3..7607003546c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,47 @@ +2013-05-24 Jakub Jelinek + + * src/c++11/chrono.cc: If _GLIBCXX_USE_CLOCK_GETTIME_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_GETTIME_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.20 version and make it the latest. + * config/abi/pre/gnu.ver (_ZNSt6chrono12steady_clock3nowEv): Export + also @@GLIBCXX_3.4.19. Move all symbols so far added for GCC 4.9 to + @@GLIBCXX_3.4.20 instead. + * 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/abi/post/solaris2.10/baseline_symbols.txt: Regenerated. + * config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Regenerated. + * config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: + Regenerated. + * config/abi/post/solaris2.9/baseline_symbols.txt: Regenerated. + * config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt: Regenerated. + * config.h.in: Regenerated. + * src/Makefile.in: Regenerated. + * configure: Regenerated. + 2013-05-23 Matthias Klose * include/Makefile.am (bits_headers): Remove ${bits_host_headers}. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index efeb6d49206..d68768ed150 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1322,6 +1322,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_GETTIME_SYSCALL, 1, + [ Defined if clock_gettime syscall has monotonic and realtime 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. ]) diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in index 90d0479347e..61ac3abd0e2 100644 --- a/libstdc++-v3/config.h.in +++ b/libstdc++-v3/config.h.in @@ -813,6 +813,9 @@ /* Defined if clock_gettime has monotonic clock support. */ #undef _GLIBCXX_USE_CLOCK_MONOTONIC +/* Defined if clock_gettime syscall has monotonic and realtime clock support. */ +#undef _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL + /* Defined if clock_gettime has realtime clock support. */ #undef _GLIBCXX_USE_CLOCK_REALTIME diff --git a/libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt index bb84889638b..6a823ad2a92 100644 --- a/libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt @@ -1937,6 +1937,8 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@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 diff --git a/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt index bb84889638b..6a823ad2a92 100644 --- a/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt @@ -1937,6 +1937,8 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@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 diff --git a/libstdc++-v3/config/abi/post/powerpc-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/powerpc-linux-gnu/baseline_symbols.txt index 415b18d1468..6a15139f415 100644 --- a/libstdc++-v3/config/abi/post/powerpc-linux-gnu/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/powerpc-linux-gnu/baseline_symbols.txt @@ -2127,6 +2127,8 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@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 diff --git a/libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt b/libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt index 415b18d1468..6a15139f415 100644 --- a/libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt @@ -2127,6 +2127,8 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@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 diff --git a/libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt index e836eb8fce6..ac5fe54c484 100644 --- a/libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt @@ -2127,6 +2127,8 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@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 diff --git a/libstdc++-v3/config/abi/post/s390-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/s390-linux-gnu/baseline_symbols.txt index ebdbcd33068..ca252083c69 100644 --- a/libstdc++-v3/config/abi/post/s390-linux-gnu/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/s390-linux-gnu/baseline_symbols.txt @@ -2127,6 +2127,8 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@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 diff --git a/libstdc++-v3/config/abi/post/s390x-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/s390x-linux-gnu/baseline_symbols.txt index e836eb8fce6..ac5fe54c484 100644 --- a/libstdc++-v3/config/abi/post/s390x-linux-gnu/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/s390x-linux-gnu/baseline_symbols.txt @@ -2127,6 +2127,8 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@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 diff --git a/libstdc++-v3/config/abi/post/solaris2.10/amd64/baseline_symbols.txt b/libstdc++-v3/config/abi/post/solaris2.10/amd64/baseline_symbols.txt index 8761f0e602e..5b46247c4c0 100644 --- a/libstdc++-v3/config/abi/post/solaris2.10/amd64/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/solaris2.10/amd64/baseline_symbols.txt @@ -1902,6 +1902,7 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@GLIBCXX_3.4 @@ -2477,6 +2478,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 diff --git a/libstdc++-v3/config/abi/post/solaris2.10/baseline_symbols.txt b/libstdc++-v3/config/abi/post/solaris2.10/baseline_symbols.txt index b4c56b4902d..df69ba25cc6 100644 --- a/libstdc++-v3/config/abi/post/solaris2.10/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/solaris2.10/baseline_symbols.txt @@ -1902,6 +1902,7 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 @@ -2477,6 +2478,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 diff --git a/libstdc++-v3/config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt b/libstdc++-v3/config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt index 225584726b4..4c158136192 100644 --- a/libstdc++-v3/config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt @@ -1902,6 +1902,7 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@GLIBCXX_3.4 @@ -2477,6 +2478,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 diff --git a/libstdc++-v3/config/abi/post/solaris2.9/baseline_symbols.txt b/libstdc++-v3/config/abi/post/solaris2.9/baseline_symbols.txt index af51ca0633d..b9e822e7988 100644 --- a/libstdc++-v3/config/abi/post/solaris2.9/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/solaris2.9/baseline_symbols.txt @@ -1878,6 +1878,7 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 @@ -2491,6 +2492,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 diff --git a/libstdc++-v3/config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt b/libstdc++-v3/config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt index 5509adfde6a..3a3d0b7de2c 100644 --- a/libstdc++-v3/config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt @@ -1878,6 +1878,7 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@GLIBCXX_3.4 @@ -2491,6 +2492,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 diff --git a/libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt b/libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt index bb84889638b..6a823ad2a92 100644 --- a/libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt @@ -1937,6 +1937,8 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@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 diff --git a/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt index e4ce5ee5a2e..165638b6870 100644 --- a/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt @@ -1937,6 +1937,8 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 +FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@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 diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 446a68502e3..9c64a0d8c0f 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -1303,9 +1303,6 @@ GLIBCXX_3.4.17 { _ZN11__gnu_debug25_Safe_local_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb; _ZN11__gnu_debug25_Safe_local_iterator_base9_M_detachEv; - # std::chrono::steady_clock::now() - _ZNSt6chrono12steady_clock3nowEv; - # std::numeric_limits<__int128> and _ZNSt14numeric_limitsInE*; _ZNSt14numeric_limitsIoE*; @@ -1323,6 +1320,12 @@ GLIBCXX_3.4.17 { _ZNSt13__future_base19_Async_state_commonD1Ev; _ZNSt13__future_base19_Async_state_commonD2Ev; +#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT + # GLIBCXX_ABI compatibility only. + # std::chrono::steady_clock::now() + _ZNSt6chrono12steady_clock3nowEv; +#endif + } GLIBCXX_3.4.16; GLIBCXX_3.4.18 { @@ -1346,6 +1349,13 @@ GLIBCXX_3.4.18 { GLIBCXX_3.4.19 { + # std::chrono::steady_clock::now() + _ZNSt6chrono12steady_clock3nowEv; + +} GLIBCXX_3.4.18; + +GLIBCXX_3.4.20 { + # std::get_new_handler() _ZSt15get_new_handlerv; @@ -1355,7 +1365,7 @@ GLIBCXX_3.4.19 { # std::get_unexpected() _ZSt14get_unexpectedv; -} GLIBCXX_3.4.18; +} GLIBCXX_3.4.19; # Symbols in the support library (libsupc++) have their own tag. CXXABI_1.3 { diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 29344f06ed2..994fbe320e0 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -19883,6 +19883,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_GETTIME_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 diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 267a3db496b..092fd1bd581 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -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: compatibility-thread-c++0x.cc 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 diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 69001b4bf47..a7b3404d0a6 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -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: compatibility-thread-c++0x.cc 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) diff --git a/libstdc++-v3/src/c++11/chrono.cc b/libstdc++-v3/src/c++11/chrono.cc index b45825ee9ad..15de4eb8767 100644 --- a/libstdc++-v3/src/c++11/chrono.cc +++ b/libstdc++-v3/src/c++11/chrono.cc @@ -22,7 +22,20 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . +#include + +#ifndef _GLIBCXX_USE_CLOCK_MONOTONIC +// If !_GLIBCXX_USE_CLOCK_MONOTONIC, std::chrono::steady_clock +// is just a typedef to std::chrono::system_clock, for ABI compatibility +// force it not to be a typedef now and export it anyway. Programs +// using the headers where it is a typedef will actually just use +// std::chrono::system_clock instead, and this remains here just as a fallback. +#define _GLIBCXX_USE_CLOCK_MONOTONIC #include +#undef _GLIBCXX_USE_CLOCK_MONOTONIC +#else +#include +#endif #ifdef _GLIBCXX_USE_C99_STDINT_TR1 @@ -32,13 +45,18 @@ defined(_GLIBCXX_USE_GETTIMEOFDAY) #include #endif +#ifdef _GLIBCXX_USE_CLOCK_GETTIME_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 +65,11 @@ namespace std _GLIBCXX_VISIBILITY(default) #ifdef _GLIBCXX_USE_CLOCK_REALTIME timespec tp; // -EINVAL, -EFAULT +#ifdef _GLIBCXX_USE_CLOCK_GETTIME_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,20 +83,35 @@ namespace std _GLIBCXX_VISIBILITY(default) 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 { +#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC timespec tp; // -EINVAL, -EFAULT +#ifdef _GLIBCXX_USE_CLOCK_GETTIME_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))); - } +#else + return time_point(system_clock::now().time_since_epoch()); #endif + } _GLIBCXX_END_NAMESPACE_VERSION } // namespace chrono diff --git a/libstdc++-v3/src/c++11/compatibility-chrono.cc b/libstdc++-v3/src/c++11/compatibility-chrono.cc new file mode 100644 index 00000000000..ada0946619b --- /dev/null +++ b/libstdc++-v3/src/c++11/compatibility-chrono.cc @@ -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 diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.cc b/libstdc++-v3/testsuite/util/testsuite_abi.cc index 9c31f171fe3..7d9807552f0 100644 --- a/libstdc++-v3/testsuite/util/testsuite_abi.cc +++ b/libstdc++-v3/testsuite/util/testsuite_abi.cc @@ -199,6 +199,7 @@ check_version(symbol& test, bool added) 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_3.4.20"); known_versions.push_back("CXXABI_1.3"); known_versions.push_back("CXXABI_LDBL_1.3"); known_versions.push_back("CXXABI_1.3.1"); @@ -225,7 +226,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.19" + bool latestp = (test.version_name == "GLIBCXX_3.4.20" || test.version_name == "CXXABI_1.3.8" || test.version_name == "CXXABI_TM_1"); if (added && !latestp)