diff options
author | Richard Levitte <levitte@openssl.org> | 2018-10-23 15:09:57 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-01-21 19:31:32 +0100 |
commit | 9dd4ed28eb5972f62723985429b57f42eefda124 (patch) | |
tree | 6c5d9d1cba152032d08725e885a532f82332beae /Configurations/10-main.conf | |
parent | c162a8c344f12b2e0e788920358f51181ddf168f (diff) |
Rework building: Unix changes to handle extensions and product names
Add platform::Unix, which is a generic Unix module to support product
name and extensions functionlity. However, this isn't quite enough,
as mingw and Cygwin builds are done using the same templates, but
since shared libraries work as on Windows and are named accordingly,
platform::mingw and platform::Cygwin were also added to provide the
necessary tweaks.
This reworks Configurations/unix-Makefile.tmpl to work out product
names in platform::Unix et al terms. In this one, we currently do
care about the *_extension config attributes, and the modules adapt
accordingly where it matters.
This change also affected crypto/include/internal/dso_conf.h.in, since
the DSO extension is meant to be the same as the short shared library
extension, which isn't '.so' everywhere.
'shared_extension' attributes that had the value
'.so.\$(SHLIB_VERSION_NUMBER)' are removed, platform::Unix provides
an extension where the shared library version number is hard-coded
instead.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7473)
Diffstat (limited to 'Configurations/10-main.conf')
-rw-r--r-- | Configurations/10-main.conf | 94 |
1 files changed, 32 insertions, 62 deletions
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 3de8c29a26..054e38c075 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -212,7 +212,6 @@ my %targets = ( dso_scheme => "dlfcn", thread_scheme => "pthreads", shared_target => "solaris", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", shared_ldflag => "-Wl,-Bsymbolic", shared_defflag => "-Wl,-M,", shared_sonameflag=> "-Wl,-h,", @@ -365,7 +364,6 @@ my %targets = ( thread_scheme => "pthreads", dso_scheme => "dlfcn", shared_target => "self", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", shared_ldflag => "-shared -Wl,-Bsymbolic", shared_sonameflag=> "-Wl,-soname,", }, @@ -534,7 +532,6 @@ my %targets = ( bn_ops => "SIXTY_FOUR_BIT", shared_cflag => "+Z", shared_ldflag => add_before("-b"), - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", multilib => "/hpux32", }, "hpux64-ia64-cc" => { @@ -548,7 +545,6 @@ my %targets = ( bn_ops => "SIXTY_FOUR_BIT_LONG", shared_cflag => "+Z", shared_ldflag => add_before("-b"), - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", multilib => "/hpux64", }, # GCC builds... @@ -562,7 +558,6 @@ my %targets = ( bn_ops => "SIXTY_FOUR_BIT", shared_cflag => "-fpic", shared_ldflag => add_before("-shared"), - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", multilib => "/hpux32", }, "hpux64-ia64-gcc" => { @@ -575,7 +570,6 @@ my %targets = ( bn_ops => "SIXTY_FOUR_BIT_LONG", shared_cflag => "-fpic", shared_ldflag => add_before("-shared"), - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", multilib => "/hpux64", }, @@ -652,7 +646,6 @@ my %targets = ( shared_target => "linux-shared", shared_cflag => "-fPIC", shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" }, - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", enable => [ "afalgeng" ], }, "linux-generic64" => { @@ -906,7 +899,6 @@ my %targets = ( shared_target => "linux-shared", shared_cflag => "--pic", shared_ldflag => add("-z --sysv --shared"), - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", ranlib => "true", }, @@ -933,7 +925,6 @@ my %targets = ( dso_scheme => "dlfcn", shared_target => "bsd-gcc-shared", shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", }, "BSD-generic64" => { inherit_from => [ "BSD-generic32" ], @@ -991,7 +982,6 @@ my %targets = ( dso_scheme => "dlfcn", shared_target => "bsd-gcc-shared", shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", }, "nextstep" => { @@ -1052,7 +1042,6 @@ my %targets = ( dso_scheme => "dlfcn", shared_target => "svr5-shared", shared_cflag => "-Kpic", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", }, "unixware-7-gcc" => { inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], @@ -1067,7 +1056,6 @@ my %targets = ( dso_scheme => "dlfcn", shared_target => "gnu-shared", shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", }, # SCO 5 - Ben Laurie says the -O breaks the SCO cc. "sco5-cc" => { @@ -1080,7 +1068,6 @@ my %targets = ( dso_scheme => "dlfcn", shared_target => "svr3-shared", shared_cflag => "-Kpic", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", }, "sco5-gcc" => { inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], @@ -1093,7 +1080,6 @@ my %targets = ( dso_scheme => "dlfcn", shared_target => "svr3-shared", shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", }, #### IBM's AIX. @@ -1114,8 +1100,6 @@ my %targets = ( module_ldflags => "-Wl,-G,-bsymbolic,-bexpall", shared_ldflag => "-Wl,-G,-bsymbolic", shared_defflag => "-Wl,-bE:", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", - dso_extension => ".so", lib_extension => shared("_a.a"), shared_extension_simple => shared(".a"), }, @@ -1376,30 +1360,37 @@ my %targets = ( }, #### MinGW - "mingw" => { - inherit_from => [ "BASE_unix", asm("x86_asm"), - sub { $disabled{shared} ? () : "x86_uplink" } ], + "mingw-common" => { + inherit_from => [ 'BASE_unix' ], + template => 1, CC => "gcc", CFLAGS => picker(default => "-Wall", debug => "-g -O0", - release => "-O3 -fomit-frame-pointer"), - cflags => "-m32", + release => "-O3"), cppflags => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN", threads("-D_MT")), lib_cppflags => "-DL_ENDIAN", - sys_id => "MINGW32", ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"), - bn_ops => "BN_LLONG EXPORT_VAR_AS_FN", + bn_ops => "EXPORT_VAR_AS_FN", thread_scheme => "winthreads", - perlasm_scheme => "coff", dso_scheme => "win32", shared_target => "mingw-shared", shared_cppflags => add("_WINDLL"), shared_ldflag => "-static-libgcc", + apps_aux_src => add("win32_init.c"), + + perl_platform => 'mingw', + }, + "mingw" => { + inherit_from => [ "mingw-common", asm("x86_asm"), + sub { $disabled{shared} ? () : "x86_uplink" } ], + CFLAGS => add(picker(release => "-fomit-frame-pointer")), + cflags => "-m32", + sys_id => "MINGW32", + bn_ops => add("BN_LLONG"), + perlasm_scheme => "coff", shared_rcflag => "--target=pe-i386", - shared_extension => ".dll", multilib => "", - apps_aux_src => add("win32_init.c"), }, "mingw64" => { # As for OPENSSL_USE_APPLINK. Applink makes it possible to use @@ -1410,28 +1401,13 @@ my %targets = ( # consider its binaries for using with non-mingw64 run-time # environment. And as mingw64 is always consistent with itself, # Applink is never engaged and can as well be omitted. - inherit_from => [ "BASE_unix", asm("x86_64_asm") ], - CC => "gcc", - CFLAGS => picker(default => "-Wall", - debug => "-g -O0", - release => "-O3"), + inherit_from => [ "mingw-common", asm("x86_64_asm") ], cflags => "-m64", - cppflags => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN", - threads("-D_MT")), - lib_cppflags => "-DL_ENDIAN", sys_id => "MINGW64", - ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"), - bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN", - thread_scheme => "winthreads", + bn_ops => add("SIXTY_FOUR_BIT"), perlasm_scheme => "mingw64", - dso_scheme => "win32", - shared_target => "mingw-shared", - shared_cppflags => add("_WINDLL"), - shared_ldflag => "-static-libgcc", shared_rcflag => "--target=pe-x86-64", - shared_extension => ".dll", multilib => "64", - apps_aux_src => add("win32_init.c"), }, #### UEFI @@ -1455,37 +1431,34 @@ my %targets = ( }, #### Cygwin - "Cygwin-x86" => { + "Cygwin-common" => { inherit_from => [ "BASE_unix", asm("x86_asm") ], + template => 1, + CC => "gcc", CFLAGS => picker(default => "-Wall", debug => "-g -O0", - release => "-O3 -fomit-frame-pointer"), + release => "-O3"), lib_cppflags => "-DTERMIOS -DL_ENDIAN", sys_id => "CYGWIN", - bn_ops => "BN_LLONG", thread_scheme => "pthread", - perlasm_scheme => "coff", dso_scheme => "dlfcn", shared_target => "cygwin-shared", shared_cppflags => "-D_WINDLL", - shared_extension => ".dll", + + perl_platform => 'Cygwin', + }, + "Cygwin-x86" => { + inherit_from => [ "Cygwin-common", asm("x86_asm") ], + CFLAGS => add(picker(release => "-O3 -fomit-frame-pointer")), + bn_ops => "BN_LLONG", + perlasm_scheme => "coff", }, "Cygwin-x86_64" => { - inherit_from => [ "BASE_unix", asm("x86_64_asm") ], + inherit_from => [ "Cygwin-common", asm("x86_64_asm") ], CC => "gcc", - CFLAGS => picker(default => "-Wall", - debug => "-g -O0", - release => "-O3"), - lib_cppflags => "-DTERMIOS -DL_ENDIAN", - sys_id => "CYGWIN", bn_ops => "SIXTY_FOUR_BIT_LONG", - thread_scheme => "pthread", perlasm_scheme => "mingw64", - dso_scheme => "dlfcn", - shared_target => "cygwin-shared", - shared_cppflags => "-D_WINDLL", - shared_extension => ".dll", }, # Backward compatibility for those using this target "Cygwin" => { @@ -1572,7 +1545,6 @@ my %targets = ( dso_scheme => "dlfcn", shared_target => "linux-shared", shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", }, ##### VxWorks for various targets @@ -1688,7 +1660,6 @@ my %targets = ( dso_scheme => sub { env('LIBSSL_dlfcn') }, shared_target => "linux-shared", shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", ranlib => sub { env('RANLIB') }, }, "uClinux-dist64" => { @@ -1701,7 +1672,6 @@ my %targets = ( dso_scheme => sub { env('LIBSSL_dlfcn') }, shared_target => "linux-shared", shared_cflag => "-fPIC", - shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)", ranlib => sub { env('RANLIB') }, }, |