void-packages/srcpkgs/direwolf/patches/disable-arm32-neon.patch

34 lines
1.5 KiB
Diff
Raw Normal View History

disable NEON instructions on arm32
--- a/cmake/modules/FindCPUflags.cmake
+++ b/cmake/modules/FindCPUflags.cmake
@@ -350,27 +350,7 @@ else ()
set(HAS_AVX512 OFF CACHE BOOL "Architecture does not have AVX512 SIMD enabled")
endif()
elseif(ARCHITECTURE_ARM)
- if(C_MSVC)
- try_run(RUN_NEON COMPILE_NEON "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_arm_neon.cxx" COMPILE_DEFINITIONS /O0)
- else()
- if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_SYSTEM_PROCESSOR})
- try_run(RUN_NEON COMPILE_NEON "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_arm_neon.cxx" COMPILE_DEFINITIONS -mfpu=neon -O0)
- else()
- try_compile(COMPILE_NEON "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_arm_neon.cxx" COMPILE_DEFINITIONS -mfpu=neon -O0)
- set(RUN_NEON 0)
- endif()
- endif()
- if(COMPILE_NEON AND RUN_NEON EQUAL 0)
- set(HAS_NEON ON CACHE BOOL "Architecture has NEON SIMD enabled")
- message(STATUS "Use NEON SIMD instructions")
- if(C_GCC OR C_CLANG)
- set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon" )
- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon" )
- add_definitions(-DUSE_NEON)
- endif()
- else()
- set(HAS_NEON OFF CACHE BOOL "Architecture does not have NEON SIMD enabled")
- endif()
+ set(HAS_NEON OFF CACHE BOOL "Architecture does not have NEON SIMD enabled")
elseif(ARCHITECTURE_ARM64)
# Advanced SIMD (aka NEON) is mandatory for AArch64
set(HAS_NEON ON CACHE BOOL "Architecture has NEON SIMD enabled")