ruby-changes:28579
From: akr <ko1@a...>
Date: Fri, 10 May 2013 12:02:12 +0900 (JST)
Subject: [ruby-changes:28579] akr:r40631 (trunk): * configure.in: Don't link librt if clock_gettime is available in
akr 2013-05-10 12:01:51 +0900 (Fri, 10 May 2013) New Revision: 40631 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40631 Log: * configure.in: Don't link librt if clock_gettime is available in the main C library. glibc 2.17 moves clock_* from librt to the main C library. http://sourceware.org/ml/libc-announce/2012/msg00001.html Modified files: trunk/ChangeLog trunk/configure.in Index: configure.in =================================================================== --- configure.in (revision 40630) +++ configure.in (revision 40631) @@ -1432,7 +1432,6 @@ AC_CHECK_LIB(crypt, crypt) # glibc https://github.com/ruby/ruby/blob/trunk/configure.in#L1432 AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX AC_CHECK_LIB(socket, shutdown) # SunOS/Solaris -AC_CHECK_LIB(rt, clock_gettime) # GNU/Linux AS_CASE(["$target_cpu"], [alpha*|sh4|sh4el|sh4eb], [AS_CASE(["$target_os"::"$GCC"], @@ -1693,6 +1692,16 @@ if test "$rb_cv_have_signbit" = yes; the https://github.com/ruby/ruby/blob/trunk/configure.in#L1692 else AC_LIBOBJ([signbit]) fi + +AC_CHECK_FUNCS(clock_gettime) +if test x"$ac_cv_func_clock_gettime" != xyes; then + # glibc 2.17 moves clock_* functions from librt to the main C library. + # http://sourceware.org/ml/libc-announce/2012/msg00001.html + AC_CHECK_LIB(rt, clock_gettime) + unset ac_cv_func_clock_gettime + AC_CHECK_FUNCS(clock_gettime) +fi + AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall __syscall chroot getcwd eaccess\ truncate ftruncate ftello chsize times utimes utimensat fcntl lockf lstat\ truncate64 ftruncate64 ftello64 fseeko fseeko64 \ @@ -1705,7 +1714,7 @@ AC_CHECK_FUNCS(fmod killpg wait4 waitpid https://github.com/ruby/ruby/blob/trunk/configure.in#L1714 dlopen sigprocmask sigaction _setjmp _longjmp\ getsid setsid telldir seekdir fchmod cosh sinh tanh log2 round llabs\ setuid setgid daemon select_large_fdset setenv unsetenv\ - mktime timegm gmtime_r clock_gettime gettimeofday poll ppoll\ + mktime timegm gmtime_r gettimeofday poll ppoll\ pread sendfile shutdown sigaltstack dl_iterate_phdr\ dup dup3 pipe2 posix_memalign memalign ioctl mblen) Index: ChangeLog =================================================================== --- ChangeLog (revision 40630) +++ ChangeLog (revision 40631) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri May 10 12:01:36 2013 Tanaka Akira <akr@f...> + + * configure.in: Don't link librt if clock_gettime is available in + the main C library. + glibc 2.17 moves clock_* from librt to the main C library. + http://sourceware.org/ml/libc-announce/2012/msg00001.html + Thu May 9 22:00:35 2013 Tanaka Akira <akr@f...> * ext/socket/ancdata.c (bsock_sendmsg_internal): controls_num should -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/