Teach the ucode to build on NetBSD/aarch64.
authorTaylor R Campbell <campbell@mumble.net>
Tue, 13 Nov 2018 05:56:28 +0000 (05:56 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Tue, 13 Nov 2018 05:58:37 +0000 (05:58 +0000)
src/microcode/confshared.h
src/microcode/uxtrap.h

index 8741ebaa3e411db24d7f9ea1b646e6ed9c283777..1a683dfa77e5475173925884d61caa09bc97bb6d 100644 (file)
@@ -221,6 +221,7 @@ typedef enum
   FASL_PPC64,
   FASL_IA64,
   FASL_ARM,
+  FASL_AARCH64,
 } fasl_arch_t;
 
 /* Possible values for COMPILER_PROCESSOR_TYPE.  This identifies the
@@ -598,6 +599,11 @@ extern void win32_stack_reset (void);
 #  define MACHINE_TYPE         "arm"
 #  define CURRENT_FASL_ARCH    FASL_ARM
 #endif
+
+#ifdef __aarch64__
+#  define MACHINE_TYPE         "aarch64"
+#  define CURRENT_FASL_ARCH    FASL_AARCH64
+#endif
 \f
 #ifdef sonyrisc
       /* On the Sony NEWS 3250, this procedure initializes the
index be38800170c94914dd10e902faf149f434609818..970561912d6e685174f74351980d250b7d3c78b0 100644 (file)
@@ -802,6 +802,11 @@ typedef struct
 #endif
 
 #if defined(__linux__) || defined(__NetBSD__)
+#  if defined(__NetBSD__) && defined(__aarch64__)
+/* NetBSD/aarch64 doesn't provide _init.  Maybe we should just always
+   use __executable_start on NetBSD.  */
+#    define _init __executable_start
+#  endif
    extern unsigned int _init;
    extern unsigned int etext;
 #  define ADDRESS_UCODE_P(addr)                                                \