mk: fix link to static combined library

When building static archives with CONFIG_COMBINED_LIBS, we still need to
specify --whole-archive to pull in all the proper constructors.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Lyn M <netinal7@gmail.com>
Tested-by: Lyn M <netinal7@gmail.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
Neil Horman 2015-01-02 14:58:57 -05:00 committed by Thomas Monjalon
parent ec0b5f4fbd
commit 9b0895e864

View File

@ -61,6 +61,10 @@ ifeq ($(NO_AUTOLIBS),)
LDLIBS += --whole-archive
ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y)
LDLIBS += -l$(RTE_LIBNAME)
endif
ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y)
@ -251,10 +255,6 @@ build: _postbuild
exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y)
LDLIBS += -l$(RTE_LIBNAME)
endif
ifeq ($(LINK_USING_CC),1)
override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS))
O_TO_EXE = $(CC) $(CFLAGS) $(LDFLAGS_$(@)) \