From d780b33a160f7417c59042535982d134d6d552f6 Mon Sep 17 00:00:00 2001 From: Jason Scurtu Date: Sat, 28 Nov 2020 19:47:46 +0100 Subject: [PATCH] apple silicon target - move rpi4 detection to Linux - set(_gmp_build_tgt aarch64) for Apple Silicon --- deps/GMP/GMP.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/deps/GMP/GMP.cmake b/deps/GMP/GMP.cmake index 08b286891..45c6b1f14 100644 --- a/deps/GMP/GMP.cmake +++ b/deps/GMP/GMP.cmake @@ -19,15 +19,18 @@ if (MSVC) else () set(_gmp_ccflags "-O2 -DNDEBUG -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common") set(_gmp_build_tgt "${CMAKE_SYSTEM_PROCESSOR}") - if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") - set(_gmp_ccflags "${_gmp_ccflags} -march=armv7-a") # Works on RPi-4 - set(_gmp_build_tgt armv7) - endif() if (APPLE) + if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") + set(_gmp_build_tgt aarch64) + endif() set(_gmp_ccflags "${_gmp_ccflags} -mmacosx-version-min=${DEP_OSX_TARGET}") set(_gmp_build_tgt "--build=${_gmp_build_tgt}-apple-darwin") elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") + set(_gmp_ccflags "${_gmp_ccflags} -march=armv7-a") # Works on RPi-4 + set(_gmp_build_tgt armv7) + endif() set(_gmp_build_tgt "--build=${_gmp_build_tgt}-pc-linux-gnu") else () set(_gmp_build_tgt "") # let it guess