x86_64 assembly pack: refine clang detection.
[oweals/openssl.git] / crypto / modes / asm / ghash-x86_64.pl
index 0810c7ab9a0ceca2a5a7f61f6a38092a1b30eb52..1e7922733821b581c730b887f4bd5ce59c75d974 100644 (file)
@@ -102,8 +102,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";