summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Courtat <julien.courtat@6wind.com>2013-11-15 15:22:37 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-01-15 18:08:43 +0100
commit3297c985823c741ae764d899c5c21350364302bc (patch)
tree8da71a07809296033ff04659d2a887b9075c75db
parentbc686b84baef0f39ca04352ca4f8b72f3b910ecd (diff)
downloaddpdk-3297c985823c741ae764d899c5c21350364302bc.zip
dpdk-3297c985823c741ae764d899c5c21350364302bc.tar.gz
dpdk-3297c985823c741ae764d899c5c21350364302bc.tar.xz
mk: fix EXTRA_LDFLAGS override
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> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
-rw-r--r--mk/rte.app.mk2
-rw-r--r--mk/rte.shared.mk2
2 files changed, 2 insertions, 2 deletions
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index f863bfd..1c875e5 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