aboutsummaryrefslogtreecommitdiff
path: root/libgo/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-11-21 01:27:44 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-11-21 01:27:44 +0000
commitbbbe8b338b4e31ce315f97562906a013240bd621 (patch)
treece90880ae1cd1318680980381769544c90f941c8 /libgo/configure
parent23df90322f24ea24b9f0d077be543dc0a71e7f02 (diff)
downloadgcc-bbbe8b338b4e31ce315f97562906a013240bd621.zip
gcc-bbbe8b338b4e31ce315f97562906a013240bd621.tar.gz
gcc-bbbe8b338b4e31ce315f97562906a013240bd621.tar.bz2
re PR go/66574 (Time is provided in millisecond precision instead of nanoseconds as described in go documentation)
PR go/66574 runtime: Use clock_gettime to get current time. Fetch the current time in nanoseconds, not microseconds, by using clock_gettime rather than gettimeofday. Update golang/go#11222. Fixes https://gcc.gnu.org/PR66574. Reviewed-on: https://go-review.googlesource.com/17156 From-SVN: r230694
Diffstat (limited to 'libgo/configure')
-rwxr-xr-xlibgo/configure56
1 files changed, 56 insertions, 0 deletions
diff --git a/libgo/configure b/libgo/configure
index eb37e29..e024b2f 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -14479,6 +14479,62 @@ if test "$ac_res" != no; then :
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if test "${ac_cv_search_clock_gettime+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_clock_gettime+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_clock_gettime+set}" = set; then :
+
+else
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }