blob: b6ab149e19f227d3f0c9f03db7bb5978533ab5ce [file] [log] [blame]
From ecb3bcc283ce740a34d6342cbcda569f3193ade9 Mon Sep 17 00:00:00 2001
From: David Michael <fedora.dm0@gmail.com>
Date: Mon, 1 May 2023 11:14:32 -0400
Subject: [PATCH] Specifically check for NEON for ARMv8 CPUs.
The actual NEON implementation uses instructions that are not
supported on 32-bit CPUs. Make the CMake test reflect this so that
ARMv7 builds succeed again.
Upstream-Status: Submitted [https://github.com/google/snappy/pull/169]
Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 85afe58e..e8775859 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -207,9 +207,9 @@ int main() {
check_cxx_source_compiles("
#include <arm_neon.h>
int main() {
- uint8_t val = 3, dup[8];
+ uint8_t val = 3;
uint8x16_t v = vld1q_dup_u8(&val);
- vst1q_u8(dup, v);
+ val = vmaxvq_u8(v);
return 0;
}" SNAPPY_HAVE_NEON)