summaryrefslogtreecommitdiffstats
path: root/util/perl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2023-11-21 14:36:37 +0100
committerHugo Landau <hlandau@openssl.org>2023-11-23 15:11:44 +0000
commitbaa714423f9cf331bd426793c5bdef52c35d0f43 (patch)
tree5032ab5c2ecf5fb8ca98d141f9e287aa81328390 /util/perl
parent1d79a13c8003d78c182524918620b60d06519dbc (diff)
Adapt C compiler detection for VSI C on x86_64
VSI C on OpenVMS for x86_64 has a bit more information than on other hardware. This is no doubt because it's based on LLVM which leaves an opening for cross compilation. VSI C on Itanium: $ CC/VERSION VSI C V7.4-001 on OpenVMS IA64 V8.4-2L3 VSI C on x86_64: $ CC/VERSION VSI C x86-64 X7.4-843 (GEM 50XB9) on OpenVMS x86_64 V9.2-1 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22792) (cherry picked from commit df5e72d220d9c8b9316b1ce8e8c8bdf23c7201f0)
Diffstat (limited to 'util/perl')
-rwxr-xr-xutil/perl/OpenSSL/config.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/util/perl/OpenSSL/config.pm b/util/perl/OpenSSL/config.pm
index 791b19847a..8125f48b14 100755
--- a/util/perl/OpenSSL/config.pm
+++ b/util/perl/OpenSSL/config.pm
@@ -359,8 +359,15 @@ sub determine_compiler_settings {
# However, other letters have been seen as well (for example X),
# and it's documented that HP (now VSI) reserve the letter W, X,
# Y and Z for their own uses.
- my ($vendor, $version) =
- ( $v =~ m/^([A-Z]+) C [VWXYZ]([0-9\.-]+)(:? +\(.*?\))? on / );
+ my ($vendor, $arch, $version, $extra) =
+ ( $v =~ m/^
+ ([A-Z]+) # Usually VSI
+ \s+ C
+ (?:\s+(.*?))? # Possible build arch
+ \s+ [VWXYZ]([0-9\.-]+) # Version
+ (?:\s+\((.*?)\))? # Possible extra data
+ \s+ on
+ /x );
my ($major, $minor, $patch) =
( $version =~ m/^([0-9]+)\.([0-9]+)-0*?(0|[1-9][0-9]*)$/ );
$CC = 'CC';