# -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.
-babeltrace2_bin_LDFLAGS = $(LD_NO_AS_NEEDED)
+babeltrace2_bin_LDFLAGS = $(AM_LDFLAGS) $(LD_NO_AS_NEEDED)
# Add all the convenience libraries used by Babeltrace plugins and the
# library. They will be used when embedding plugins (--enable-built-in-plugins),