From: Sergio Gonzalez Monroy Date: Fri, 1 Jul 2016 14:38:48 +0000 (+0100) Subject: mk: allow duplicate linker flags in libraries list X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1ed3852fa9cd259ece5bbe257abe3c58b69b8fdb;p=dpdk.git mk: allow duplicate linker flags in libraries list Since [1] duplicates in LDLIBS are removed. The side effect is that it does not distinguish between libraries or linker flags. This patch allows multiple linker flags in LDLIBS, such as --whole-archive. [1] Commit: edf4d331dcdb ("mk: eliminate duplicates from libraries list") Signed-off-by: Sergio Gonzalez Monroy --- diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 83314ca8c9..bf8bcf9bd2 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -166,7 +166,8 @@ LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS) # Eliminate duplicates without sorting LDLIBS := $(shell echo $(LDLIBS) | \ - awk '{for (i = 1; i <= NF; i++) { if (!seen[$$i]++) print $$i }}') + awk '{for (i = 1; i <= NF; i++) { \ + if ($$i !~ /^-l.*/ || !seen[$$i]++) print $$i }}') ifeq ($(RTE_DEVEL_BUILD)$(CONFIG_RTE_BUILD_SHARED_LIB),yy) LDFLAGS += -rpath=$(RTE_SDK_BIN)/lib