diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-12-21 12:33:25 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-12-21 12:33:25 +0100 |
commit | f156c65c211209b8d2026d1c11c2b475cdba57a8 (patch) | |
tree | 7845b4796db320fe74c369c814fb474859c9ddd4 /configure.ac | |
parent | 4a626d92d2ba67382b5e082b4d34e7f032649b20 (diff) |
configure: Use -Bsymbolic-functions if available
While this is more useful for libraries, some of our plugins with multiple
files and some internal API can also benefit from this.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7334de5a1..95329714e 100644 --- a/configure.ac +++ b/configure.ac @@ -242,6 +242,22 @@ if test "x$BUILD_EXAMPLES" = "xyes"; then fi AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes") +dnl Check for -Bsymbolic-functions linker flag used to avoid +dnl intra-library PLT jumps, if available. +AC_ARG_ENABLE(Bsymbolic, + [AS_HELP_STRING([--disable-Bsymbolic],[avoid linking with -Bsymbolic])],, + [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}" + AC_MSG_CHECKING([for -Bsymbolic-functions linker flag]) + LDFLAGS=-Wl,-Bsymbolic-functions + LIBS= + AC_TRY_LINK([], [return 0], + AC_MSG_RESULT(yes) + enable_Bsymbolic=yes, + AC_MSG_RESULT(no) + enable_Bsymbolic=no) + LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"]) + +dnl *** set variables based on configure arguments *** dnl GTK is optional and used in examples HAVE_GTK3=NO @@ -3415,6 +3431,9 @@ AC_SUBST(GST_PLUGINS_BAD_OBJCFLAGS) dnl LDFLAGS really should only contain flags, not libs - they get added before dnl whatevertarget_LIBS and -L flags here affect the rest of the linking GST_ALL_LDFLAGS="-no-undefined" +if test "x${enable_Bsymbolic}" = "xyes"; then + GST_ALL_LDFLAGS="$GST_ALL_LDFLAGS -Wl,-Bsymbolic-functions" +fi AC_SUBST(GST_ALL_LDFLAGS) dnl GST_LIB_LDFLAGS |