From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by dpdk.org (Postfix) with ESMTP id 7AF8C6829 for ; Tue, 29 Apr 2014 13:52:05 +0200 (CEST) Received: by mail-wi0-f169.google.com with SMTP id hi5so363687wib.0 for ; Tue, 29 Apr 2014 04:52:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=Bua7QnrnY6FtXekFZ1s+f/fhSuekfZ5EBrxgPNl1qTE=; b=FLCJPJy7vfrjXaeIC7gDiTCinUoS0QxbWe/XnCq/LC5Gr+ZTMAuVJ8uHZISOJZnrJ1 WQl91W3rnasltOgrxZ0ON4qZRGhA62RilO1yR4puqHn1JbmfDrTrhwlQ19KLj1gtkLIL W7rEpqUZjMeVJWIJjyzqrX3tn/e5BZ0wS1STMjsWiUhqoQjliXrCiG/uKrEhljb1+gY+ ZSx9LhQhNGHzsfN/nZXAw9jmWOQQWuhXHJB3m5vqr/9LSNd8ImhULBRwe9lZpGkhM0Qt ahnRbHKUMWxz9aP9084YMh37eGT6dhR2cNLKgH9QP5ZbWl/lZ3a6Q66T80h9rOQjLWmk di4Q== X-Gm-Message-State: ALoCoQkI34gnLOxyxNIZKk0a5NVsOXmUIAal1MV03fm01C4MBI+XMi6PfqKZ753RZJpJOisgsUKZ X-Received: by 10.194.19.161 with SMTP id g1mr23798809wje.20.1398772328924; Tue, 29 Apr 2014 04:52:08 -0700 (PDT) Received: from XPS13.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id pm5sm30768081wjc.11.2014.04.29.04.52.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Apr 2014 04:52:08 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Tue, 29 Apr 2014 13:52:03 +0200 Message-Id: <1398772323-31255-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 1.9.2 Subject: [dpdk-dev] [PATCH] mk: fix build ignoring other installed versions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 11:52:05 -0000 If some DPDK libraries are installed on the system, the linker was trying to use them before searching in -L path. The obscure reason is that we were prefixing -L with -Wl, to pass it directly to the linker. But -L is also a gcc option. And allowing gcc to process this option fixes the issue. Signed-off-by: Thomas Monjalon --- mk/rte.app.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 072718a..fa67a67 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -51,7 +51,7 @@ LDSCRIPT = $(RTE_LDSCRIPT) endif # default path for libs -LDLIBS += -L$(RTE_SDK_BIN)/lib +LDPATH += -L$(RTE_SDK_BIN)/lib # # Include libraries depending on config if NO_AUTOLIBS is not set @@ -209,10 +209,11 @@ LDLIBS := $(addprefix -Wl$(comma),$(LDLIBS)) LDFLAGS := $(addprefix -Wl$(comma),$(LDFLAGS)) override EXTRA_LDFLAGS := $(addprefix -Wl$(comma),$(EXTRA_LDFLAGS)) O_TO_EXE = $(CC) $(CFLAGS) $(LDFLAGS_$(@)) \ - -Wl,-Map=$(@).map,--cref -o $@ $(OBJS-y) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDLIBS) + -Wl,-Map=$(@).map,--cref -o $@ $(OBJS-y) \ + $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDPATH) $(LDLIBS) else O_TO_EXE = $(LD) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ - -Map=$(@).map --cref -o $@ $(OBJS-y) $(LDLIBS) + -Map=$(@).map --cref -o $@ $(OBJS-y) $(LDPATH) $(LDLIBS) endif O_TO_EXE_STR = $(subst ','\'',$(O_TO_EXE)) #'# fix syntax highlight O_TO_EXE_DISP = $(if $(V),"$(O_TO_EXE_STR)"," LD $(@)") -- 1.9.2