mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
parent
f60a4892ed
commit
16b99b0cd8
2 changed files with 34 additions and 12 deletions
33
srcpkgs/direwolf/patches/disable-arm32-neon.patch
Normal file
33
srcpkgs/direwolf/patches/disable-arm32-neon.patch
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
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")
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'direwolf'
|
# Template file for 'direwolf'
|
||||||
pkgname=direwolf
|
pkgname=direwolf
|
||||||
version=1.7
|
version=1.7
|
||||||
revision=2
|
revision=3
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
makedepends="alsa-lib-devel hamlib-devel eudev-libudev-devel"
|
makedepends="alsa-lib-devel hamlib-devel eudev-libudev-devel"
|
||||||
short_desc="AX.25 packet modem/TNC and APRS encoder/decoder"
|
short_desc="AX.25 packet modem/TNC and APRS encoder/decoder"
|
||||||
|
@ -16,14 +16,3 @@ python_version=3
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
x86_64*|i686*) configure_args+=" -DFORCE_SSE=ON" ;;
|
x86_64*|i686*) configure_args+=" -DFORCE_SSE=ON" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
post_patch() {
|
|
||||||
# rpi armv6 doesn't support neon, impossible to disable properly on cross
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
|
||||||
armv6*)
|
|
||||||
vsed -i cmake/modules/FindCPUflags.cmake \
|
|
||||||
-e 's/HAS_NEON ON/HAS_NEON OFF/g' \
|
|
||||||
-e '/STATUS "Use NEON/d'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue