aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-01-26 22:36:39 -0500
committerCory Fields <cory-nospam-@coryfields.com>2016-01-26 23:07:04 -0500
commita8ce872118c4807465629aecb9e4f3d72d999ccb (patch)
tree318408e024ef514947464dc3fb78c733860c6aac /configure.ac
parentf3d3eaf78eb51238d799d8f20a585550d1567719 (diff)
release: always link librt for glibc back-compat builds
glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to link in anyway for back-compat. Fixes #7420
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 9a6d0b3b19..921b26a940 100644
--- a/configure.ac
+++ b/configure.ac
@@ -411,6 +411,10 @@ AX_GCC_FUNC_ATTRIBUTE([dllimport])
if test x$use_glibc_compat != xno; then
+ #glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to link
+ #in anyway for back-compat.
+ AC_CHECK_LIB([rt],[clock_gettime],, AC_MSG_ERROR(lib missing))
+
#__fdelt_chk's params and return type have changed from long unsigned int to long int.
# See which one is present here.
AC_MSG_CHECKING(__fdelt_chk type)
@@ -424,7 +428,8 @@ if test x$use_glibc_compat != xno; then
[ fdelt_type="long int"])
AC_MSG_RESULT($fdelt_type)
AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
-
+else
+ AC_SEARCH_LIBS([clock_gettime],[rt])
fi
if test x$TARGET_OS != xwindows; then
@@ -491,8 +496,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
[ AC_MSG_RESULT(no)]
)
-AC_SEARCH_LIBS([clock_gettime],[rt])
-
AC_MSG_CHECKING([for visibility attribute])
AC_LINK_IFELSE([AC_LANG_SOURCE([
int foo_def( void ) __attribute__((visibility("default")));