From: Richard Levitte Date: Mon, 22 Feb 2021 06:37:06 +0000 (+0100) Subject: util/perl/OpenSSL/config.pm: Add VMS specific C compiler settings X-Git-Tag: openssl-3.0.0-alpha13~234 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f627561cf5cc4963698bf975df8694543bcf826c;p=thirdparty%2Fopenssl.git util/perl/OpenSSL/config.pm: Add VMS specific C compiler settings That includes proper compiler version detection. Partially fixes #14247 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/14270) --- diff --git a/util/perl/OpenSSL/config.pm b/util/perl/OpenSSL/config.pm index 841ef4b6aa1..d09d017c87a 100755 --- a/util/perl/OpenSSL/config.pm +++ b/util/perl/OpenSSL/config.pm @@ -337,6 +337,19 @@ sub determine_compiler_settings { # Vendor specific overrides, only if we didn't determine the compiler here if ( ! $cc ) { + if ( $SYSTEM eq 'OpenVMS' ) { + my $v = `CC/VERSION NLA0:`; + if ($? == 0) { + my ($vendor, $version) = + ( $v =~ m/^([A-Z]+) C V([0-9\.-]+) on / ); + my ($major, $minor, $patch) = + ( $version =~ m/^([0-9]+)\.([0-9]+)-0*?(0|[1-9][0-9]*)$/ ); + $CC = 'CC'; + $CCVENDOR = $vendor; + $CCVER = ( $major * 100 + $minor ) * 100 + $patch; + } + } + if ( ${SYSTEM} eq 'AIX' ) { # favor vendor cc over gcc if (IPC::Cmd::can_run('cc')) {