debian-armel-armhf-buildflags
authorCeph Packaging Team <team+ceph@tracker.debian.org>
Thu, 16 Feb 2023 10:54:41 +0000 (10:54 +0000)
committerThomas Goirand <zigo@debian.org>
Thu, 16 Feb 2023 10:54:41 +0000 (10:54 +0000)
Gbp-Pq: Name debian-armel-armhf-buildflags.patch

cmake/modules/SIMDExt.cmake
src/erasure-code/jerasure/gf-complete/m4/ax_ext.m4

index 72f86e33b94a4243f9c3ec714f11b2919d8b4749..79e1251627fd77eb1733dc1312fb4df119014d77 100644 (file)
@@ -40,11 +40,14 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
 
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|ARM")
   set(HAVE_ARM 1)
-  CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_ARM_NEON)
-  if(HAVE_ARM_NEON)
-    set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mfpu=neon")
+  if(CMAKE_LIBRARY_ARCHITECTURE EQUAL "arm-linux-gnueabi")
+    set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} --with-arch=armv5te --with-float=soft")
+  else()
+    CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_ARM_NEON)
+    if(HAVE_ARM_NEON)
+      set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mfpu=neon")
+    endif()
   endif()
-
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
   set(HAVE_INTEL 1)
   if(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
index 95c4dbe23b6273f5835e7147e4e89753ea85e3dd..958850ba21693263773ab58eb5cdc21c4343d4b6 100644 (file)
@@ -19,10 +19,17 @@ AC_DEFUN([AX_EXT],
       ;;
 
     arm*)
-      AC_CACHE_CHECK([whether NEON is enabled], [ax_cv_have_neon_ext], [ax_cv_have_neon_ext=yes])
-      if test "$ax_cv_have_neon_ext" = yes; then
-        AX_CHECK_COMPILE_FLAG(-mfpu=neon, [SIMD_FLAGS="$SIMD_FLAGS -mfpu=neon -DARM_NEON"], [ax_cv_have_neon_ext=no])
-      fi
+      case $host_cpu in
+          arm-linux-gnueabi)
+            AX_CHECK_COMPILE_FLAG(-mfpu=soft, [SIMD_FLAGS="$SIMD_FLAGS -mfpu=soft -march=armv5te"], [ax_cv_have_neon_ext=no])
+          ;;
+          *)
+            AC_CACHE_CHECK([whether NEON is enabled], [ax_cv_have_neon_ext], [ax_cv_have_neon_ext=yes])
+            if test "$ax_cv_have_neon_ext" = yes; then
+              AX_CHECK_COMPILE_FLAG(-mfpu=neon, [SIMD_FLAGS="$SIMD_FLAGS -mfpu=neon -DARM_NEON"], [ax_cv_have_neon_ext=no])
+            fi
+          ;;
+      esac
       ;;
 
     powerpc*)