x86_64 assembly pack: refine clang detection.
[openssl.git] / crypto / sha / asm / sha256-mb-x86_64.pl
index c48fd6d578bef3c9f1181dffc9f1db01ba6251bf..adf2ddccd18b0c0fcc638580ff9695ee51cfb3c7 100644 (file)
@@ -59,8 +59,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
        $avx = ($1>=10) + ($1>=11);
 }
 
-if (!$avx && `$ENV{CC} -v 2>&1` =~ /LLVM ([3-9]\.[0-9]+)/) {
-       $avx = ($1>=3.0) + ($1>=3.1);
+if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) {
+       $avx = ($2>=3.0) + ($2>3.0);
 }
 
 open OUT,"| \"$^X\" $xlate $flavour $output";