forked from openssl/openssl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify the handling of shared library version numbers
$(SHLIB_MAJOR).$(SHLIB_MINOR) is really a synonym for $(SHLIB_VERSION_NUMBER), and is therefore an added complexity, so better to use $(SHLIB_VERSION_NUMBER) directly. SHLIB_MAJOR and SHLIB_MINOR are now unused, but are kept around purely as information in case someone relies on their existence. At the same time, add support for custom shared library extensions with the three new Makefile variables SHLIB_EXT, SHLIB_EXT_SIMPLE and SHLIB_EXT_IMPORT. By default, they hold the variants of shared library extensions we support. On mingw and cygwin, SHLIB_EXT_IMPORT is defined; on all other Unix platforms, it's empty. An example to get shared libraries with a slightly different SOVER name: $ make SHLIB_EXT='.$(SHLIB_VERSION_NUMBER).so' Fixes openssl#3902 Reviewed-by: Andy Polyakov <[email protected]> (Merged from openssl#3964)
- Loading branch information
Showing
10 changed files
with
82 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,7 +183,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
thread_scheme => "pthreads", | ||
shared_target => "solaris-shared", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
#### Solaris x86 with GNU C setups | ||
"solaris-x86-gcc" => { | ||
|
@@ -333,7 +333,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "irix-shared", | ||
shared_ldflag => "-mabi=n32", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
multilib => "32", | ||
}, | ||
"irix-mips3-cc" => { | ||
|
@@ -350,7 +350,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "irix-shared", | ||
shared_ldflag => "-n32", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
multilib => "32", | ||
}, | ||
# N64 ABI builds. | ||
|
@@ -368,7 +368,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "irix-shared", | ||
shared_ldflag => "-mabi=64", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
multilib => "64", | ||
}, | ||
"irix64-mips4-cc" => { | ||
|
@@ -385,7 +385,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "irix-shared", | ||
shared_ldflag => "-64", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
multilib => "64", | ||
}, | ||
|
||
|
@@ -431,7 +431,7 @@ sub vms_info { | |
shared_target => "hpux-shared", | ||
shared_cflag => "-fPIC", | ||
shared_ldflag => "-shared", | ||
shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
"hpux-parisc1_1-gcc" => { | ||
inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ], | ||
|
@@ -451,7 +451,7 @@ sub vms_info { | |
shared_target => "hpux-shared", | ||
shared_cflag => "-fpic", | ||
shared_ldflag => "-shared", | ||
shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", | ||
multilib => "/pa20_64", | ||
}, | ||
|
||
|
@@ -473,7 +473,7 @@ sub vms_info { | |
shared_target => "hpux-shared", | ||
shared_cflag => "+Z", | ||
shared_ldflag => "-b", | ||
shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
"hpux-parisc1_1-cc" => { | ||
inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ], | ||
|
@@ -494,7 +494,7 @@ sub vms_info { | |
shared_target => "hpux-shared", | ||
shared_cflag => "+Z", | ||
shared_ldflag => "+DD64 -b", | ||
shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)", | ||
multilib => "/pa20_64", | ||
}, | ||
|
||
|
@@ -513,7 +513,7 @@ sub vms_info { | |
shared_target => "hpux-shared", | ||
shared_cflag => "+Z", | ||
shared_ldflag => "+DD32 -b", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
multilib => "/hpux32", | ||
}, | ||
# Frank Geurts <[email protected]> has patiently assisted | ||
|
@@ -532,7 +532,7 @@ sub vms_info { | |
shared_target => "hpux-shared", | ||
shared_cflag => "+Z", | ||
shared_ldflag => "+DD64 -b", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
multilib => "/hpux64", | ||
}, | ||
# GCC builds... | ||
|
@@ -550,7 +550,7 @@ sub vms_info { | |
shared_target => "hpux-shared", | ||
shared_cflag => "-fpic", | ||
shared_ldflag => "-shared", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
multilib => "/hpux32", | ||
}, | ||
"hpux64-ia64-gcc" => { | ||
|
@@ -567,7 +567,7 @@ sub vms_info { | |
shared_target => "hpux-shared", | ||
shared_cflag => "-fpic", | ||
shared_ldflag => "-mlp64 -shared", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
multilib => "/hpux64", | ||
}, | ||
|
||
|
@@ -632,7 +632,7 @@ sub vms_info { | |
shared_target => "linux-shared", | ||
shared_cflag => "-fPIC -DOPENSSL_USE_NODELETE", | ||
shared_ldflag => "-Wl,-znodelete", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
"linux-generic64" => { | ||
inherit_from => [ "linux-generic32" ], | ||
|
@@ -874,7 +874,7 @@ sub vms_info { | |
shared_target => "linux-shared", | ||
shared_cflag => "--pic", | ||
shared_ldflag => add("-z --sysv --shared"), | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
ranlib => "true", | ||
}, | ||
|
||
|
@@ -990,7 +990,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "bsd-gcc-shared", | ||
shared_cflag => "-fPIC", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
"BSD-generic64" => { | ||
inherit_from => [ "BSD-generic32" ], | ||
|
@@ -1046,7 +1046,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "bsd-gcc-shared", | ||
shared_cflag => "-fPIC", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
|
||
"nextstep" => { | ||
|
@@ -1080,7 +1080,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "bsd-gcc-shared", | ||
shared_cflag => "-fPIC", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
"QNX6-i386" => { | ||
inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], | ||
|
@@ -1090,7 +1090,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "bsd-gcc-shared", | ||
shared_cflag => "-fPIC", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
|
||
#### SCO/Caldera targets. | ||
|
@@ -1133,7 +1133,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "svr5-shared", | ||
shared_cflag => "-Kpic", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
"unixware-7-gcc" => { | ||
inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], | ||
|
@@ -1147,7 +1147,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "gnu-shared", | ||
shared_cflag => "-fPIC", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
# SCO 5 - Ben Laurie <[email protected]> says the -O breaks the SCO cc. | ||
"sco5-cc" => { | ||
|
@@ -1160,7 +1160,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "svr3-shared", | ||
shared_cflag => "-Kpic", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
"sco5-gcc" => { | ||
inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], | ||
|
@@ -1173,7 +1173,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "svr3-shared", | ||
shared_cflag => "-fPIC", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
|
||
#### IBM's AIX. | ||
|
@@ -1196,7 +1196,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "aix-shared", | ||
shared_ldflag => "-shared -static-libgcc -Wl,-G", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
arflags => "-X32", | ||
}, | ||
"aix64-gcc" => { | ||
|
@@ -1213,7 +1213,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "aix-shared", | ||
shared_ldflag => "-maix64 -shared -static-libgcc -Wl,-G", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
arflags => "-X64", | ||
}, | ||
"aix-cc" => { | ||
|
@@ -1231,7 +1231,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "aix-shared", | ||
shared_ldflag => "-q32 -G", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
arflags => "-X 32", | ||
}, | ||
"aix64-cc" => { | ||
|
@@ -1249,7 +1249,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "aix-shared", | ||
shared_ldflag => "-q64 -G", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
arflags => "-X 64", | ||
}, | ||
|
||
|
@@ -1593,7 +1593,7 @@ sub vms_info { | |
shared_target => "darwin-shared", | ||
shared_cflag => "-fPIC", | ||
shared_ldflag => "-dynamiclib", | ||
shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", | ||
shared_extension => ".\$(SHLIB_VERSION_NUMBER).dylib", | ||
}, | ||
# Option "freeze" such as -std=gnu9x can't negatively interfere | ||
# with future defaults for below two targets, because MacOS X | ||
|
@@ -1677,7 +1677,7 @@ sub vms_info { | |
dso_scheme => "dlfcn", | ||
shared_target => "linux-shared", | ||
shared_cflag => "-fPIC", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
}, | ||
|
||
##### VxWorks for various targets | ||
|
@@ -1757,7 +1757,7 @@ sub vms_info { | |
shared_target => "linux-shared", | ||
shared_cflag => "-fPIC", | ||
shared_ldflag => "-shared", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
ranlib => "$ENV{'RANLIB'}", | ||
}, | ||
"uClinux-dist64" => { | ||
|
@@ -1773,7 +1773,7 @@ sub vms_info { | |
shared_target => "linux-shared", | ||
shared_cflag => "-fPIC", | ||
shared_ldflag => "-shared", | ||
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", | ||
ranlib => "$ENV{'RANLIB'}", | ||
}, | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.