From: Leonardo Taccari Date: Sun, 10 Jun 2018 09:49:37 +0000 (+0200) Subject: Add support for NetBSD/aarch64 X-Git-Tag: v7.6.8~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75b763d0ba769e689540b4ad70046a50873ea430;p=gc Add support for NetBSD/aarch64 (a cherry-pick of commit 3acaf7b0 from 'master') Originally added by Jared McNeill (@jaredmcneill). * include/private/gcconfig.h [NETBSD && __aarch64__] (AARCH64, mach_type_known): Define macro. * include/private/gcconfig.h [NETBSD && AARCH64] (OS_TYPE, HEURISTIC2, DATASTART, ELF_CLASS, DYNAMIC_LOADING): Likewise. * include/private/gcconfig.h [NETBSD && AARCH64] (GC_data_start): Declare variable. --- diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index ea3e6f16..693a3295 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -114,7 +114,8 @@ # endif # if defined(__aarch64__) # define AARCH64 -# if !defined(LINUX) && !defined(DARWIN) && !defined(FREEBSD) +# if !defined(LINUX) && !defined(DARWIN) && !defined(FREEBSD) \ + && !defined(NETBSD) # define NOSYS # define mach_type_known # endif @@ -165,6 +166,10 @@ # define ARM32 # define mach_type_known # endif +# if defined(NETBSD) && defined(__aarch64__) +# define AARCH64 +# define mach_type_known +# endif # if defined(NETBSD) && defined(__sh__) # define SH # define mach_type_known @@ -2203,6 +2208,14 @@ # define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext) # define DATASTART_USES_BSDGETDATASTART # endif +# ifdef NETBSD +# define OS_TYPE "NETBSD" +# define HEURISTIC2 + extern ptr_t GC_data_start; +# define DATASTART GC_data_start +# define ELF_CLASS ELFCLASS64 +# define DYNAMIC_LOADING +# endif # ifdef NOSYS /* __data_start is usually defined in the target linker script. */ extern int __data_start[];