aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-06-10 11:58:44 +0100
committerfanquake <fanquake@gmail.com>2022-06-10 11:58:53 +0100
commitdca463bd81a4f7ba557e98a38682079823164e2b (patch)
treebafea5bb1a92c1d146da243031f4e5f7a9616832
parentaf591f2068d0363c92d9756ca39c43db85e5804c (diff)
parentefb9f00f07c7ebf5fac56c464e5dd65d6d9b8457 (diff)
Merge bitcoin/bitcoin#25318: 0.21 Backports
efb9f00f07c7ebf5fac56c464e5dd65d6d9b8457 build: Restrict check for CRC32C intrinsic to aarch64 (W. J. van der Laan) cfb08c342eee277357409b154721e939b34f56cc refactor: include a missing <limits> header in fs.cpp (Joan Karadimov) Pull request description: There might not be another 0.21.x release, however these are both straight forward changes. If this isn't merged, then the pulls can remain untagged for needing backport. Backports: - https://github.com/bitcoin/bitcoin/pull/23045 - https://github.com/bitcoin/bitcoin/pull/23335 ACKs for top commit: laanwj: ACK efb9f00f07c7ebf5fac56c464e5dd65d6d9b8457 LarryRuane: utACK efb9f00f07c7ebf5fac56c464e5dd65d6d9b8457 Tree-SHA512: 09be8f8ce90f862e2d408c5707a8387ca828fdd05a9814cfed5236030a3b33012e7d7a557c2ee3989db26922ad45cb8a307bdeba7ac8e34b5f21f0d46eda1955
-rw-r--r--configure.ac6
-rw-r--r--src/fs.cpp1
2 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 6df4c1ce09..1454977179 100644
--- a/configure.ac
+++ b/configure.ac
@@ -535,13 +535,17 @@ AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto],[[ARM_CRC_CXXFLAGS="-march=arm
TEMP_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $ARM_CRC_CXXFLAGS"
-AC_MSG_CHECKING(for ARM CRC32 intrinsics)
+AC_MSG_CHECKING(for AArch64 CRC32 intrinsics)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <arm_acle.h>
#include <arm_neon.h>
]],[[
+#ifdef __aarch64__
__crc32cb(0, 0); __crc32ch(0, 0); __crc32cw(0, 0); __crc32cd(0, 0);
vmull_p64(0, 0);
+#else
+#error "crc32c library does not support hardware acceleration on 32-bit ARM"
+#endif
]])],
[ AC_MSG_RESULT(yes); enable_arm_crc=yes; ],
[ AC_MSG_RESULT(no)]
diff --git a/src/fs.cpp b/src/fs.cpp
index 3aba47976c..5e1d7af7ab 100644
--- a/src/fs.cpp
+++ b/src/fs.cpp
@@ -16,6 +16,7 @@
#define NOMINMAX
#endif
#include <codecvt>
+#include <limits>
#include <windows.h>
#endif