Fix: null check after deref, use uninitialized or freed variable
[babeltrace.git] / cli / Makefile.am
index f2a180d67f8df4c86db40074738a54d75b43fcf8..ef5a19aacac0ce2c6d69e6c9034aa7823a07356f 100644 (file)
@@ -34,7 +34,7 @@ babeltrace_bin_SOURCES = \
 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
@@ -48,7 +48,7 @@ babeltrace_bin_LDADD = \
        $(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
@@ -63,7 +63,7 @@ if BUILT_IN_PLUGINS
 # 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)
@@ -72,6 +72,7 @@ babeltrace_bin_LDFLAGS += $(call pluginarchive,utils)
 
 if ENABLE_DEBUG_INFO
 babeltrace_bin_LDFLAGS += $(call pluginarchive,lttng-utils)
+babeltrace_bin_LDADD += $(ELFUTILS_LIBS)
 endif
 endif
 
This page took 0.025197 seconds and 4 git commands to generate.