Index: devel/boehm-gc/files/patch-freebsd-riscv =================================================================== --- devel/boehm-gc/files/patch-freebsd-riscv (nonexistent) +++ devel/boehm-gc/files/patch-freebsd-riscv (working copy) @@ -0,0 +1,33 @@ +diff --git include/private/gcconfig.h include/private/gcconfig.h +index 0743d8fc..e214587c 100644 +--- include/private/gcconfig.h ++++ include/private/gcconfig.h +@@ -663,7 +663,7 @@ EXTERN_C_BEGIN + # endif + # define mach_type_known + # endif +-# if defined(__riscv) && defined(LINUX) ++# if defined(__riscv) + # define RISCV + # define mach_type_known + # endif +@@ -2939,6 +2939,19 @@ EXTERN_C_BEGIN + # define LINUX_STACKBOTTOM + # define DYNAMIC_LOADING + # endif ++# ifdef FREEBSD ++# define OS_TYPE "FREEBSD" ++# ifndef GC_FREEBSD_THREADS ++# define MPROTECT_VDB ++# endif ++# define SIG_SUSPEND SIGUSR1 ++# define SIG_THR_RESTART SIGUSR2 ++# define FREEBSD_STACKBOTTOM ++# define DYNAMIC_LOADING ++ extern char etext[]; ++# define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext) ++# define DATASTART_USES_BSDGETDATASTART ++# endif + # endif /* RISCV */ + + #if defined(__GLIBC__) && !defined(DONT_USE_LIBC_PRIVATES)