- Fix RocksDB SIGILL error on Raspberry PI 4
  https://github.com/facebook/rocksdb/commit/29f7bbef995bdf83098963799c66af742e95373f
- Fix compilation on Apple Silicon
  https://github.com/facebook/rocksdb/commit/ee4bd4780b321ddb5f92a0f4eb956f2a2ebd60dc

https://jira.mariadb.org/browse/MDEV-29875

Index: storage/rocksdb/rocksdb/util/crc32c.cc
--- storage/rocksdb/rocksdb/util/crc32c.cc.orig
+++ storage/rocksdb/rocksdb/util/crc32c.cc
@@ -39,6 +39,10 @@
 
 #endif
 
+#if defined(HAVE_ARM64_CRC)
+bool pmull_runtime_flag = false;
+#endif
+
 namespace ROCKSDB_NAMESPACE {
 namespace crc32c {
 
@@ -468,7 +472,7 @@ static bool isAltiVec() {
 }
 #endif
 
-#if defined(__linux__) && defined(HAVE_ARM64_CRC)
+#if defined(HAVE_ARM64_CRC)
 uint32_t ExtendARMImpl(uint32_t crc, const char *buf, size_t size) {
   return crc32c_arm64(crc, (const unsigned char *)buf, size);
 }
@@ -488,10 +492,11 @@ std::string IsFastCrc32Supported() {
   has_fast_crc = false;
   arch = "PPC";
 #endif
-#elif defined(__linux__) && defined(HAVE_ARM64_CRC)
+#elif defined(HAVE_ARM64_CRC)
   if (crc32c_runtime_check()) {
     has_fast_crc = true;
     arch = "Arm64";
+    pmull_runtime_flag = crc32c_pmull_runtime_check();
   } else {
     has_fast_crc = false;
     arch = "Arm64";
@@ -1220,8 +1225,9 @@ uint32_t crc32c_3way(uint32_t crc, const char* buf, si
 static inline Function Choose_Extend() {
 #ifdef HAVE_POWER8
   return isAltiVec() ? ExtendPPCImpl : ExtendImpl<Slow_CRC32>;
-#elif defined(__linux__) && defined(HAVE_ARM64_CRC)
+#elif defined(HAVE_ARM64_CRC)
   if(crc32c_runtime_check()) {
+    pmull_runtime_flag = crc32c_pmull_runtime_check();
     return ExtendARMImpl;
   } else {
     return ExtendImpl<Slow_CRC32>;
