Update configure.ac to identify ARMv8 based Mac OS X systems, so that it does not try to compile x86 dynamic core for ARM. Also the Intel-based FPU macros do not work on ARM and need to be patched out.

This commit is contained in:
Jonathan Campbell
2020-11-21 23:12:38 -08:00
parent c58180f016
commit 198a3087f4
2 changed files with 10 additions and 1 deletions

View File

@@ -524,6 +524,12 @@ case "$host_cpu" in
c_targetcpu="arm"
c_unalignedmemory=yes
;;
arm) # Mac OS X uname -m says "arm64", for some reason it becomes "arm" ?
AC_DEFINE(C_TARGETCPU,ARMV8LE)
AC_MSG_RESULT(ARMv8 Little Endian 64-bit)
c_targetcpu="arm"
c_unalignedmemory=yes
;;
*)
AC_DEFINE(C_TARGETCPU,UNKNOWN)
AC_MSG_RESULT(unknown)

View File

@@ -20,8 +20,11 @@
#include "cpu/lazyflags.h"
#ifdef __GNUC__
# if defined(__MINGW32__) || defined(MACOSX)
# if defined(__MINGW32__) || (defined(MACOSX) && !defined(__arm64__))
# include "fpu_control_x86.h"
# elif defined(MACOSX) && defined(__arm64__)
/* ? */
# define _FPU_SETCW(x) /* dummy */
# else
# include <fpu_control.h>
# endif