x86_64 assembly pack: refine clang detection.
[openssl.git] / crypto / sha / asm / sha256-586.pl
index 75f792495cfa442755b2bbf3697b9b038ac6a5b7..0c2a778e7cc914d7af8d5c78b9b96d3c6d6c1185 100644 (file)
@@ -82,8 +82,8 @@ if ($xmm && !$avx && $ARGV[0] eq "win32" &&
        $avx = ($1>=10) + ($1>=11);
 }
 
-if ($xmm && !$avx && `$ENV{CC} -v` =~ /LLVM ([3-9]\.[0-9]+)/) {
-       $avx = ($1>=3.0) + ($1>=3.1);
+if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) {
+       $avx = ($2>=3.0) + ($2>3.0);
 }
 
 $shaext=$xmm;  ### set to zero if compiling for 1.0.1