summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorFerruh Yigit <ferruh.yigit@intel.com>2015-12-03 13:51:08 +0000
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-12-06 15:41:04 +0100
commit9f8eeb60efb8717d071a271577bb6f1f29bff41d (patch)
tree3717fdf550acb881c6673becd76dd18fd89b2ca1 /mk
parent8c91541188c911e690fb745e575763bd12faf4d2 (diff)
downloaddpdk-9f8eeb60efb8717d071a271577bb6f1f29bff41d.zip
dpdk-9f8eeb60efb8717d071a271577bb6f1f29bff41d.tar.gz
dpdk-9f8eeb60efb8717d071a271577bb6f1f29bff41d.tar.xz
mk: fix combined lib build with ABI versioning
Fixes following error (observed when versioning macros used): LD libdpdk.so /usr/bin/ld: /root/dpdk/build/lib/libdpdk.so: version node not found for symbol <function>@DPDK_x.y Also resulting combined library contains symbol version information: $ readelf -a build/lib/libdpdk.so | grep rte_eal_ | grep @ | head <...> GLOBAL DEFAULT 12 rte_eal_alarm_set@@DPDK_2.0 <...> GLOBAL DEFAULT 12 rte_eal_pci_write_config@@DPDK_2.1 <...> GLOBAL DEFAULT 12 rte_eal_remote_launch@@DPDK_2.0 ... Versioning fixed by merging all version scripts into one automatically and feeding it to final library. Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/rte.sharelib.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/rte.sharelib.mk b/mk/rte.sharelib.mk
index 7bb7219..70c49a8 100644
--- a/mk/rte.sharelib.mk
+++ b/mk/rte.sharelib.mk
@@ -40,6 +40,8 @@ LIB_ONE := lib$(RTE_LIBNAME).so
else
LIB_ONE := lib$(RTE_LIBNAME).a
endif
+COMBINED_MAP=$(BUILDDIR)/lib/libdpdk.map
+COMBINED_LDFLAGS += --version-script=$(COMBINED_MAP)
endif
.PHONY:sharelib
@@ -51,9 +53,10 @@ ifeq ($(LINK_USING_CC),1)
# Override the definition of LD here, since we're linking with CC
LD := $(CC) $(CPU_CFLAGS)
O_TO_S = $(LD) $(call linkerprefix,$(CPU_LDFLAGS)) \
+ $(call linkerprefix,$(COMBINED_LDFLAGS)) \
-shared $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE)
else
-O_TO_S = $(LD) $(CPU_LDFLAGS) \
+O_TO_S = $(LD) $(CPU_LDFLAGS) $(COMBINED_LDFLAGS) \
-shared $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE)
endif
@@ -79,6 +82,7 @@ ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y)
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
$(LIB_ONE): FORCE
@[ -d $(dir $@) ] || mkdir -p $(dir $@)
+ @$(SRCDIR)/scripts/merge-maps.sh > $(COMBINED_MAP)
$(O_TO_S_DO)
else
$(LIB_ONE): FORCE