From: Thomas Monjalon Date: Wed, 17 Dec 2014 17:24:52 +0000 (+0100) Subject: mk: forbid multiple definitions X-Git-Tag: spdx-start~9913 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a32e8b0db67c9954d01349e458649994f432ffae;p=dpdk.git mk: forbid multiple definitions The option "-z muldefs" was set only if not using ld directly. By the way, this option seems to be a useless hack introduced with shared and combined libraries support (e25e4d7ef16b8aa84de). The clean approach is to remove it. Signed-off-by: Thomas Monjalon --- diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index d83e808971..a67c1298a7 100644 --- a/mk/rte.lib.mk +++ b/mk/rte.lib.mk @@ -62,7 +62,6 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) ifeq ($(LINK_USING_CC),1) # Override the definition of LD here, since we're linking with CC LD := $(CC) $(CPU_CFLAGS) -LD_MULDEFS := $(call linkerprefix,-z$(comma)muldefs) CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS)) endif @@ -75,7 +74,7 @@ O_TO_A_DO = @set -e; \ $(O_TO_A) && \ echo $(O_TO_A_CMD) > $(call exe2cmd,$(@)) -O_TO_S = $(LD) $(CPU_LDFLAGS) $(LD_MULDEFS) -shared $(OBJS-y) -o $(LIB) +O_TO_S = $(LD) $(CPU_LDFLAGS) -shared $(OBJS-y) -o $(LIB) O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)"," LD $(@)") O_TO_S_DO = @set -e; \ @@ -91,7 +90,7 @@ O_TO_C_DO = @set -e; \ $(lib_dir) \ $(copy_obj) else -O_TO_C = $(LD) $(LD_MULDEFS) -shared $(OBJS-y) -o $(LIB_ONE) +O_TO_C = $(LD) -shared $(OBJS-y) -o $(LIB_ONE) O_TO_C_STR = $(subst ','\'',$(O_TO_C)) #'# fix syntax highlight O_TO_C_DISP = $(if $(V),"$(O_TO_C_STR)"," LD_C $(@)") O_TO_C_DO = @set -e; \ diff --git a/mk/rte.sharelib.mk b/mk/rte.sharelib.mk index d0ec12a327..d0cc7e3ec2 100644 --- a/mk/rte.sharelib.mk +++ b/mk/rte.sharelib.mk @@ -50,11 +50,10 @@ OBJS = $(wildcard $(RTE_OUTPUT)/build/lib/*.o) ifeq ($(LINK_USING_CC),1) # Override the definition of LD here, since we're linking with CC LD := $(CC) $(CPU_CFLAGS) -LD_MULDEFS := $(call linkerprefix,-z$(comma)muldefs) CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS)) endif -O_TO_S = $(LD) $(CPU_LDFLAGS) $(LD_MULDEFS) -shared $(OBJS) \ +O_TO_S = $(LD) $(CPU_LDFLAGS) -shared $(OBJS) \ -o $(RTE_OUTPUT)/lib/$(LIB_ONE) O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)"," LD $(@)")