[Mono-devel-list] Patch: 100% working mono under FreeBSD

Bill Middleton flashdict at gmail.com
Mon Apr 11 06:25:48 EDT 2005


This patch to HEAD (along with Dick's great new io-layer) gets
everything working under FreeBSD for 1.1.17.  Here we add support
for MONO_ARCH_USE_SIGACTION, fix libgc, support freebsd6, and
clean up a nit that crept in from a bad archive patch.

Detailed descriptions follow, and the patch is attached.

Thanks very much,

Bill




Index: libgc/include/private/gcconfig.h
===================================================================
This patch redefines SIG_SUSPEND and SIG_THR_RESTART to SIGTSTP and
SIGCONT.  It has been submitted previously, but has not yet
been committed.  Source: bsd# patch archive.

Index: libgc/configure.in
===================================================================
Add support for freebsd6 to libgc/configure.in.  Reuses the
definition for freebsd5, but may be patched in the port to
provide explicit compilation against libthr instead of libpthread.

Index: libgc/os_dep.c
===================================================================
Add necessary FREEBSD support to two os-dependent sigaction()
calls which RESTART for SIGBUS and SIGSEGV.  Source: bsd# patch
archive.

Index: libgc/dyn_load.c
===================================================================
Clean up and add support for FREEBSD for ElfW.  Source: bsd# patch
archive.

Index: configure.in
===================================================================
- Support freebsd6 in configure with sigaltstack

- Remove depracated with_nptl

- Conditionally check for working ieeefp.h on FreeBSD

- Support *bsd* in the AC_TRY_RUN test for sigaltstack(). Note that
sigaltstack is  default-enabled only for freebsd6 for now, where I
have tested it thoroughly, but configure command-line enabling using
with-sigaltstack=yes will now work for freebsd5, as well.

- Fix --with-preview. (PREVIEW)  Preview always builds even when disabled now.

Index: ikvm-native/jni.c
===================================================================
This is a re-submission of a bsd# archive patch which was committed
by Zoltan recently, but did not fix the problem.  We must completely
forego the inclusion of alloca.h on *BSD*, as it is not available,
and alloca() is defined in stdlib.h, which is always included.

Index: mono/mini/exceptions-x86.c
===================================================================
Add support for MONO_ARCH_USE_SIGACTION (sigaltstack) for FreeBSD.
As mentioned in a previous mono-devel thread, FreeBSD does not provide
the gregs[] array to access the register values in ucontext{}
struct.  This patch supports sigaltstack() via specific reference
to the members, implemented in Zoltan's new
mono_arch_sigctx_to_monoctx() routine, when enabled.

Index: mono/mini/mini-x86.c
===================================================================
Simply call pthread_attr_init() on the pthread_attr. This is
required on FreeBSD even when using pthread_attr_get_np() as
currently implemented.

Index: mono/mini/mini-x86.h
===================================================================
Redefine MAP_ANONYMOUS to MAP_ANON on FreeBSD to support sigaltstack()
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.1.1.17.txt
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050411/8efcbfb9/attachment.txt 


More information about the Mono-devel-list mailing list