build: add full version to SONAME for shared libraries

Fixes issue #781.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic0793721cb996ec01286ff21ed10fe2076b706ec

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452895
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Jim Harris 2019-05-02 03:15:24 -07:00
parent 3837f0d0f5
commit cb0c0509f4

View File

@ -265,7 +265,7 @@ SO_SUFFIX_ALL := $(SO_VER).$(SO_MINOR)
# Provide function to ease build of a shared lib
define spdk_build_realname_shared_lib
$(CC) -o $@ -shared $(CPPFLAGS) $(LDFLAGS) \
-Wl,--soname,$(patsubst %.so.$(SO_SUFFIX_ALL),%.so.$(SO_VER),$(notdir $@)) \
-Wl,--soname,$(patsubst %.so.$(SO_SUFFIX_ALL),%.so.$(SO_SUFFIX_ALL),$(notdir $@)) \
-Wl,--whole-archive $(1) -Wl,--no-whole-archive \
-Wl,--version-script=$(2) \
$(3)