diff options
author | Andy Polyakov <appro@openssl.org> | 2014-06-28 17:23:21 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-06-28 17:26:03 +0200 |
commit | 377551b9c4e12aa7846f4d80cf3604f2e396c964 (patch) | |
tree | 8603d2669c0af5b9dea93f22874a16f21e916d79 /crypto/aes/asm | |
parent | 361fd136e9d960b05e7596b9a1786852522a8cd3 (diff) |
x86_64 assembly pack: refine clang detection.
(cherry picked from commit a356e488ad50ca9de3fc4955839441c5aff11ed3)
Resolved conflicts:
crypto/bn/asm/rsaz-avx2.pl
Diffstat (limited to 'crypto/aes/asm')
-rw-r--r-- | crypto/aes/asm/aesni-mb-x86_64.pl | 4 | ||||
-rw-r--r-- | crypto/aes/asm/aesni-sha1-x86_64.pl | 2 | ||||
-rw-r--r-- | crypto/aes/asm/aesni-sha256-x86_64.pl | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/crypto/aes/asm/aesni-mb-x86_64.pl b/crypto/aes/asm/aesni-mb-x86_64.pl index 9116697708..33b1aed3c0 100644 --- a/crypto/aes/asm/aesni-mb-x86_64.pl +++ b/crypto/aes/asm/aesni-mb-x86_64.pl @@ -63,8 +63,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"; diff --git a/crypto/aes/asm/aesni-sha1-x86_64.pl b/crypto/aes/asm/aesni-sha1-x86_64.pl index 11b249c17d..97992adca7 100644 --- a/crypto/aes/asm/aesni-sha1-x86_64.pl +++ b/crypto/aes/asm/aesni-sha1-x86_64.pl @@ -94,7 +94,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /nasm/ || $ENV{ASM} =~ /nasm/) && $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) && `ml64 2>&1` =~ /Version ([0-9]+)\./ && $1>=10); -$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /LLVM ([3-9]\.[0-9]+)/ && $1>=3.0); +$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/ && $2>=3.0); $shaext=1; ### set to zero if compiling for 1.0.1 diff --git a/crypto/aes/asm/aesni-sha256-x86_64.pl b/crypto/aes/asm/aesni-sha256-x86_64.pl index 5bc0940e9e..6abb5e542e 100644 --- a/crypto/aes/asm/aesni-sha256-x86_64.pl +++ b/crypto/aes/asm/aesni-sha256-x86_64.pl @@ -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); } $shaext=$avx; ### set to zero if compiling for 1.0.1 |