Fix detection on HP-UX (IA64)

HPE has a weird preference to prefix letters and zero-padding. Properly trim
them before processing.

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22891)

(cherry picked from commit 253c5667a9)
This commit is contained in:
Michael Osipov 2023-11-30 17:07:03 +01:00 committed by Tomas Mraz
parent 8a2bebb9e4
commit ad5625076a
1 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,7 @@ my $guess_patterns = [
[ 'HP-UX:.*',
sub {
my $HPUXVER = $RELEASE;
$HPUXVER = s/[^.]*.[0B]*//;
$HPUXVER =~ s/[^.]*.[0B]*//;
# HPUX 10 and 11 targets are unified
return "${MACHINE}-hp-hpux1x" if $HPUXVER =~ m@1[0-9]@;
return "${MACHINE}-hp-hpux";
@ -321,6 +321,7 @@ sub determine_compiler_settings {
# If we got a version number, process it
if ($v) {
$v =~ s/[^.]*.0*// if $SYSTEM eq 'HP-UX';
$CCVENDOR = $k;
# The returned version is expected to be one of