From 843f33de6d8133b3e2c9e3783e16d0ce38085b06 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Tue, 13 Nov 2018 05:56:28 +0000 Subject: [PATCH] Teach the ucode to build on NetBSD/aarch64. --- src/microcode/confshared.h | 6 ++++++ src/microcode/uxtrap.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/microcode/confshared.h b/src/microcode/confshared.h index 8741ebaa3..1a683dfa7 100644 --- a/src/microcode/confshared.h +++ b/src/microcode/confshared.h @@ -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 #ifdef sonyrisc /* On the Sony NEWS 3250, this procedure initializes the diff --git a/src/microcode/uxtrap.h b/src/microcode/uxtrap.h index be3880017..970561912 100644 --- a/src/microcode/uxtrap.h +++ b/src/microcode/uxtrap.h @@ -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) \ -- 2.25.1