diff options
author | Richard Levitte <levitte@openssl.org> | 2018-10-04 17:41:12 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-10-05 08:22:42 +0200 |
commit | 66a24ab86816c240279d238aca41c68d57ead35c (patch) | |
tree | ebfcac2ce4f4993bb078ea000fe8c0ccce5ba356 /Configurations/windows-makefile.tmpl | |
parent | Change the build of engines to use ordinal files for symbol export (diff) | |
download | openssl-66a24ab86816c240279d238aca41c68d57ead35c.tar.xz openssl-66a24ab86816c240279d238aca41c68d57ead35c.zip |
Add build file support for generic symbol exports with DSOs
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7347)
Diffstat (limited to '')
-rw-r--r-- | Configurations/windows-makefile.tmpl | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index 46f564dc55..6ab298e4ee 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -512,9 +512,12 @@ reconfigure reconf: my $mkdef = abs2rel(rel2abs(catfile($config{sourcedir}, "util", "mkdef.pl")), rel2abs($config{builddir})); + my $ord_ver = $args{intent} eq 'lib' ? ' --version $(VERSION)' : ''; + my $ord_name = + $args{generator}->[1] || basename($args{product}, $dsoext); return <<"EOF"; -$target: $args{generator}->[0] $deps - \$(PERL) $mkdef --ordinals $args{generator}->[0] --name $args{generator}->[1] --OS windows > $target +$target: $args{generator}->[0] $deps $mkdef + \$(PERL) $mkdef$ord_ver --ordinals $args{generator}->[0] --name $ord_name --OS windows > $target EOF } elsif ($args{src} !~ /\.[sS]$/) { my $target = $args{src}; @@ -670,20 +673,22 @@ EOF my %args = @_; my $dso = $args{lib}; my $dso_n = basename($dso); - my @objs = map { (my $x = $_) =~ s|\.o$|$objext|; $x } @{$args{objs}}; + my @objs = map { (my $x = $_) =~ s|\.o$|$objext|; $x } + grep { $_ =~ m/\.(?:o|res)$/ } + @{$args{objs}}; + my @defs = map { (my $x = $_) =~ s|\.ld$|$defext|; $x } + grep { $_ =~ /\.ld$/ } + @{$args{objs}}; my @deps = compute_lib_depends(@{$args{deps}}); my $objs = join("\n", @objs); my $linklibs = join("", map { "$_\n" } @deps); - my $deps = join(" ", @objs, @deps); + my $deps = join(" ", @objs, @defs, @deps); + my $shared_def = join("", map { " /def:$_" } @defs); return <<"EOF"; $dso$dsoext: $deps IF EXIST $dso$dsoext.manifest DEL /F /Q $dso$dsoext.manifest - \$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) \$(LDOUTFLAG)$dso$dsoext /def:<< @<< -LIBRARY $dso_n -EXPORTS - bind_engine @1 - v_check @2 -<< + \$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) \\ + \$(LDOUTFLAG)$dso$dsoext$shared_def @<< || (DEL /Q \$(\@B).* $dso.* && EXIT 1) $objs $linklibs \$(DSO_EX_LIBS) << |