From cfb08c342eee277357409b154721e939b34f56cc Mon Sep 17 00:00:00 2001 From: Joan Karadimov Date: Fri, 22 Oct 2021 01:19:27 +0300 Subject: [PATCH 1/2] refactor: include a missing header in fs.cpp ... needed for std::numeric_limits::max on WIN32 Github-Pull: #23335 Rebased-From: 077a875d94b51e3c87381133657be98989c8643e --- src/fs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fs.cpp b/src/fs.cpp index 3aba47976c9..5e1d7af7ab1 100644 --- a/src/fs.cpp +++ b/src/fs.cpp @@ -16,6 +16,7 @@ #define NOMINMAX #endif #include +#include #include #endif From efb9f00f07c7ebf5fac56c464e5dd65d6d9b8457 Mon Sep 17 00:00:00 2001 From: "W. J. van der Laan" Date: Mon, 20 Sep 2021 12:19:38 +0200 Subject: [PATCH 2/2] build: Restrict check for CRC32C intrinsic to aarch64 `crc32c`'s hardware accelerated code doesn't handle ARM 32-bit at all. Make the check in `configure.ac` check for this architecture explicitly. For the release binaries, the current `configure.ac` check happens to work: it enables it on aarch64 but disables it for armhf. However some combination of compiler version and settings might ostensibly cause this check to succeed on armhf (as reported on IRC). So make the 64-bit platform requirement explicit. Github-Pull: #23045 Rebased-From: f2747d1602ec4e1128356b861b2167daf66a845b --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 6df4c1ce09e..14549771799 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 #include ]],[[ +#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)]