From 0dceb8313e958aed4a0e83c515ebf619f2787a67 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 2 May 2026 19:50:16 +0200 Subject: [PATCH 1/3] Reduce the default list of DYNAMIC_ARCH targets for ARM64-based Apple systems --- cmake/arch.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/arch.cmake b/cmake/arch.cmake index faa776343b..c849b72f42 100644 --- a/cmake/arch.cmake +++ b/cmake/arch.cmake @@ -54,6 +54,14 @@ if (DYNAMIC_ARCH) endif() endif() endif () + + if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR ${CMAKE_SYSTEM_NAME} STREQUAL "iOS") + set(DYNAMIC_CORE ARMV8 NEOVERSEN1) + if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 19 OR (${CMAKE_C_COMPILER_ID} MATCHES AppleClang AND ${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 17) ) # SME ACLE supported in LLVM >= 19 and AppleClang >= 17 + set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME VORTEXM4) + endif() + endif() + if (DYNAMIC_LIST) set(DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST}) endif () From 525070fdcd7946856684ee7ad19929456446b1e4 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 2 May 2026 19:51:08 +0200 Subject: [PATCH 2/3] Reduce the default list of DYNAMIC_ARCH targets for ARM64-based Apple systems --- Makefile.system | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile.system b/Makefile.system index 4b1535f875..11d7f2279e 100644 --- a/Makefile.system +++ b/Makefile.system @@ -738,6 +738,20 @@ DYNAMIC_CORE += THUNDERX2T99 DYNAMIC_CORE += TSV110 DYNAMIC_CORE += EMAG8180 DYNAMIC_CORE += THUNDERX3T110 + +ifeq ($(OSNAME), Darwin) +DYNAMIC_CORE = ARMV8 +DYNAMIC_CORE += NEOVERSEN1 +ifneq ($(NO_SME), 1) +DYNAMIC_CORE += ARMV9SME +ifeq ($(OSNAME), Darwin) +ifneq ($(C_COMPILER), GCC) +DYNAMIC_CORE += VORTEXM4 +endif +endif +endif +endif + ifdef DYNAMIC_LIST override DYNAMIC_CORE = ARMV8 $(DYNAMIC_LIST) XCCOMMON_OPT = -DDYNAMIC_LIST -DDYN_ARMV8 From 2f6a673980de54a5006d1c7fe32e927b69d5ba6c Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sun, 3 May 2026 12:12:56 +0200 Subject: [PATCH 3/3] Add target redirects for building on Apple hardware --- driver/others/dynamic_arm64.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/driver/others/dynamic_arm64.c b/driver/others/dynamic_arm64.c index bdbcfc45e3..d1d40964f2 100644 --- a/driver/others/dynamic_arm64.c +++ b/driver/others/dynamic_arm64.c @@ -151,19 +151,39 @@ extern gotoblas_t gotoblas_A64FX; #else #define gotoblas_A64FX gotoblas_ARMV8 #endif + #else //not a user-specified dynamic_list + +#ifdef OS_DARWIN +#define gotoblas_CORTEXA55 gotoblas_ARMV8 +#else extern gotoblas_t gotoblas_CORTEXA53; +#endif #define gotoblas_CORTEXA55 gotoblas_CORTEXA53 +#ifdef OS_DARWIN +#define gotoblas_CORTEXA57 gotoblas_ARMV8 +#else extern gotoblas_t gotoblas_CORTEXA57; +#endif #define gotoblas_CORTEXA72 gotoblas_CORTEXA57 #define gotoblas_CORTEXA73 gotoblas_CORTEXA57 #define gotoblas_FALKOR gotoblas_CORTEXA57 +#ifdef OS_DARWIN +#define gotoblas_THUNDERX gotoblas_ARMV8 +#define gotoblas_THUNDERX2T99 gotoblas_ARMV8 +#define gotoblas_THUNDERX3T110 gotoblas_ARMV8 +#define gotoblas_TSV110 gotoblas_ARMV8 +#define gotoblas_EMAG8180 gotoblas_ARMV8 +#else extern gotoblas_t gotoblas_THUNDERX; extern gotoblas_t gotoblas_THUNDERX2T99; +extern gotoblas_t gotoblas_THUNDERX3T110; extern gotoblas_t gotoblas_TSV110; extern gotoblas_t gotoblas_EMAG8180; +#endif extern gotoblas_t gotoblas_NEOVERSEN1; #define gotoblas_VORTEX gotoblas_NEOVERSEN1 +#ifndef OS_DARWIN #ifndef NO_SVE extern gotoblas_t gotoblas_NEOVERSEV1; extern gotoblas_t gotoblas_NEOVERSEN2; @@ -175,6 +195,12 @@ extern gotoblas_t gotoblas_A64FX; #define gotoblas_ARMV8SVE gotoblas_ARMV8 #define gotoblas_A64FX gotoblas_ARMV8 #endif +#else +#define gotoblas_NEOVERSEV1 gotoblas_ARMV8 +#define gotoblas_NEOVERSEN2 gotoblas_ARMV8 +#define gotoblas_ARMV8SVE gotoblas_ARMV8 +#define gotoblas_A64FX gotoblas_ARMV8 +#endif #ifndef NO_SME extern gotoblas_t gotoblas_ARMV9SME; #if defined (__clang__) && defined(OS_DARWIN) @@ -191,7 +217,6 @@ extern gotoblas_t gotoblas_VORTEXM4; #define gotoblas_VORTEXM4 gotoblas_NEOVERSEN1 #endif -extern gotoblas_t gotoblas_THUNDERX3T110; #endif #define gotoblas_NEOVERSEV2 gotoblas_NEOVERSEN2