Allow previous version of shared library on Solaris

pull/709/head
Jeffrey Walton 2018-08-19 07:04:19 -04:00
parent 3e23c55885
commit 5e3f38cf86
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 6 additions and 2 deletions

View File

@ -763,16 +763,20 @@ ifeq ($(strip $(LIB_PATCH)),)
endif endif
ifeq ($(HAS_SOLIB_VERSION),1) ifeq ($(HAS_SOLIB_VERSION),1)
# Full version suffix for shared library
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
# Different patchlevels and minors are compatible since 6.1 # Different patchlevels and minors are compatible since 6.1
SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR) SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR)
# Linux uses -Wl,-soname # Linux uses -Wl,-soname
ifeq ($(IS_LINUX),1) ifeq ($(IS_LINUX),1)
# Linux uses full version suffix for shared library
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX) SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif endif
# Solaris uses -Wl,-h # Solaris uses -Wl,-h
ifeq ($(IS_SUN),1) ifeq ($(IS_SUN),1)
# Solaris uses major version suffix for shared library, but we use major.minor
# The minor version allows previous version to remain and not overwritten.
# https://blogs.oracle.com/solaris/how-to-name-a-solaris-shared-object-v2
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR)
SOLIB_FLAGS=-Wl,-h,libcryptopp.so$(SOLIB_COMPAT_SUFFIX) SOLIB_FLAGS=-Wl,-h,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif endif
endif # HAS_SOLIB_VERSION endif # HAS_SOLIB_VERSION