summaryrefslogtreecommitdiff
path: root/crc.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-09-17 20:07:53 -0400
committerJeffrey Walton <noloader@gmail.com>2017-09-17 20:07:53 -0400
commitf0c2324f6be1a3b91b88412354e7c80e19cd03e7 (patch)
treee741c2a1b1c2e340d01afc7d6734773842541a84 /crc.cpp
parent09f1a2fb38fa493de110d620472bc5b3617a2f8e (diff)
downloadcryptopp-git-f0c2324f6be1a3b91b88412354e7c80e19cd03e7.tar.gz
Fix armeabi and armv7-a for Android (GH #509)
Diffstat (limited to 'crc.cpp')
-rw-r--r--crc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/crc.cpp b/crc.cpp
index 21153d3d..89df19fa 100644
--- a/crc.cpp
+++ b/crc.cpp
@@ -8,6 +8,13 @@
NAMESPACE_BEGIN(CryptoPP)
+// We set CRYPTOPP_ARM_CRC32_AVAILABLE based on compiler version.
+// Android does not provide -march=armv8-a+crc or -march=armv8.1-a+crc, so
+// it looks like we will have to disable CRC acceleration of their devices.
+#if defined(__ANDROID__)
+# undef CRYPTOPP_ARM_CRC32_AVAILABLE
+#endif
+
// crc-simd.cpp
#if (CRYPTOPP_ARM_CRC32_AVAILABLE)
extern void CRC32_Update_ARMV8(const byte *s, size_t n, word32& c);