I think internally in the Kamailio we are using the "arm64" definition for the Mac, e.g. used below (commit ab1831efc2081).
src/core/atomic/atomic_unknown.h: #if defined __CPU_arm64 && defined __OS_darwin /* fallback to locking-variant of atomic ops for OSes used for development * - MacOS with Apple silicon */ #else #warning no native memory barrier implementations, falling back to slow lock \ based workaround #endif
The aarch64 used elsewhere is for actual ARM processors, like embedded systems. We probably need to detect or anticipate this special architecture in the cmake as well.