diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-12-21 12:34:11 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-12-21 12:34:11 +0100 |
commit | d2397bec1791eb0ed5d436f343a11e69d8a29bdc (patch) | |
tree | f395681b6b13388ef7c2af4a7d5fc78cd6d3ca9e | |
parent | e9877a254daa4d3c1d56014050bf5197849e5b10 (diff) | |
download | gst-libav-d2397bec1791eb0ed5d436f343a11e69d8a29bdc.tar.gz |
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.
-rw-r--r-- | configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 84cf31a..3b34c28 100644 --- a/configure.ac +++ b/configure.ac @@ -129,6 +129,21 @@ AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes") AC_MSG_NOTICE(Using GStreamer Core Plugins in $GST_PLUGINS_DIR) AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR) +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 set location of plugin directory @@ -204,6 +219,9 @@ AC_SUBST(GST_CFLAGS) AC_SUBST(GST_LIBS) 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 this really should only contain flags, not libs - they get added before |