From: Christian Weisgerber Date: Sat, 15 Apr 2017 14:02:46 +0000 (+0000) Subject: Add support of OpenBSD/aarch64 X-Git-Tag: upstream/8.0.4~253 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c94e4d9793b5c04c939ef1585ad93ef46b9a498c;p=platform%2Fupstream%2Flibgc.git Add support of OpenBSD/aarch64 * include/private/gcconfig.h [__aarch64__ && !LINUX && !DARWIN && !FREEBSD && !NETBSD] (NOSYS): Do not define if OPENBSD. * include/private/gcconfig.h [OPENBSD && __aarch64__] (AARCH64, mach_type_known): Define. * include/private/gcconfig.h [AARCH64 && OPENBSD] (OS_TYPE, ELF_CLASS, DATASTART, DATAEND, DYNAMIC_LOADING): Define macro. * include/private/gcconfig.h [AARCH64 && OPENBSD && !GC_OPENBSD_THREADS]: Include sys/param.h, uvm/uvm_extern.h. * include/private/gcconfig.h [AARCH64 && OPENBSD && !GC_OPENBSD_THREADS && USRSTACK] (STACKBOTTOM): Define macro. * include/private/gcconfig.h [AARCH64 && OPENBSD && !GC_OPENBSD_THREADS && !USRSTACK] (HEURISTIC2): Define macro. * include/private/gcconfig.h [AARCH64 && OPENBSD] (__data_start, _end): Declare extern variable. --- diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 3fa9cba..4e7e444 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -147,7 +147,8 @@ EXTERN_C_BEGIN # if defined(__aarch64__) # define AARCH64 # if !defined(LINUX) && !defined(DARWIN) && !defined(FREEBSD) \ - && !defined(NETBSD) && !defined(NN_BUILD_TARGET_PLATFORM_NX) + && !defined(NETBSD) && !defined(NN_BUILD_TARGET_PLATFORM_NX) \ + && !defined(OPENBSD) # define NOSYS # define mach_type_known # endif @@ -183,6 +184,10 @@ EXTERN_C_BEGIN # define ARM32 # define mach_type_known # endif +# if defined(OPENBSD) && defined(__aarch64__) +# define AARCH64 +# define mach_type_known +# endif # if defined(OPENBSD) && defined(__sh__) # define SH # define mach_type_known @@ -2327,6 +2332,26 @@ EXTERN_C_BEGIN # define ELF_CLASS ELFCLASS64 # define DYNAMIC_LOADING # endif +# ifdef OPENBSD +# define OS_TYPE "OPENBSD" +# define ELF_CLASS ELFCLASS64 +# ifndef GC_OPENBSD_THREADS + EXTERN_C_END +# include +# include + EXTERN_C_BEGIN +# ifdef USRSTACK +# define STACKBOTTOM ((ptr_t)USRSTACK) +# else +# define HEURISTIC2 +# endif +# endif + extern int __data_start[]; +# define DATASTART ((ptr_t)__data_start) + extern int _end[]; +# define DATAEND ((ptr_t)(&_end)) +# define DYNAMIC_LOADING +# endif # ifdef NINTENDO_SWITCH extern int __bss_end[]; # define NO_HANDLE_FORK 1