From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] mk: fix build ignoring other installed versions
Date: Tue, 29 Apr 2014 13:52:03 +0200 [thread overview]
Message-ID: <1398772323-31255-1-git-send-email-thomas.monjalon@6wind.com> (raw)
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
next reply other threads:[~2014-04-29 11:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 11:52 Thomas Monjalon [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398772323-31255-1-git-send-email-thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).