[arm64] Add basic port infrastructure.
authorZoltan Varga <vargaz@gmail.com>
Sat, 19 Apr 2014 15:03:21 +0000 (17:03 +0200)
committerZoltan Varga <vargaz@gmail.com>
Tue, 22 Apr 2014 17:34:25 +0000 (19:34 +0200)
acinclude.m4
configure.in
eglib/configure.ac
mono/arch/Makefile.am
mono/arch/arm64/Makefile.am [new file with mode: 0644]

index 5b38b2fe3ef8108083daa3a4b959b5f5b795c029..16fecf7f8608938102a35d90aadc6319ada10d17 100644 (file)
@@ -23,7 +23,7 @@ if test x$GCC != xyes; then
 fi
 case $host in
 i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
-|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*)
+|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
     pic_options='-fPIC'
     ;;
 ?86-pc-cygwin*|i?86-pc-cygwin*)
index dd09f8fa3c776e0ca0051bd2af4359e86da78d31..1f1e4ffc1f4cf0b1e574828ba52ebae23450fdd5 100644 (file)
@@ -237,6 +237,12 @@ case "$host" in
                        # available during cross-compilation
                        mono_cv_uscore=no
                 fi
+               case "$host" in
+               aarch64-*)
+                       support_boehm=no
+                       with_gc=sgen
+                       ;;
+               esac
                ;;
        *-*-nacl*)
                host_win32=no
@@ -2507,6 +2513,7 @@ sizeof_register="SIZEOF_VOID_P"
 jit_wanted=true
 interp_wanted=false
 sgen_supported=false
+boehm_supported=true
 case "$host" in
        mips*)
                TARGET=MIPS;
@@ -2683,6 +2690,14 @@ case "$host" in
 #              sgen_supported=true
 #              AOT_SUPPORTED="no"
 #              ;;
+       aarch64-*)
+               # https://lkml.org/lkml/2012/7/15/133
+               TARGET=ARM64
+               arch_target=arm64
+               JIT_SUPPORTED=yes
+               sgen_supported=true
+               boehm_supported=false
+               ;;
        s390x-*-linux*)
                TARGET=S390X;
                arch_target=s390x;
@@ -2788,6 +2803,11 @@ if test "x$host" != "x$target"; then
                        ;;
                esac
                ;;
+       aarch64-*)
+               TARGET=ARM64
+               JIT_SUPPORTED=yes
+               jit_wanted=true
+               ;;
        *)
                AC_MSG_ERROR([Cross compiling is not supported for target $target])
        esac
@@ -2803,6 +2823,9 @@ AMD64)
 ARM)
        AC_DEFINE(TARGET_ARM, 1, [...])
        ;;
+ARM64)
+       AC_DEFINE(TARGET_ARM64, 1, [...])
+       ;;
 POWERPC)
        AC_DEFINE(TARGET_POWERPC, 1, [...])
        ;;
@@ -2830,14 +2853,14 @@ esac
 dnl Use GCC atomic ops if they work on the target.
 if test x$GCC = "xyes"; then
        case $TARGET in
-       X86 | AMD64 | ARM | POWERPC | POWERPC64 | MIPS | S390X | SPARC | SPARC64)
+       X86 | AMD64 | ARM | ARM64 | POWERPC | POWERPC64 | MIPS | S390X | SPARC | SPARC64)
                AC_DEFINE(USE_GCC_ATOMIC_OPS, 1, [...])
                ;;
        esac
 fi
 
 if test "x$target_mach" = "xyes"; then
-   if test "x$TARGET" = "xARM"; then
+   if test "x$TARGET" = "xARM" -o "x$TARGET" = "xARM64"; then
          AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
          CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
          CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
@@ -3304,10 +3327,12 @@ AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
 AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
 AM_CONDITIONAL(POWERPC64, test x$TARGET = xPOWERPC64)
 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
+AM_CONDITIONAL(ARM64, test x$TARGET = xARM64)
 AM_CONDITIONAL(S390X, test x$TARGET = xS390X)
 AM_CONDITIONAL(HOST_X86, test x$HOST = xX86)
 AM_CONDITIONAL(HOST_AMD64, test x$HOST = xAMD64)
 AM_CONDITIONAL(HOST_ARM, test x$HOST = xARM)
+AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64)
 AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target")
 
 AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
@@ -3526,6 +3551,7 @@ mono/arch/ppc/Makefile
 mono/arch/sparc/Makefile
 mono/arch/s390x/Makefile
 mono/arch/arm/Makefile
+mono/arch/arm64/Makefile
 mono/arch/ia64/Makefile
 mono/arch/mips/Makefile
 mono/interpreter/Makefile
index fdbce134b9767857b4641d0991cf384fc9911696..f8853385a8df8bd94d3abbf83b767a94cc4c00e1 100644 (file)
@@ -88,7 +88,7 @@ case $host in
 esac
 
 case $target in
-arm*-darwin*)
+arm*-darwin*|aarch64*-*)
     CFLAGS="$CFLAGS -U_FORTIFY_SOURCE"
     ;;
 i*86-*-darwin*)
index e7700ed3a61a3439f3ec570b2ffc5e5f54a477c0..3d687949f92a8ed21f1e339eca6ead21c9e74615 100644 (file)
@@ -1,4 +1,4 @@
-DIST_SUBDIRS = x86 ppc sparc arm s390x amd64 ia64 mips
+DIST_SUBDIRS = x86 ppc sparc arm arm64 s390x amd64 ia64 mips
 
 AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
 
diff --git a/mono/arch/arm64/Makefile.am b/mono/arch/arm64/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29