BUILD: Use unmodified SAVED_LDFLAGS from env for linking plugins.

In commit dce6b012 we added the LDFLAGS, which were modified by the
configure script, to the linker stage of the plugins.  Doing so turns
out not to work well for all system architectures.

This approach uses the unmodified LDFLAGS, stored in the SAVED_LDFLAGS
variable by the configure script, from the system environment for
linking dynamic plugins, which is very likely not to cause any harm.
This commit is contained in:
Björn Esser 2020-02-22 15:12:13 +01:00 committed by Eugene Sandulenko
parent b19df6cb60
commit 0974f168b2

View File

@ -47,7 +47,7 @@ ifdef PLUGIN
PLUGIN-$(MODULE) := plugins/$(PLUGIN_PREFIX)$(notdir $(MODULE))$(PLUGIN_SUFFIX)
$(PLUGIN-$(MODULE)): $(MODULE_OBJS-$(MODULE)) $(PLUGIN_EXTRA_DEPS)
$(QUIET)$(MKDIR) plugins
$(QUIET_PLUGIN)$(CXX) $(filter-out $(PLUGIN_EXTRA_DEPS),$+) $(PLUGIN_LDFLAGS) -o $@
$(QUIET_PLUGIN)$(CXX) $(SAVED_LDFLAGS) $(filter-out $(PLUGIN_EXTRA_DEPS),$+) $(PLUGIN_LDFLAGS) -o $@
# Reset PLUGIN var
PLUGIN:=