提交 758baa3d 编写于 作者: A Andy Polyakov

Configure: impose ^X on whole build procedure.

Traditionally Configure passed $ENV{PERL} to Makefile. But this
resulted in ambiguilty as Configure script could be executed by
interpreter different from one executing remaining scripts. Since
we separate compile- and run-time interpreters with HASHBANGPERL
variable, there is no reason to segment the build procedure.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 77a6be4d
...@@ -941,7 +941,7 @@ $config{cross_compile_prefix} = $ENV{'CROSS_COMPILE'} ...@@ -941,7 +941,7 @@ $config{cross_compile_prefix} = $ENV{'CROSS_COMPILE'}
# Allow overriding the names of some tools. USE WITH CARE # Allow overriding the names of some tools. USE WITH CARE
# Note: only Unix cares about HASHBANGPERL... that explains # Note: only Unix cares about HASHBANGPERL... that explains
# the default string. # the default string.
$config{perl} = $ENV{'PERL'} || ($^O ne "VMS" ? $^X : "perl"); $config{perl} = ($^O ne "VMS" ? $^X : "perl");
$config{hashbangperl} = $config{hashbangperl} =
$ENV{'HASHBANGPERL'} || $ENV{'PERL'} || "/usr/bin/env perl"; $ENV{'HASHBANGPERL'} || $ENV{'PERL'} || "/usr/bin/env perl";
$target{cc} = $ENV{'CC'} || $target{cc} || "cc"; $target{cc} = $ENV{'CC'} || $target{cc} || "cc";
...@@ -2019,11 +2019,10 @@ EOF ...@@ -2019,11 +2019,10 @@ EOF
print OUT "1;\n"; print OUT "1;\n";
close(OUT); close(OUT);
my $perlvers = &get_perl_version();
print "\n"; print "\n";
print "PROCESSOR =$config{processor}\n" if $config{processor}; print "PROCESSOR =$config{processor}\n" if $config{processor};
print "PERL =$config{perl}\n"; print "PERL =$config{perl}\n";
print "PERLVERSION =$perlvers\n"; print "PERLVERSION =$Config{version} for $Config{archname}\n";
print "HASHBANGPERL =$config{hashbangperl}\n"; print "HASHBANGPERL =$config{hashbangperl}\n";
print "CC =$config{cross_compile_prefix}$target{cc}\n"; print "CC =$config{cross_compile_prefix}$target{cc}\n";
print "CFLAG =$target{cflags} $config{cflags}\n"; print "CFLAG =$target{cflags} $config{cflags}\n";
...@@ -2384,21 +2383,6 @@ sub usage ...@@ -2384,21 +2383,6 @@ sub usage
exit(1); exit(1);
} }
# Return the perl version.
sub get_perl_version
{
return "$Config{version} for $Config{archname}" if $config{perl} eq $^X;
my $l;
open my $FH, "$config{perl} -v|" || return "??unknown??";
while ( <$FH> ) {
chop;
$l .= $_;
}
close $FH;
$l =~ s/This is (.{1,70}).*/$1/;
return $l;
}
sub run_dofile sub run_dofile
{ {
my $out = shift; my $out = shift;
......
...@@ -812,6 +812,9 @@ ...@@ -812,6 +812,9 @@
PERL PERL
The name of the Perl executable to use when building OpenSSL. The name of the Perl executable to use when building OpenSSL.
This variable is used in config script only. Configure on the
other hand imposes the interpreter by which it itself was
executed on the whole build procedure.
HASHBANGPERL HASHBANGPERL
The command string for the Perl executable to insert in the The command string for the Perl executable to insert in the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册