From: Boyuan Yang <byang@debian.org>
Date: Fri, 8 Nov 2024 08:07:01 -0500
Subject: CMakeLists.txt: Do not enable NEON for armel armhf

According to https://wiki.debian.org/ArchitectureSpecificsMemo#armel
the armhf architecture does not guarantee NEON. Do not enable NEON
on armhf. Also disable NEON for armel to prevent FTBFS
---
 CMakeLists.txt | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf8be36..783c3d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -95,16 +95,17 @@ endif()
 if(NOT MSVC)
   string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" arch_lowercase)
 
+# Debian-specific: Do not enable Arm Neon kernels on non-arm64 architectures.
   if(arch_lowercase MATCHES "^arm" AND NOT arch_lowercase STREQUAL "arm64")
-    # Enable Arm Neon kernels.
-    add_definitions(-DLIBYUV_NEON=1)
-    add_library(${ly_lib_name}_neon OBJECT
-      ${ly_src_dir}/compare_neon.cc
-      ${ly_src_dir}/rotate_neon.cc
-      ${ly_src_dir}/row_neon.cc
-      ${ly_src_dir}/scale_neon.cc)
-    target_compile_options(${ly_lib_name}_neon PRIVATE -mfpu=neon)
-    list(APPEND ly_lib_parts $<TARGET_OBJECTS:${ly_lib_name}_neon>)
+    message("Debian-specific: Not enabling NEON on ${arch_lowercase}.")
+#    add_definitions(-DLIBYUV_NEON=1)
+#    add_library(${ly_lib_name}_neon OBJECT
+#      ${ly_src_dir}/compare_neon.cc
+#      ${ly_src_dir}/rotate_neon.cc
+#      ${ly_src_dir}/row_neon.cc
+#      ${ly_src_dir}/scale_neon.cc)
+#    target_compile_options(${ly_lib_name}_neon PRIVATE -mfpu=neon)
+#    list(APPEND ly_lib_parts $<TARGET_OBJECTS:${ly_lib_name}_neon>)
   endif()
 
   if(arch_lowercase STREQUAL "aarch64" OR arch_lowercase STREQUAL "arm64")
