From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3D13C7EEF for ; Fri, 6 Nov 2015 14:58:13 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 06 Nov 2015 05:58:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,252,1444719600"; d="scan'208";a="595259136" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by FMSMGA003.fm.intel.com with ESMTP; 06 Nov 2015 05:58:11 -0800 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id tA6DwAsX025490; Fri, 6 Nov 2015 13:58:11 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id tA6DwAbY020065; Fri, 6 Nov 2015 13:58:10 GMT Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id tA6DwA6H020061; Fri, 6 Nov 2015 13:58:10 GMT From: Ferruh Yigit To: dev@dpdk.org Date: Fri, 6 Nov 2015 13:58:05 +0000 Message-Id: <1446818285-20019-2-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1446818285-20019-1-git-send-email-ferruh.yigit@intel.com> References: <1446477827-11541-1-git-send-email-ferruh.yigit@intel.com> <1446818285-20019-1-git-send-email-ferruh.yigit@intel.com> Subject: [dpdk-dev] [PATCH] mk: fix ABI versioning compile error for combined shared library 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: Fri, 06 Nov 2015 13:58:13 -0000 Fixes following error: LD libdpdk.so /usr/bin/ld: /root/dpdk/build/lib/libdpdk.so: version node not found for symbol @DPDK_x.y Defines version symbols in a fixed path libdpdk.map file and this value hardcoded into makefile Signed-off-by: Ferruh Yigit --- drivers/net/Makefile | 3 +++ lib/Makefile | 3 +++ lib/libdpdk.map | 12 ++++++++++++ mk/rte.sdkbuild.mk | 2 +- mk/rte.sharelib.mk | 1 + 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 lib/libdpdk.map diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 6da1ce2..d30018c 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -50,5 +50,8 @@ DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += xenvirt +ifeq ($(COMBINED_BUILD),1) include $(RTE_SDK)/mk/rte.sharelib.mk +endif + include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/lib/Makefile b/lib/Makefile index 9727b83..33d76a6 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -62,5 +62,8 @@ DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni DIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += librte_ivshmem endif +ifeq ($(COMBINED_BUILD),1) include $(RTE_SDK)/mk/rte.sharelib.mk +endif + include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/lib/libdpdk.map b/lib/libdpdk.map new file mode 100644 index 0000000..3988a3f --- /dev/null +++ b/lib/libdpdk.map @@ -0,0 +1,12 @@ +DPDK_2.0 { + +}; + +DPDK_2.1 { + +} DPDK_2.0; + +DPDK_2.2 { + +} DPDK_2.1; + diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk index 38ec7bd..d4e3abf 100644 --- a/mk/rte.sdkbuild.mk +++ b/mk/rte.sdkbuild.mk @@ -94,7 +94,7 @@ $(ROOTDIRS-y): @echo "== Build $@" $(Q)$(MAKE) S=$@ -f $(RTE_SRCDIR)/$@/Makefile -C $(BUILDDIR)/$@ all @if [ $@ = drivers -a $(CONFIG_RTE_BUILD_COMBINE_LIBS) = y ]; then \ - $(MAKE) -f $(RTE_SDK)/lib/Makefile sharelib; \ + COMBINED_BUILD=1 $(MAKE) -f $(RTE_SDK)/lib/Makefile sharelib; \ fi %_clean: diff --git a/mk/rte.sharelib.mk b/mk/rte.sharelib.mk index 7bb7219..1f71fcb 100644 --- a/mk/rte.sharelib.mk +++ b/mk/rte.sharelib.mk @@ -40,6 +40,7 @@ LIB_ONE := lib$(RTE_LIBNAME).so else LIB_ONE := lib$(RTE_LIBNAME).a endif +CPU_LDFLAGS += --version-script=$(SRCDIR)/lib/libdpdk.map endif .PHONY:sharelib -- 2.5.0