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 66A1C8D96 for ; Mon, 2 Nov 2015 16:23:53 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 02 Nov 2015 07:23:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,234,1444719600"; d="scan'208";a="592574997" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by FMSMGA003.fm.intel.com with ESMTP; 02 Nov 2015 07:23:51 -0800 Received: from sivlogin002.ir.intel.com (sivlogin002.ir.intel.com [10.237.217.37]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id tA2FNo4j006777; Mon, 2 Nov 2015 15:23:50 GMT Received: from sivlogin002.ir.intel.com (localhost [127.0.0.1]) by sivlogin002.ir.intel.com with ESMTP id tA2FNoP2011646; Mon, 2 Nov 2015 15:23:50 GMT Received: (from fyigit@localhost) by sivlogin002.ir.intel.com with œ id tA2FNnll011642; Mon, 2 Nov 2015 15:23:50 GMT From: Ferruh Yigit To: dev@dpdk.org Date: Mon, 2 Nov 2015 15:23:47 +0000 Message-Id: <1446477827-11541-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <20151102102023.GA29052@sivlogin002.ir.intel.com> References: <20151102102023.GA29052@sivlogin002.ir.intel.com> Cc: Eric Kinzie Subject: [dpdk-dev] [PATCH v2] 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: Mon, 02 Nov 2015 15:23:53 -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 -- 1.9.3