mk: fix link with CC
[dpdk.git] / mk / rte.sharelib.mk
index d0cc7e3..de53558 100644 (file)
@@ -50,11 +50,13 @@ 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)
-CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS))
+O_TO_S = $(LD) $(call linkerprefix,$(CPU_LDFLAGS)) \
+       -shared $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE)
+else
+O_TO_S = $(LD) $(CPU_LDFLAGS) \
+       -shared $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE)
 endif
 
-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 $(@)")
 O_TO_S_CMD = "cmd_$@ = $(O_TO_S_STR)"