From 81183680797f16bc05d39c1e9c1bf007fdbe4e19 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 4 Dec 2017 14:27:58 +0100 Subject: Build file templates: Replace the use of Makefile.shared Because this also includes handling all sorts of non-object files when linking a program, shared library or DSO, this also includes allowing general recognition of files such as .res files (compiled from .rc files), or .def / .map / .opt files (for export and possibly versioning of public symbols only). This does mean that there's a tangible change for all build file templates: they must now recognise and handle the `.o` extension, which is used internally to recognise object files internally. This extension was removed by common.tmpl before this change, but would mean that the platform specific templates wouldn't know if "foo.map" was originally "foo.map.o" (i.e. an object file in its own right) or "foo.map" (an export definition file that should be treated as such, not as an object file). For the sake of simplifying things, we also modify util/mkdef.pl to produce .def (Windows) and .opt (VMS) files that don't need additional hackery. Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/4840) --- util/mkdef.pl | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'util/mkdef.pl') diff --git a/util/mkdef.pl b/util/mkdef.pl index 1e0da1c87b..828ddc0f15 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -228,16 +228,9 @@ foreach (@ARGV, split(/ /, $config{options})) $zlib = 1; } - $do_ssl=1 if $_ eq "libssl"; - if ($_ eq "ssl") { - $do_ssl=1; - $libname=$_ - } - $do_crypto=1 if $_ eq "libcrypto"; - if ($_ eq "crypto") { - $do_crypto=1; - $libname=$_; - } + $do_crypto=1 if $_ eq "libcrypto" || $_ eq "crypto"; + $do_ssl=1 if $_ eq "libssl" || $_ eq "ssl"; + $do_update=1 if $_ eq "update"; $do_rewrite=1 if $_ eq "rewrite"; $do_ctest=1 if $_ eq "ctest"; @@ -252,6 +245,8 @@ foreach (@ARGV, split(/ /, $config{options})) } } +$libname = $unified_info{sharednames}->{libcrypto} if $do_crypto; +$libname = $unified_info{sharednames}->{libssl} if $do_ssl; if (!$libname) { if ($do_ssl) { @@ -1210,9 +1205,6 @@ sub print_def_file my $prevnum = 0; my $symvtextcount = 0; - if ($W32) - { $libname.="32"; } - if ($W32) { print OUT <<"EOF"; @@ -1229,6 +1221,7 @@ EOF elsif ($VMS) { print OUT <<"EOF"; +IDENTIFICATION=$version CASE_SENSITIVE=YES SYMBOL_VECTOR=(- EOF -- cgit v1.2.3