DPDK patches and discussions
 help / color / mirror / Atom feed
From: Julien Courtat <julien.courtat@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] mk: fix EXTRA_LDFLAGS override
Date: Fri, 15 Nov 2013 15:22:37 +0100	[thread overview]
Message-ID: <1384525357-17510-1-git-send-email-julien.courtat@6wind.com> (raw)

The GCC prefix -Wl was ignored because the command line value has higher priority.
It ended in impossibilty for GCC to pass parameters to LD.
The prefixed value must override the command line one.

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
---
 mk/rte.app.mk    |    2 +-
 mk/rte.shared.mk |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 728e5b5..d2ce5c0 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -182,7 +182,7 @@ ifeq ($(LINK_USING_CC),1)
 comma := ,
 LDLIBS := $(addprefix -Wl$(comma),$(LDLIBS))
 LDFLAGS := $(addprefix -Wl$(comma),$(LDFLAGS))
-EXTRA_LDFLAGS := $(addprefix -Wl$(comma),$(EXTRA_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)
 else
diff --git a/mk/rte.shared.mk b/mk/rte.shared.mk
index 7a3a78f..e9be02d 100644
--- a/mk/rte.shared.mk
+++ b/mk/rte.shared.mk
@@ -61,7 +61,7 @@ ifeq ($(LINK_USING_CC),1)
 comma := ,
 LDLIBS := $(addprefix -Wl$(comma),$(LDLIBS))
 LDFLAGS := $(addprefix -Wl$(comma),$(LDFLAGS))
-EXTRA_LDFLAGS := $(addprefix -Wl$(comma),$(EXTRA_LDFLAGS))
+override EXTRA_LDFLAGS := $(addprefix -Wl$(comma),$(EXTRA_LDFLAGS))
 O_TO_SO = $(CC) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
 	-shared -o $@ $(OBJS-y) $(LDLIBS)
 else
-- 
1.7.2.5

             reply	other threads:[~2013-11-15 14:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-15 14:22 Julien Courtat [this message]
2013-11-15 14:56 ` 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=1384525357-17510-1-git-send-email-julien.courtat@6wind.com \
    --to=julien.courtat@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).