DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mk: fix build ignoring other installed versions
@ 2014-04-29 11:52 Thomas Monjalon
  2014-04-30 20:57 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2014-04-29 11:52 UTC (permalink / raw)
  To: dev

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 <thomas.monjalon@6wind.com>
---
 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-01 21:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-29 11:52 [dpdk-dev] [PATCH] mk: fix build ignoring other installed versions Thomas Monjalon
2014-04-30 20:57 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
2014-05-01 20:50   ` Neil Horman
2014-05-01 21:10     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).