From 0ca5de1ebfa461a8633465a5e177a34e4a98f168 Mon Sep 17 00:00:00 2001 From: Julien Courtat Date: Fri, 15 Nov 2013 15:22:37 +0100 Subject: [PATCH] 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 --- 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 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 -- 2.20.1