fix merp arm64 (#47331)
authormonojenkins <jo.shields+jenkins@xamarin.com>
Sun, 24 Jan 2021 10:05:48 +0000 (05:05 -0500)
committerGitHub <noreply@github.com>
Sun, 24 Jan 2021 10:05:48 +0000 (05:05 -0500)
<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
src/mono/configure.ac
src/mono/mono/utils/mono-merp.c

index 980daaf..dffbc27 100644 (file)
@@ -408,13 +408,6 @@ case "$host" in
                host_sunos=yes
                ;;
        *-*-darwin*)
-               # Temporary workaround for Apple Silicon
-               # config.guess returns arm-apple-darwin20.0.0
-               if test $ac_cv_host = arm-apple-darwin20.0.0 -o $ac_cv_target = arm-apple-darwin20.0.0; then
-                  echo "You are running on Apple Silicon, but using an old config.guess, invoke configure like this:"
-                  echo "Run configure using ./configure --host=aarch64-apple-darwin20.0.0 --target=aarch64-apple-darwin20.0.0"
-                  exit 1
-               fi
                parallel_mark="Disabled_Currently_Hangs_On_MacOSX"
                host_darwin=yes
                target_mach=yes
index 0da6f07..7a21658 100644 (file)
@@ -129,7 +129,8 @@ typedef enum {
        MerpArchx86_64 = 1,
        MerpArchx86 = 2,
        MerpArchPPC = 3,
-       MerpArchPPC64 = 4
+       MerpArchPPC64 = 4,
+       MerpArchARM64 = 5
 } MerpArch;
 
 typedef enum
@@ -218,6 +219,8 @@ get_merp_bitness (MerpArch arch)
                        return "x64";
                case MerpArchx86:
                        return "x32";
+               case MerpArchARM64:
+                       return "arm64";
                default:
                        g_assert_not_reached ();
        }
@@ -234,6 +237,8 @@ get_merp_arch (void)
        return MerpArchPPC;
 #elif defined(TARGET_POWERPC64)
        return MerpArchPPC64;
+#elif defined(TARGET_ARM64)
+       return MerpArchARM64;
 #else
        g_assert_not_reached ();
 #endif