summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 540603ad..1bb17164 100644
--- a/configure.ac
+++ b/configure.ac
@@ -653,6 +653,27 @@ fi
AC_SUBST(LIBRARY_LIBTOOL_OPTIONS)
AC_SUBST(MODULE_LIBTOOL_OPTIONS)
+dnl
+dnl Check for -Bsymbolic-functions linker flag used to avoid
+dnl intra-library PLT jumps, if available.
+dnl
+AC_ARG_ENABLE(Bsymbolic,
+ [AS_HELP_STRING([--disable-Bsymbolic],
+ [avoid linking with -Bsymbolic])],,
+ [SAVED_LDFLAGS="${LDFLAGS}"
+ AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
+ LDFLAGS=-Wl,-Bsymbolic-functions
+ AC_TRY_LINK([], [int main (void) { return 0; }],
+ AC_MSG_RESULT(yes)
+ enable_Bsymbolic=yes,
+ AC_MSG_RESULT(no)
+ enable_Bsymbolic=no)
+ LDFLAGS="${SAVED_LDFLAGS}"])
+
+if test "x${enable_Bsymbolic}" = "xyes"; then
+ LIBRARY_LIBTOOL_OPTIONS="$LIBRARY_LIBTOOL_OPTIONS -Wl,-Bsymbolic-functions"
+fi
+
dnl ********************************************************
dnl * See whether we need to load our modules as .la files *
dnl ********************************************************