From: Julien Courtat Date: Fri, 15 Nov 2013 14:22:37 +0000 (+0100) Subject: mk: fix EXTRA_LDFLAGS override X-Git-Tag: spdx-start~10977 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0ca5de1ebfa461a8633465a5e177a34e4a98f168;p=dpdk.git 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 Acked-by: Thomas Monjalon --- diff --git a/mk/rte.app.mk b/mk/rte.app.mk index bdb55f13e9..aab10d18e5 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -198,7 +198,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 7a3a78fde4..e9be02d927 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