You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.5 KiB

diff -rupN --no-dereference tesseract-5.5.0/CMakeLists.txt tesseract-5.5.0-new/CMakeLists.txt
--- tesseract-5.5.0/CMakeLists.txt 2024-11-11 10:41:55.641233422 +0100
+++ tesseract-5.5.0-new/CMakeLists.txt 2024-11-11 10:41:55.645233467 +0100
@@ -248,7 +248,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "a
set(HAVE_AVX512F FALSE)
set(HAVE_FMA FALSE)
set(HAVE_SSE4_1 FALSE)
- set(HAVE_NEON TRUE)
+ check_cxx_compiler_flag("-mfpu=neon" HAVE_NEON)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*")
diff -rupN --no-dereference tesseract-5.5.0/src/arch/simddetect.cpp tesseract-5.5.0-new/src/arch/simddetect.cpp
--- tesseract-5.5.0/src/arch/simddetect.cpp 2024-11-10 20:23:34.000000000 +0100
+++ tesseract-5.5.0-new/src/arch/simddetect.cpp 2024-11-11 10:41:55.645233467 +0100
@@ -270,7 +270,7 @@ SIMDDetect::SIMDDetect() {
// SSE detected.
SetDotProduct(DotProductSSE, &IntSimdMatrix::intSimdMatrixSSE);
#endif
-#if defined(HAVE_NEON) || defined(__aarch64__)
+#if defined(HAVE_NEON)
} else if (neon_available_) {
// NEON detected.
SetDotProduct(DotProductNEON, &IntSimdMatrix::intSimdMatrixNEON);
@@ -331,7 +331,7 @@ void SIMDDetect::Update() {
} else if (dotproduct == "accelerate") {
SetDotProduct(DotProductAccelerate, IntSimdMatrix::intSimdMatrix);
#endif
-#if defined(HAVE_NEON) || defined(__aarch64__)
+#if defined(HAVE_NEON)
} else if (dotproduct == "neon" && neon_available_) {
// NEON selected by config variable.
SetDotProduct(DotProductNEON, &IntSimdMatrix::intSimdMatrixNEON);