From 5e3f38cf868951a009cc2c48bde0927c409b524a Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 19 Aug 2018 07:04:19 -0400 Subject: [PATCH] Allow previous version of shared library on Solaris --- GNUmakefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index cca092b3..84ef61a6 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -763,16 +763,20 @@ ifeq ($(strip $(LIB_PATCH)),) endif 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 SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR) # Linux uses -Wl,-soname 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) endif # Solaris uses -Wl,-h 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) endif endif # HAS_SOLIB_VERSION