* include/private/gcconfig.h (MIPS, mach_type_known, OS_TYPE,
ALIGNMENT, MPROTECT_VDB, SIG_SUSPEND, SIG_THR_RESTART, DYNAMIC_LOADING,
DATASTART_USES_BSDGETDATASTART): Define for FreeBSD/mips.
* os_dep.c (CODE_OK): Define to si->si_code==SEGV_ACCERR for
FreeBSD/mips.
# define AARCH64
# define mach_type_known
# endif
+# if defined(FREEBSD) && (defined(mips) || defined(__mips) || defined(_mips))
+# define MIPS
+# define mach_type_known
+# endif
# if defined(bsdi) && (defined(i386) || defined(__i386__))
# define I386
# define BSDI
# define DATAEND ((ptr_t)(&_end))
# define DYNAMIC_LOADING
# endif
+# ifdef FREEBSD
+# define OS_TYPE "FREEBSD"
+# define ALIGNMENT 4
+# ifndef GC_FREEBSD_THREADS
+# define MPROTECT_VDB
+# endif
+# define SIG_SUSPEND SIGUSR1
+# define SIG_THR_RESTART SIGUSR2
+# define FREEBSD_STACKBOTTOM
+# ifdef __ELF__
+# define DYNAMIC_LOADING
+# endif
+ extern char etext[];
+# define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext)
+# define DATASTART_USES_BSDGETDATASTART
+# endif /* FreeBSD */
# if defined(NONSTOP)
# define CPP_WORDSZ 32
# define OS_TYPE "NONSTOP"
# ifndef SEGV_ACCERR
# define SEGV_ACCERR 2
# endif
-# if defined(AARCH64) || defined(ARM32)
+# if defined(AARCH64) || defined(ARM32) || defined(MIPS)
# define CODE_OK (si -> si_code == SEGV_ACCERR)
# elif defined(POWERPC)
# define AIM /* Pretend that we're AIM. */