mirror of
https://github.com/termux/termux-packages.git
synced 2025-09-26 06:55:00 +00:00
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
|
|
index 5c6dda9..972bca3 100755
|
|
--- a/source/CMakeLists.txt
|
|
+++ b/source/CMakeLists.txt
|
|
@@ -46,7 +46,7 @@ else()
|
|
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
|
|
endif()
|
|
set(X86_ALIASES x86 i386 i686 x86_64 amd64)
|
|
-set(ARM_ALIASES armv6l armv7l)
|
|
+set(ARM_ALIASES armv6l armv7l armv7-a)
|
|
set(ARM64_ALIASES arm64 arm64e aarch64)
|
|
list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
|
|
list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
|
|
@@ -272,13 +272,9 @@ if(GCC)
|
|
message(STATUS "cross compile arm")
|
|
set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
|
|
elseif(ARM)
|
|
- find_package(Neon)
|
|
- if(CPU_HAS_NEON)
|
|
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
|
|
- add_definitions(-DHAVE_NEON)
|
|
- else()
|
|
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
|
|
- endif()
|
|
+ # Follow termux_step_setup_toolchain.sh
|
|
+ set(ARM_ARGS @TERMUX_CLANG_TARGET_ARM@ -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -fPIC)
|
|
+ add_definitions(-DHAVE_NEON)
|
|
endif()
|
|
if(ARM64)
|
|
set(CPU_HAS_NEON 1)
|
|
@@ -398,7 +394,7 @@ int main() { return 0; }")
|
|
message(STATUS "Found SVE2")
|
|
add_definitions(-DHAVE_SVE2=1)
|
|
endif()
|
|
- set(ARM_ARGS -O3)
|
|
+ set(ARM_ARGS @TERMUX_CLANG_TARGET_AARCH64@)
|
|
# Do not allow implicit vector type conversions in Clang builds (this
|
|
# is already the default in GCC builds).
|
|
check_cxx_compiler_flag(-flax-vector-conversions=none CC_HAS_FLAX_VEC_CONV_NONE)
|