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)
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_$(@)) \