summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-11-26 13:25:06 +0000
committerTim-Philipp Müller <tim@centricular.com>2017-11-26 13:30:08 +0000
commit7f98b12d9117173a51f3cba198f63870bafcab10 (patch)
tree185d9932ba07d5482b8c28fc9018e86729425239
parentb624e19ff3fdf7f3011967b28bfd9b908fbcb082 (diff)
autotools: stop controlling symbol visibility with -export-symbols-regex
Instead, use -fvisibility=hidden and explicit exports via GST_EXPORT. This should result in consistent behaviour for the autotools and Meson builds.
-rw-r--r--configure.ac10
1 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 3b7e2dae3b..e0693344bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -383,6 +383,10 @@ else
fi
AC_SUBST(DEPRECATED_CFLAGS)
+VISIBILITY_CFLAGS=""
+AS_COMPILER_FLAG([-fvisibility=hidden], [VISIBILITY_CFLAGS="-fvisibility=hidden"])
+AC_SUBST(VISIBILITY_CFLAGS)
+
dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
dnl at make time with e.g. make ERROR_CFLAGS=""
GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
@@ -394,7 +398,7 @@ dnl FIXME: do we want to rename to GST_ALL_* ?
dnl prefer internal headers to already installed ones
dnl also add builddir include for enumtypes and marshal
dnl add GST_OPTION_CFLAGS, but overridable
-GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS) -DGST_USE_UNSTABLE_API"
+GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS) \$(VISIBILITY_CFLAGS) -DGST_USE_UNSTABLE_API"
GST_CXXFLAGS="$GST_CXXFLAGS \$(GST_OPTION_CXXFLAGS)"
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_CXXFLAGS)
@@ -411,12 +415,12 @@ AC_SUBST(GST_ALL_LDFLAGS)
dnl GST_LIB_LDFLAGS
dnl linker flags shared by all libraries
dnl LDFLAGS modifier defining exported symbols from built libraries
-GST_LIB_LDFLAGS=" -export-symbols-regex \^_*\(ges_\|GES_\).*"
+GST_LIB_LDFLAGS=""
AC_SUBST(GST_LIB_LDFLAGS)
dnl GST_PLUGIN_LDFLAGS must only contain flags, not libs - they get added before
dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
-GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_.*' $GST_ALL_LDFLAGS"
+GST_PLUGIN_LDFLAGS="-module -avoid-version $GST_ALL_LDFLAGS"
AC_SUBST(GST_PLUGIN_LDFLAGS)
dnl *** output files ***