[lttng-dev] [PATCH] babeltrace-2.0: do not link with -export-dynamic

Nathan Lynch nathan_lynch at mentor.com
Fri Jun 30 20:52:27 UTC 2017


It seems that changes in the plugin system make passing
-export-dynamic to the linker unnecessary -- a welcome
improvement.

No regressions observed in the test suite.

Signed-off-by: Nathan Lynch <nathan_lynch at mentor.com>
---
 cli/Makefile.am | 2 +-
 configure.ac    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cli/Makefile.am b/cli/Makefile.am
index c45ecd2c83ff..d305bf692a7f 100644
--- a/cli/Makefile.am
+++ b/cli/Makefile.am
@@ -30,7 +30,7 @@ babeltrace_bin_SOURCES = \
 # -Wl,--no-as-needed is needed for recent gold linker who seems to think
 # it knows better and considers libraries with constructors having
 # side-effects as dead code.
-babeltrace_bin_LDFLAGS = $(LD_NO_AS_NEEDED) -Wl,-export-dynamic
+babeltrace_bin_LDFLAGS = $(LD_NO_AS_NEEDED)
 
 # Add all the convenience libraries used by Babeltrace plugins and the
 # library. They will be used when embedding plugins (BUILT_IN_PLUGINS),
diff --git a/configure.ac b/configure.ac
index e8966b8a747b..b9d5e621ac53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,7 +94,7 @@ if test ! -f "$srcdir/plugins/ctf/common/metadata/lexer.c"; then
 fi
 
 
-AM_PATH_GLIB_2_0(2.22.0, ,AC_MSG_ERROR([glib is required in order to compile BabelTrace - download it from ftp://ftp.gtk.org/pub/gtk]) , gmodule)
+AM_PATH_GLIB_2_0(2.22.0, ,AC_MSG_ERROR([glib is required in order to compile BabelTrace - download it from ftp://ftp.gtk.org/pub/gtk]) , gmodule-no-export)
 
 # Check what libraries are required on this platform to link sockets programs.
 AX_LIB_SOCKET_NSL
@@ -406,7 +406,7 @@ AS_IF([test "x$BUILT_IN_PYTHON_PLUGIN_SUPPORT" != x], [
 ])
 AM_CONDITIONAL([BUILT_IN_PYTHON_PLUGIN_SUPPORT], [test "x$built_in_python_plugin_support" = "xyes"])
 
-PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.0.0])
+PKG_CHECK_MODULES(GMODULE, [gmodule-no-export-2.0 >= 2.0.0])
 
 # Logging
 AC_ARG_VAR([BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level for Babeltrace program, library, and plugins (VERBOSE, DEBUG, INFO, WARN, ERROR (default), FATAL, or NONE)])
-- 
2.9.4



More information about the lttng-dev mailing list