diff options
author | Richard Levitte <levitte@openssl.org> | 2020-03-03 00:06:52 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-06-28 18:34:35 +0200 |
commit | 081436bf732c0889b2649426df4e1c23c671d6d7 (patch) | |
tree | eb1f9073258303a8565f8ac50da00f5f49b61204 /Configure | |
parent | util/perl/OpenSSL/config.pm: Rework determining compiler information (diff) | |
download | openssl-081436bf732c0889b2649426df4e1c23c671d6d7.tar.xz openssl-081436bf732c0889b2649426df4e1c23c671d6d7.zip |
util/perl/OpenSSL/config.pm, Configure: move check of target with compiler
Previously, ./config would check if "$target-$CC", then "$target"
exists and choose the one that does. This is now moved to Configure.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11230)
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -1166,7 +1166,24 @@ if ($d) { } } -&usage if !$table{$target} || $table{$target}->{template}; +if ($target) { + # It's possible that we have different config targets for specific + # toolchains, so we try to detect them, and go for the plain config + # target if not. + my $found; + foreach ( ( "$target-$user{CC}", "$target", undef ) ) { + $found=$_ if $table{$_} && !$table{$_}->{template}; + last if $found; + } + $target = $found; +} else { + # If we don't have a config target now, we try the C compiler as we + # fallback + my $cc = $user{CC} // 'cc'; + $target = $cc if $table{$cc} && !$table{$cc}->{template}; +} + +&usage unless $target; $config{target} = $target; my %target = resolve_config($target); |