]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix detection on HP-UX (IA64)
authorMichael Osipov <michael.osipov@siemens.com>
Thu, 30 Nov 2023 16:07:03 +0000 (17:07 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 4 Dec 2023 08:42:56 +0000 (09:42 +0100)
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)

util/perl/OpenSSL/config.pm

index cda764b4edcc5f48e5c75b1c5fd3877271cd29a2..970e65dc97e4347f85d282998b43c820d1dcb8c9 100755 (executable)
@@ -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";
@@ -322,6 +322,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