From a197221b2055c4472a0c6782ae5eac386cdf6863 Mon Sep 17 00:00:00 2001 From: Dertosh Date: Tue, 10 Dec 2024 00:35:35 +0300 Subject: [PATCH 1/2] Update cpu_detect.cc fix hw crc32 and AES capability checkfix undefined https://github.com/JuliaLang/julia/issues/26458 https://github.com/memcached/memcached/pull/744 --- absl/crc/internal/cpu_detect.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/absl/crc/internal/cpu_detect.cc b/absl/crc/internal/cpu_detect.cc index d7eedd1ca4f..b356fa09099 100644 --- a/absl/crc/internal/cpu_detect.cc +++ b/absl/crc/internal/cpu_detect.cc @@ -269,8 +269,12 @@ CpuType GetCpuType() { } bool SupportsArmCRC32PMULL() { +#if defined(HWCAP_CRC32) && defined(HWCAP_CRC32PMULL) uint64_t hwcaps = getauxval(AT_HWCAP); return (hwcaps & HWCAP_CRC32) && (hwcaps & HWCAP_PMULL); +#else + return false; +#endif } #else From 3ee325b7a4141fbf31891c08f0184822c4706274 Mon Sep 17 00:00:00 2001 From: Dertosh Date: Fri, 13 Dec 2024 17:47:37 +0300 Subject: [PATCH 2/2] Update cpu_detect.cc Fix wrong check deffenition --- absl/crc/internal/cpu_detect.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/absl/crc/internal/cpu_detect.cc b/absl/crc/internal/cpu_detect.cc index b356fa09099..e27719cf3cf 100644 --- a/absl/crc/internal/cpu_detect.cc +++ b/absl/crc/internal/cpu_detect.cc @@ -269,7 +269,7 @@ CpuType GetCpuType() { } bool SupportsArmCRC32PMULL() { -#if defined(HWCAP_CRC32) && defined(HWCAP_CRC32PMULL) +#if defined(HWCAP_CRC32) && defined(HWCAP_PMULL) uint64_t hwcaps = getauxval(AT_HWCAP); return (hwcaps & HWCAP_CRC32) && (hwcaps & HWCAP_PMULL); #else