提交 8effd8fa 编写于 作者: R Richard Levitte

Refactor util/mkdef.pl for clearer separation of functionality

Move the .num updating functionality to util/mknum.pl.
Rewrite util/mkdef.pl to create .def / .map / .opt files exclusively,
using the separate ordinals reading module.
Adapt the build files.
Adapt the symbol presence test.
Reviewed-by: NTim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7191)
上级 91a99748
......@@ -760,7 +760,7 @@ reconfigure reconf :
my $mkdef = sourcefile('util', 'mkdef.pl');
return <<"EOF";
$target : $args{generator}->[0] $deps
\$(PERL) $mkdef $args{generator}->[1] "VMS" > $target
\$(PERL) $mkdef --ordinals $args{generator}->[0] --name $args{generator}->[1] "--OS" "VMS" > $target
EOF
} elsif ($target !~ /\.[sS]$/) {
my $target = $args{src};
......
......@@ -810,8 +810,8 @@ errors:
done )
ordinals:
( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mkdef.pl crypto update )
( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mkdef.pl ssl update )
( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mknum.pl crypto update )
( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mknum.pl ssl update )
test_ordinals:
( cd test; \
......@@ -965,7 +965,7 @@ reconfigure reconf:
(my $mkdef_os = $target{shared_target}) =~ s|-shared$||;
return <<"EOF";
$target: $args{generator}->[0] $deps
\$(PERL) \$(SRCDIR)/util/mkdef.pl $args{generator}->[1] $mkdef_os > $target
\$(PERL) \$(SRCDIR)/util/mkdef.pl --ordinals $args{generator}->[0] --name $args{generator}->[1] --OS $mkdef_os > $target
EOF
} elsif ($args{src} !~ /\.[sS]$/) {
if ($args{generator}->[0] =~ m|^.*\.in$|) {
......
......@@ -514,7 +514,7 @@ reconfigure reconf:
rel2abs($config{builddir}));
return <<"EOF";
$target: $args{generator}->[0] $deps
\$(PERL) $mkdef $args{generator}->[1] 32 > $target
\$(PERL) $mkdef --ordinals $args{generator}->[0] --name $args{generator}->[1] --OS windows > $target
EOF
} elsif ($args{src} !~ /\.[sS]$/) {
my $target = $args{src};
......
{-
use File::Spec::Functions;
our $sover = $config{shlib_version_number};
our $sover_filename = $sover;
$sover_filename =~ s|\.|_|g
......@@ -28,8 +30,8 @@ IF[{- defined $target{shared_defflag} -}]
SHARED_SOURCE[libcrypto]=libcrypto.ld
SHARED_SOURCE[libssl]=libssl.ld
GENERATE[libcrypto.ld]=util/libcrypto.num crypto
GENERATE[libssl.ld]=util/libssl.num ssl
GENERATE[libcrypto.ld]=util/libcrypto.num libcrypto
GENERATE[libssl.ld]=util/libssl.num libssl
ENDIF
IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}]
......
......@@ -49,8 +49,9 @@ foreach my $libname (@libnames) {
my @def_lines;
indir $bldtop => sub {
my $mkdefpath = srctop_file("util", "mkdef.pl");
@def_lines = map { s|\R$||; $_ } `$^X $mkdefpath $libname linux 2> /dev/null`;
ok($? == 0, "running 'cd $bldtop; $^X $mkdefpath $libname linux' => $?");
my $libnumpath = srctop_file("util", "lib$libname.num");
@def_lines = map { s|\R$||; $_ } `$^X $mkdefpath --ordinals $libnumpath --name $libname --OS linux 2> /dev/null`;
ok($? == 0, "running 'cd $bldtop; $^X $mkdefpath --ordinals $libnumpath --name $libname --OS linux' => $?");
}, create => 0, cleanup => 0;
note "Number of lines in \@nm_lines before massaging: ", scalar @nm_lines;
......
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册