Commit fa7d0d84 authored by Gaudenz Steinlin's avatar Gaudenz Steinlin
Browse files

Use -mfloat-abi=softfp on armel for NEON instructions

There was already a patch to do the same for Jewel, but it got removed
when the build system changed to cmake because it patched an autotools
file which was no longer present. This adds the same logic to the new
cmake based build system.

Closes: #913599
parent c73d4ac9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14,3 +14,4 @@ fix-var-run-perms-sysvinit.patch
# Ubuntu: FTBFS on armhf
armhf-ftbfs.patch
boost-1.67-fixes.patch
softfp-armel.patch
+12 −0
Original line number Diff line number Diff line
--- a/cmake/modules/SIMDExt.cmake
+++ b/cmake/modules/SIMDExt.cmake
@@ -71,6 +71,9 @@
   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} -mfloat-abi=softfp")
+    endif()
   endif()
 
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")