From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] mk: fix dependency on toolchain libraries
Date: Wed, 13 Jul 2016 09:42:08 +0200 [thread overview]
Message-ID: <1468395728-6968-2-git-send-email-thomas.monjalon@6wind.com> (raw)
In-Reply-To: <1468395728-6968-1-git-send-email-thomas.monjalon@6wind.com>
The -l options specifying libraries to link with are in LDLIBS.
But it can happen to have some libraries in other variables.
In case of a low level dependency specified in some environments
via EXTRA_LDFLAGS, there can be an unresolved issue due to a
wrong linking order. Indeed the libraries must be specified from
the higher level (dependency consumers) to the lower level (dependencies).
It is fixed by moving LDLIBS before LDFLAGS variables in the link
command line.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
---
mk/rte.app.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index f9acb74..886dbdd 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -193,11 +193,11 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
ifeq ($(LINK_USING_CC),1)
O_TO_EXE = $(CC) -o $@ $(CFLAGS) $(OBJS-y) $(call linkerprefix, \
- $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) $(LDLIBS) \
+ $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
$(MAPFLAGS))
else
O_TO_EXE = $(LD) -o $@ $(OBJS-y) \
- $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) $(LDLIBS) \
+ $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
$(MAPFLAGS)
endif
O_TO_EXE_STR = $(subst ','\'',$(O_TO_EXE)) #'# fix syntax highlight
--
2.7.0
next prev parent reply other threads:[~2016-07-13 7:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 7:42 [dpdk-dev] [PATCH 1/2] mk: clean up application linker flags Thomas Monjalon
2016-07-13 7:42 ` Thomas Monjalon [this message]
2016-07-15 15:22 ` [dpdk-dev] [PATCH 2/2] mk: fix dependency on toolchain libraries 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=1468395728-6968-2-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).