summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2018-05-04 14:25:45 +0200
committerAndy Polyakov <appro@openssl.org>2018-05-05 20:48:28 +0200
commit41d6e0f36e43a2b6f555977147e05f0fdec87f56 (patch)
tree1fe2de988b3575df6a7287cd13ecb83b9ebb3cf1 /Configure
parent0ad4078cd604797eec4b8922f169da5c2a1a16d3 (diff)
downloadopenssl-new-41d6e0f36e43a2b6f555977147e05f0fdec87f56.tar.gz
Configure: pass more suitable argument to compiler_predefined().
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6174)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure17
1 files changed, 8 insertions, 9 deletions
diff --git a/Configure b/Configure
index 43effc2b46..66507039cd 100755
--- a/Configure
+++ b/Configure
@@ -1407,7 +1407,7 @@ unless ($disabled{asm}) {
}
}
-my %predefined = compiler_predefined($config{CC});
+my %predefined = compiler_predefined($config{CROSS_COMPILE}.$config{CC});
# Check for makedepend capabilities.
if (!$disabled{makedepend}) {
@@ -3068,28 +3068,27 @@ sub run_dofile
sub compiler_predefined {
state %predefined;
- my $default_compiler = shift;
+ my $cc = shift;
return () if $^O eq 'VMS';
- die 'compiler_predefined called without a default compiler'
- unless $default_compiler;
+ die 'compiler_predefined called without a compiler command'
+ unless $cc;
- if (! $predefined{$default_compiler}) {
- my $cc = "$config{CROSS_COMPILE}$default_compiler";
+ if (! $predefined{$cc}) {
- $predefined{$default_compiler} = {};
+ $predefined{$cc} = {};
# collect compiler pre-defines from gcc or gcc-alike...
open(PIPE, "$cc -dM -E -x c /dev/null 2>&1 |");
while (my $l = <PIPE>) {
$l =~ m/^#define\s+(\w+(?:\(\w+\))?)(?:\s+(.+))?/ or last;
- $predefined{$default_compiler}->{$1} = $2 // '';
+ $predefined{$cc}->{$1} = $2 // '';
}
close(PIPE);
}
- return %{$predefined{$default_compiler}};
+ return %{$predefined{$cc}};
}
sub which