build: add full version to SONAME for shared libraries

Fixes issue #781.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452895 (master)

(cherry picked from commit cb0c0509f4)
Change-Id: Ic0793721cb996ec01286ff21ed10fe2076b706ec
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457193
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Jim Harris 2019-05-02 03:15:24 -07:00 committed by Darek Stojaczyk
parent ca3a5cf8de
commit 850a5b642a

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)