From 1ed3852fa9cd259ece5bbe257abe3c58b69b8fdb Mon Sep 17 00:00:00 2001 From: Sergio Gonzalez Monroy Date: Fri, 1 Jul 2016 15:38:48 +0100 Subject: [PATCH] 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 --- mk/rte.app.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.20.1