summaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-05-24 20:08:42 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2013-05-24 20:08:42 +0200
commit2e8a9734c0bf678c090e7137d7ac8185a7ea08cc (patch)
tree22fc106b86783828d282e19d009658a223244b66 /libstdc++-v3/configure
parent7f5d76fb976770ec90deaf562ba7cf566bf9b0be (diff)
downloadgcc-2e8a9734c0bf678c090e7137d7ac8185a7ea08cc.tar.gz
chrono.cc: If _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL, include unistd.h and sys/syscall.h.
* 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. From-SVN: r199307
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure42
1 files changed, 42 insertions, 0 deletions
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 <unistd.h>
+ #include <time.h>
+ #include <sys/syscall.h>
+
+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