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),
+# library. They will be used when embedding plugins (--enable-built-in-plugins),
# otherwise we're looking after multiple definitions of the same symbols if
# a plugin's archive (.a) includes the convenience library because
# we're using --whole-archive below (needed to make sure the linker does
$(top_builddir)/compat/libcompat.la \
$(top_builddir)/common/libbabeltrace-common.la \
$(top_builddir)/logging/libbabeltrace-logging.la \
- $(top_builddir)/plugins/libctfcopytrace/libctfcopytrace.la \
$(POPT_LIBS)
-if BUILT_IN_PLUGINS
+if ENABLE_BUILT_IN_PLUGINS
# Takes a plugin name and outputs the needed LDFLAGS to embed it.
#
# The --whole-archive option is important here. From the GNU linker's
# binary that are filled by plugin objects. If the linker discards those
# symbols because the CLI does not use them directly, the CLI reports
# no plugins found (plugins are effectively not embedded).
-pluginarchive = -Wl,--whole-archive,$(PLUGINS_PATH)/$(1)/.libs/babeltrace-plugin-$(1).a,--no-whole-archive
+pluginarchive = $(LD_WHOLE_ARCHIVE)$(PLUGINS_PATH)/$(1)/.libs/babeltrace-plugin-$(1).a$(LD_NO_WHOLE_ARCHIVE)
# Built-in plugins
babeltrace_bin_LDFLAGS += $(call pluginarchive,ctf)
if ENABLE_DEBUG_INFO
babeltrace_bin_LDFLAGS += $(call pluginarchive,lttng-utils)
+babeltrace_bin_LDADD += $(ELFUTILS_LIBS)
endif
endif
babeltrace_log_bin_SOURCES = babeltrace-log.c
babeltrace_log_bin_LDADD = \
$(top_builddir)/compat/libcompat.la \
+ $(top_builddir)/common/libbabeltrace-common.la \
+ $(top_builddir)/logging/libbabeltrace-logging.la \
$(POPT_LIBS)
babeltrace_log_bin_CFLAGS = $(AM_CFLAGS) '-DBT_CLI_PATH="$(abs_top_builddir)/cli/babeltrace$(EXEEXT)"'