diff --git a/patches/bdwgc.local.patch b/patches/bdwgc.local.patch index d7c4214..f8fcebe 100644 --- a/patches/bdwgc.local.patch +++ b/patches/bdwgc.local.patch @@ -1,79 +1,72 @@ diff -ru bdwgc.orig/include/private/gcconfig.h bdwgc/include/private/gcconfig.h ---- bdwgc.orig/include/private/gcconfig.h 2023-02-07 14:35:54.616933050 +0100 -+++ bdwgc/include/private/gcconfig.h 2023-02-07 14:41:11.028698667 +0100 -@@ -110,6 +110,20 @@ - # define LINUX - # endif +--- bdwgc.orig/include/private/gcconfig.h ++++ bdwgc/include/private/gcconfig.h +@@ -102,6 +102,27 @@ EXTERN_C_BEGIN + # define LINUX + #endif +# if defined(__midipix__) -+# define MIDIPIX -+# include -+# include ++# define MIDIPIX ++# include ++# include + -+# include -+# include -+# include ++# include ++# include ++# include + +int __gc_data_start_mark__[1]; +int __gc_data_end_mark__[1]; +#endif + ++# ifdef MIDIPIX ++# define OS_TYPE "MIDIPIX" ++# define DATASTART ((ptr_t)__gc_data_start_mark__) ++# define DATAEND ((ptr_t)__gc_data_end_mark__) ++# define STACKBOTTOM (ptr_t)(((nt_tib *)pe_get_teb_address())->stack_base) ++# define USE_MMAP_ANON ++# endif + /* And one for NetBSD: */ - # if defined(__NetBSD__) - # define NETBSD -@@ -554,7 +554,7 @@ - # define mach_type_known - # elif (defined(__i386__) || defined(i386) || defined(__X86__)) \ - && (defined(ANY_BSD) || defined(DARWIN) || defined(EMBOX) \ -- || defined(LINUX) || defined(QNX)) -+ || defined(LINUX) || defined(QNX) || defined(MIDIPIX)) - # define I386 - # define mach_type_known - # elif (defined(__ia64) || defined(__ia64__)) && defined(LINUX) -@@ -607,7 +607,7 @@ - # elif (defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) \ - || defined(__X86_64__)) \ - && (defined(ANY_BSD) || defined(DARWIN) || defined(LINUX) \ -- || defined(QNX)) -+ || defined(QNX) || defined(MIDIPIX)) - # define X86_64 - # define mach_type_known - # endif -@@ -1464,6 +1478,13 @@ - # define SOFT_VDB - # endif - # endif -+# ifdef MIDIPIX -+# define OS_TYPE "MIDIPIX" -+# define DATASTART ((ptr_t)__gc_data_start_mark__) -+# define DATAEND ((ptr_t)__gc_data_end_mark__) -+# define STACKBOTTOM (ptr_t)(((nt_tib *)pe_get_teb_address())->stack_base) -+# define USE_MMAP_ANON -+# endif - # ifdef CYGWIN32 - # define WOW64_THREAD_CONTEXT_WORKAROUND - # define DATASTART ((ptr_t)GC_DATASTART) /* From gc.h */ -@@ -2259,6 +2280,13 @@ - # define SOFT_VDB - # endif - # endif -+# ifdef MIDIPIX -+# define OS_TYPE "MIDIPIX" -+# define DATASTART ((ptr_t)__gc_data_start_mark__) -+# define DATAEND ((ptr_t)__gc_data_end_mark__) -+# define STACKBOTTOM (ptr_t)(((nt_tib *)pe_get_teb_address())->stack_base) -+# define USE_MMAP_ANON -+# endif - # ifdef DARWIN - # define DARWIN_DONT_PARSE_STACK 1 - # define STACKBOTTOM ((ptr_t)0x7fff5fc00000) -@@ -2676,7 +2676,7 @@ - #if defined(AIX) || defined(ANY_BSD) || defined(BSD) || defined(DARWIN) \ + #if defined(__NetBSD__) + # define NETBSD +@@ -505,7 +526,7 @@ EXTERN_C_BEGIN + # define mach_type_known + #elif (defined(__i386__) || defined(i386) || defined(__X86__)) \ + && (defined(ANY_BSD) || defined(DARWIN) || defined(EMBOX) \ +- || defined(LINUX) || defined(QNX)) ++ || defined(LINUX) || defined(QNX) || defined(MIDIPIX)) + # define I386 + # define mach_type_known + #elif (defined(__ia64) || defined(__ia64__)) && defined(LINUX) +@@ -558,7 +579,7 @@ EXTERN_C_BEGIN + #elif (defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) \ + || defined(__X86_64__)) \ + && (defined(ANY_BSD) || defined(DARWIN) || defined(LINUX) \ +- || defined(QNX)) ++ || defined(QNX) || defined(MIDIPIX)) + # define X86_64 + # define mach_type_known + #endif +@@ -1540,6 +1561,13 @@ extern char *_STACKTOP; + # define DATAEND ((ptr_t)(&_end)) + # define GETPAGESIZE() 4096 + # endif ++# ifdef MIDIPIX ++# define OS_TYPE "MIDIPIX" ++# define DATASTART ((ptr_t)__gc_data_start_mark__) ++# define DATAEND ((ptr_t)__gc_data_end_mark__) ++# define STACKBOTTOM (ptr_t)(((nt_tib *)pe_get_teb_address())->stack_base) ++# define USE_MMAP_ANON ++# endif + # ifdef DARWIN + # define DARWIN_DONT_PARSE_STACK 1 + # define STACKBOTTOM ((ptr_t)0xc0000000) +@@ -2604,7 +2632,7 @@ EXTERN_C_BEGIN + #if defined(AIX) || defined(ANY_BSD) || defined(BSD) || defined(DARWIN) \ || defined(DGUX) || defined(HAIKU) || defined(HPUX) || defined(HURD) \ || defined(IRIX5) || defined(LINUX) || defined(OSF1) || defined(QNX) \ - || defined(SVR4) + || defined(SVR4) || defined(MIDIPIX) - # define UNIX_LIKE /* Basic Unix-like system calls work. */ + # define UNIX_LIKE /* Basic Unix-like system calls work. */ #endif