x86_64 assembly pack: allow clang to compile AVX code.
[openssl.git] / crypto / modes / asm / ghash-x86_64.pl
index f1aca3e5343157e4e67792b64b3a303a2e0b175c..f88af159950fd5744eba37e88d6d9e42854e6ac2 100644 (file)
@@ -102,6 +102,10 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
        $avx = ($1>=10) + ($1>=11);
 }
 
+if (!$avx && `$ENV{CC} -v` =~ /LLVM ([3-9]\.[0-9]+)/) {
+       $avx = ($1>=3.0) + ($1>=3.1);
+}
+
 open OUT,"| \"$^X\" $xlate $flavour $output";
 *STDOUT=*OUT;