x86_64 assembly pack: allow clang to compile AVX code.
[openssl.git] / crypto / sha / asm / sha1-x86_64.pl
index 9aa128ed3aef4218171952a895cd69bffd9eb2b5..6a68d96967950d7fd7d8ce523df8d12b675e5896 100755 (executable)
@@ -107,6 +107,10 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
        $avx = ($1>=10) + ($1>=11);
 }
 
+if (!$avx && `$ENV{CC} -v` =~ /LLVM ([2-9]\.[0-9]+)/) {
+       $avx = ($1>=3.0) + ($1>=3.1);
+}
+
 $shaext=1;     ### set to zero if compiling for 1.0.1
 $avx=1         if (!$shaext && $avx);