From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id C57A6AFD0 for ; Tue, 15 Apr 2014 20:06:38 +0200 (CEST) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1Wa7kf-0002yp-Hk; Tue, 15 Apr 2014 14:06:37 -0400 From: Neil Horman To: dev@dpdk.org Date: Tue, 15 Apr 2014 14:05:55 -0400 Message-Id: <1397585169-14537-2-git-send-email-nhorman@tuxdriver.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1397585169-14537-1-git-send-email-nhorman@tuxdriver.com> References: <1397585169-14537-1-git-send-email-nhorman@tuxdriver.com> X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: [dpdk-dev] [PATCH 01/15] makefiles: Fixed -share command line option error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 18:06:39 -0000 The shared libraries built with the current makefile set produce static libraries rather than actual shared objects. This is due to several missing options that are required to correctly build shared objects using ld, as well as a mis-specified -share option (which should be -shared). Switching to the use of CC rather than LD and fixing the -shared option corrects these problems and builds the DSOs correctly. Signed-off-by: Neil Horman --- mk/rte.lib.mk | 4 ++-- mk/rte.sharelib.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index f75ca92..8a914db 100644 --- a/mk/rte.lib.mk +++ b/mk/rte.lib.mk @@ -68,7 +68,7 @@ O_TO_A_DO = @set -e; \ $(O_TO_A) && \ echo $(O_TO_A_CMD) > $(call exe2cmd,$(@)) -O_TO_S = $(LD) $(CPU_LDFLAGS) -z muldefs -share $(OBJS-y) -o $(LIB) +O_TO_S = $(CC) $(CPU_LDFLAGS) -z muldefs -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; \ @@ -84,7 +84,7 @@ O_TO_C_DO = @set -e; \ $(lib_dir) \ $(copy_obj) else -O_TO_C = $(LD) -z muldefs -share $(OBJS-y) -o $(LIB_ONE) +O_TO_C = $(CC) -z muldefs -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 3967b51..8e821e0 100644 --- a/mk/rte.sharelib.mk +++ b/mk/rte.sharelib.mk @@ -45,7 +45,7 @@ sharelib: $(LIB_ONE) FORCE OBJS = $(wildcard $(RTE_OUTPUT)/build/lib/*.o) -O_TO_S = $(LD) $(CPU_LDFLAGS) -share $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE) +O_TO_S = $(CC) $(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)" -- 1.8.3.1