sha/asm/sha{1|256}-586.pl: harmonize clang version detection.
authorAndy Polyakov <appro@openssl.org>
Sat, 16 Jun 2018 14:23:34 +0000 (16:23 +0200)
committerAndy Polyakov <appro@openssl.org>
Mon, 18 Jun 2018 17:59:03 +0000 (19:59 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6499)

crypto/sha/asm/sha1-586.pl
crypto/sha/asm/sha256-586.pl

index ca3763991c45d663147499cdbab988b521d778c9..996707c07b9c278f4a4c633bc532abf3117c42d5 100644 (file)
@@ -144,7 +144,7 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq "win32" &&
                `ml 2>&1` =~ /Version ([0-9]+)\./ &&
                $1>=10);        # first version supporting AVX
 
-$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/ &&
+$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/ &&
                $2>=3.0);       # first version supporting AVX
 
 $shaext=$xmm;  ### set to zero if compiling for 1.0.1
index 48830728e7d054152720926d47288195aa23c5c0..e0ef02814f164a6a414a3aaabaa1035d4baf06cb 100644 (file)
@@ -96,7 +96,7 @@ if ($xmm && !$avx && $ARGV[0] eq "win32" &&
        $avx = ($1>=10) + ($1>=11);
 }
 
-if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) {
+if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) {
        $avx = ($2>=3.0) + ($2>3.0);
 }