[Mono-devel-list] [LONG] Any Interest in FreeBSD Patches? Then see attached.

John Merryweather Cooper john_m_cooper at yahoo.com
Fri Jul 16 15:47:19 EDT 2004


I'm the FreeBSD maintainer for mono and I've finally gotten a
reasonable, working mono on FreeBSD (at least on -CURRENT, FreeBSD
5.2).  In the hopes that some of this might get integrated into the next
release (and make my job a little easier), I've attached the patches
necessary to get Mono 1.0 working.  All of these patches can be had via
cvsweb at:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/mono/files/

SOME COMMENTS:

#####
# extra-patch-signbit  ONLY NEEDED FOR FREEBSD 4.x
#####

This patch is needed only for FreeBSD 4.x (aka -STABLE).  The best way
to test for this would be to include <sys/param.h> and test
__FREEBSD_version.  If FREEBSD_version is less than 500000, then mono is
being compiled on -STABLE and this patch is needed.  See
patch-libc_threadlibs.c for an example.

#####
# patch-configure
#####

The build environment in the FreeBSD Ports system defines two
environment variables:  PTHREAD_CFLAGS and PTHREAD_LIBS.  The contents
of these two environments vary depending on the FreeBSD version,
particularly in FreeBSD 5.x (aka -CURRENT).  Rather than take a guess
and hard-code these values in configure, it's safer to use the values
directly to ensure the the proper compiler flags are sent for each
version.  That's particularly important now for -CURRENT because there's
just enough TLS support in the compiler to fool configure into thinking
-CURRENT can do TLS (it can't yet--probably not until the import of GCC
3.4.x is completed).  In running configure, I still need to disable TLS
by sending --with-nptl=no or the resulting mono will hang.  See the
Makefile at:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/mono/Makefile

#####
# patch-ligbc_Makefile.in
#####

Avoid building the documentation since all the tools haven't been
ported, etc.

#####
# patch-ligbc_configure
#####

Get PTHREAD_CFLAGS and PTHREAD_LIBS to be used.

#####
# patch-libgc_dbg_mlc.c
#####

Patch so GC at least somewhat works.

#####
# patch-libgc_dyn_load.c
#####

FreeBSD exists on both 32 and 64 bit platforms, so make allowances for
this.

#####
# patch-libgc_include_private_gcconfig.h
#####

Remap signals to something sensible for FreeBSD.  Also note that the
Alpha platform has issues with MPROTECT_VDB.

#####
# patch-libgc_ltmain.sh
#####

Don't explicitly include libc in linking.  Also handle -pthread for
-STABLE.  Also handle allergy that some have to the installation of *.la
files.

#####
# patch-libgc_os_dep.c
#####

More signal handling stuff gets fixed.

#####
# patch-libgc_threadlibs.c
#####

Whether -pthread or -lpthread is needed depends on the OS Version.  Map
it accordingly.

#####
# patch-ltmain.sh
#####

See patch-libgc-ltmain.sh (nearly identical).

#####
# patch-mono_Makefile.in
#####

Don't automatically run the tests.  People building from ports get
really irritated for some reason when tests are run during the build.

Any questions?  Please ask.  :)

jmc

<--------------------------FREEBSD PATCHES BEGIN:---------------------->
#####
# extra-patch-signbit  ONLY NEEDED FOR FREEBSD 4.x
#####
--- mono/mini/mini-x86.c	Mon Sep 29 05:28:49 2003
+++ mono/mini/mini-x86.c	Sat Aug 30 04:01:27 2003
@@ -40,6 +40,32 @@
 	guint8  pad;
 } MonoJitArgumentInfo;
 
+union IEEEd2bits {
+    double d;
+    struct {
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+	unsigned int    manl    :32;
+	unsigned int    manh    :20;
+	unsigned int    exp     :11;
+	unsigned int    sign    :1;
+#else
+	unsigned int    sign    :1;
+	unsigned int    exp     :11;
+	unsigned int    manh    :20;
+	unsigned int    manl    :32;
+#endif
+    } bits;
+};
+
+int
+signbit(double d)
+{
+    union IEEEd2bits u;
+
+    u.d = d;
+    return (u.bits.sign);
+}
+
 /*
  * arch_get_argument_info:
  * @csig:  a method signature

#####
# patch-configure
#####
--- configure.orig	Wed Jul  7 22:19:06 2004
+++ configure	Wed Jul  7 22:35:38 2004
@@ -2020,10 +2020,10 @@
 		;;
 	*-*-*freebsd*|*-*-*openbsd*)
 		platform_win32=no
-		CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
-		libmono_cflags="-D_THREAD_SAFE"
-		LDFLAGS="$LDFLAGS -pthread"
-		libmono_ldflags="-pthread"
+		CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
+		libmono_cflags="$PTHREAD_CFLAGS"
+		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
+		libmono_ldflags="$PTHREAD_LIBS"
 		need_link_unlink=yes
 		cat >>confdefs.h <<\_ACEOF
 #define PTHREAD_POINTER_ID 1
@@ -14003,8 +14003,8 @@
 ACCESS_UNALIGNED="yes"
 
 JIT_SUPPORTED=no
-LIBC="libc.so.6"
-INTL="libc.so.6"
+LIBC="libc.so"
+INTL="libc.so"
 
 jit_wanted=false
 case "$host" in

#####
# patch-ligbc_Makefile.in
#####
--- libgc/Makefile.in.orig	Sat Jun 12 15:40:48 2004
+++ libgc/Makefile.in	Sat Jun 12 15:41:15 2004
@@ -120,7 +120,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = include doc
+SUBDIRS = include
 
 noinst_LTLIBRARIES = libmonogc.la
 
#####
# patch-libgc_configure
#####
--- libgc/configure.bak	Tue Jun 29 06:29:58 2004
+++ libgc/configure	Wed Jul  7 22:43:28 2004
@@ -3686,8 +3686,8 @@
 #define GC_FREEBSD_THREADS 1
 _ACEOF
 
-	INCLUDES="$INCLUDES -pthread"
-	THREADLIBS=-pthread
+	INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
+	THREADLIBS="$PTHREAD_LIBS"
       	;;
      *-*-solaris*)
 	cat >>confdefs.h <<\_ACEOF

#####
# patch-libgc_dbg_mlc.c
#####
--- libgc/dbg_mlc.c.orig	Tue May 13 16:59:49 2003
+++ libgc/dbg_mlc.c	Wed May 12 20:13:19 2004
@@ -414,6 +414,23 @@
     GC_register_displacement((word)sizeof(oh) + offset);
 }
 
+#if defined(__FreeBSD__)
+#include <dlfcn.h>
+static void GC_caller_func_offset(ad, symp, offp)
+const GC_word ad;
+const char **symp;
+int *offp;
+{
+    Dl_info caller;
+    if (dladdr((const void *)ad, &caller) && caller.dli_sname != NULL)
{
+      *symp = caller.dli_sname;
+      *offp = (const char *)ad - (const char *)caller.dli_saddr;
+    }
+}
+#else
+#define GC_caller_func(ad, symp, offp)
+#endif
+
 # ifdef __STDC__
     GC_PTR GC_debug_malloc(size_t lb, GC_EXTRA_PARAMS)
 # else
@@ -428,6 +445,13 @@
 {
     GC_PTR result = GC_malloc(lb + DEBUG_BYTES);
     
+#ifdef GC_ADD_CALLER
+    if (s == NULL) {
+      GC_caller_func_offset(ra, &s, &i);
+      if (s == NULL)
+        s = "unknown";
+    }
+#endif
     if (result == 0) {
         GC_err_printf1("GC_debug_malloc(%ld) returning NIL (",
         	       (unsigned long) lb);
@@ -789,6 +813,13 @@
     register size_t old_sz;
     register hdr * hhdr;
     
+#ifdef GC_ADD_CALLER
+    if (s == NULL) {
+      GC_caller_func_offset(ra, &s, &i);
+      if (s == NULL)
+        s = "unknown";
+    }
+#endif
     if (p == 0) return(GC_debug_malloc(lb, OPT_RA s, i));
     if (base == 0) {
         GC_err_printf1(
@@ -1094,7 +1125,11 @@
 }
 
 #ifdef GC_ADD_CALLER
-# define RA GC_RETURN_ADDR,
+# ifdef GC_RETURN_ADDR_PARENT
+#  define RA GC_RETURN_ADDR_PARENT,
+# else
+#  define RA GC_RETURN_ADDR,
+# endif
 #else
 # define RA
 #endif
@@ -1102,12 +1137,12 @@
 GC_PTR GC_debug_malloc_replacement(lb)
 size_t lb;
 {
-    return GC_debug_malloc(lb, RA "unknown", 0);
+    return GC_debug_malloc(lb, RA NULL, 0);
 }
 
 GC_PTR GC_debug_realloc_replacement(p, lb)
 GC_PTR p;
 size_t lb;
 {
-    return GC_debug_realloc(p, lb, RA "unknown", 0);
+    return GC_debug_realloc(p, lb, RA NULL, 0);
 }

#####
# patch-libgc_dyn_load.c
#####
--- libgc/dyn_load.c.orig	Tue May 18 14:42:19 2004
+++ libgc/dyn_load.c	Sat Jun 12 15:23:33 2004
@@ -91,6 +91,13 @@
 /* Newer versions of GNU/Linux define this macro.  We
  * define it similarly for any ELF systems that don't.  */
 #  ifndef ElfW
+#ifdef __FreeBSD__
+#if __ELF_WORD_SIZE == 32
+#define ElfW(type) Elf32_##type
+#else
+#define ElfW(type) Elf64_##type
+#endif
+#else
 #    ifdef __NetBSD__
 #      if ELFSIZE == 32
 #        define ElfW(type) Elf32_##type
@@ -104,6 +111,7 @@
 #        define ElfW(type) Elf64_##type
 #      endif
 #    endif
+#endif
 #  endif
 
 #if defined(SUNOS5DL) && !defined(USE_PROC_FOR_LIBRARIES)

#####
# patch-libgc_include_private_gcconfig.h
#####
--- libgc/include/private/gcconfig.h.orig	Mon Oct  6 22:38:35 2003
+++ libgc/include/private/gcconfig.h	Mon Oct  6 22:38:56 2003
@@ -1151,8 +1151,8 @@
 #	ifndef GC_FREEBSD_THREADS
 #	    define MPROTECT_VDB
 #	endif
-#	define SIG_SUSPEND SIGUSR1
-#	define SIG_THR_RESTART SIGUSR2
+#	define SIG_SUSPEND SIGTSTP
+#	define SIG_THR_RESTART SIGCONT
 #	define FREEBSD_STACKBOTTOM
 #	ifdef __ELF__
 #	    define DYNAMIC_LOADING
@@ -1466,8 +1466,8 @@
 #   ifdef FREEBSD
 #	define OS_TYPE "FREEBSD"
 /* MPROTECT_VDB is not yet supported at all on FreeBSD/alpha. */
-#	define SIG_SUSPEND SIGUSR1
-#	define SIG_THR_RESTART SIGUSR2
+#	define SIG_SUSPEND SIGTSTP
+#	define SIG_THR_RESTART SIGCONT
 #	define FREEBSD_STACKBOTTOM
 #	ifdef __ELF__
 #	    define DYNAMIC_LOADING

#####
# patch-libgc_ltmain.sh
#####
--- libgc/ltmain.sh.orig	Mon Mar 31 09:34:30 2003
+++ libgc/ltmain.sh	Sat Jun 12 15:23:56 2004
@@ -1060,8 +1060,16 @@
 	continue
 	;;
 
+      -pthread)
+      compile_command="$compile_command -pthread"
+      finalize_command="$finalize_command -pthread"
+      compiler_flags="$compiler_flags -pthread"
+      continue
+      ;;
+
       -module)
 	module=yes
+	build_old_libs=no
 	continue
 	;;
 
@@ -2444,6 +2452,9 @@
 	  *-*-openbsd*)
 	    # Do not include libc due to us having libc/libc_r.
 	    ;;
+	  *-*-freebsd*)
+	    # FreeBSD doesn't need this...
+	    ;;
 	  *)
 	    # Add libc to deplibs on all other systems if necessary.
 	    if test $build_libtool_need_lc = "yes"; then
@@ -4210,10 +4221,12 @@
 	fi
 
 	# Install the pseudo-library for information purposes.
+	if /usr/bin/false; then
 	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
 	instname="$dir/$name"i
 	$show "$install_prog $instname $destdir/$name"
 	$run eval "$install_prog $instname $destdir/$name" || exit $?
+	fi
 
 	# Maybe install the static library, too.
 	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"

#####
# patch-libgc_os_dep.c
#####
--- libgc/os_dep.c.orig	Sat Jun 12 17:10:31 2004
+++ libgc/os_dep.c	Sat Jun 12 17:12:42 2004
@@ -700,10 +700,10 @@
 #   endif
 
 #   if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1) \
-    || defined(HURD) || defined(NETBSD)
+    || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
 	static struct sigaction old_segv_act;
 #	if defined(_sigargs) /* !Irix6.x */ || defined(HPUX) \
-	|| defined(HURD) || defined(NETBSD)
+	|| defined(HURD) || defined(NETBSD) || defined(FREEBSD)
 	    static struct sigaction old_bus_act;
 #	endif
 #   else
@@ -718,7 +718,7 @@
 #   endif
     {
 #	if defined(SUNOS5SIGS) || defined(IRIX5)  \
-        || defined(OSF1) || defined(HURD) || defined(NETBSD)
+        || defined(OSF1) || defined(HURD) || defined(NETBSD) ||
defined(FREEBSD)
 	  struct sigaction	act;
 
 	  act.sa_handler	= h;
@@ -738,7 +738,7 @@
 #	  else
 	        (void) sigaction(SIGSEGV, &act, &old_segv_act);
 #		if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
-		   || defined(HPUX) || defined(HURD) || defined(NETBSD)
+		   || defined(HPUX) || defined(HURD) || defined(NETBSD) ||
defined(FREEBSD)
 		    /* Under Irix 5.x or HP/UX, we may get SIGBUS.	*/
 		    /* Pthreads doesn't exist under Irix 5.x, so we	*/
 		    /* don't have to worry in the threads case.		*/
@@ -774,10 +774,10 @@
     void GC_reset_fault_handler()
     {
 #       if defined(SUNOS5SIGS) || defined(IRIX5) \
-	   || defined(OSF1) || defined(HURD) || defined(NETBSD)
+	   || defined(OSF1) || defined(HURD) || defined(NETBSD) ||
defined(FREEBSD)
 	  (void) sigaction(SIGSEGV, &old_segv_act, 0);
 #	  if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
-	     || defined(HPUX) || defined(HURD) || defined(NETBSD)
+	     || defined(HPUX) || defined(HURD) || defined(NETBSD) ||
defined(FREEBSD)
 	      (void) sigaction(SIGBUS, &old_bus_act, 0);
 #	  endif
 #       else

#####
# patch-libgc_threadlibs.c
#####
--- libgc/threadlibs.c.orig	Wed Jul  7 22:57:48 2004
+++ libgc/threadlibs.c	Wed Jul  7 23:05:12 2004
@@ -1,5 +1,6 @@
 # include "private/gcconfig.h"
 # include <stdio.h>
+# include <sys/param.h>
 
 int main()
 {
@@ -12,7 +13,11 @@
 #   if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
 	|| defined(GC_FREEBSD_THREADS) || defined(GC_SOLARIS_PTHREADS) \
 	|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
+#       if (__FREEBSD_version >= 500000)
         printf("-lpthread\n");
+#       else
+	printf("-pthread\n");
+#       endif
 #   endif
 #   if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
 	printf("-lpthread -lrt\n");

#####
# patch-ltmain.sh
#####
--- ltmain.sh.orig	Thu May 22 16:42:22 2003
+++ ltmain.sh	Tue May 27 12:12:52 2003
@@ -1072,7 +1072,7 @@
 	  esac
 	 elif test "X$arg" = "X-lc_r"; then
 	  case $host in
-	 *-*-openbsd* | *-*-freebsd*)
+	 *-*-openbsd* | *-*-freebsd4*)
 	    # Do not include libc_r directly, use -pthread flag.
 	    continue
 	    ;;
@@ -1082,8 +1082,16 @@
 	continue
 	;;
 
+      -pthread)
+      compile_command="$compile_command -pthread"
+      finalize_command="$finalize_command -pthread"
+      compiler_flags="$compiler_flags -pthread"
+      continue
+      ;;
+
       -module)
 	module=yes
+	build_old_libs=no
 	continue
 	;;
 
@@ -2498,6 +2506,9 @@
 	  *-*-openbsd* | *-*-freebsd*)
 	    # Do not include libc due to us having libc/libc_r.
 	    ;;
+	  *-*-freebsd*)
+	    # FreeBSD doesn't need this...
+	    ;;
 	  *)
 	    # Add libc to deplibs on all other systems if necessary.
 	    if test $build_libtool_need_lc = "yes"; then
@@ -4325,10 +4336,12 @@
 	fi
 
 	# Install the pseudo-library for information purposes.
+	if /usr/bin/false; then
 	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
 	instname="$dir/$name"i
 	$show "$install_prog $instname $destdir/$name"
 	$run eval "$install_prog $instname $destdir/$name" || exit $?
+	fi
 
 	# Maybe install the static library, too.
 	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"

#####
# patch-mono_Makefile.in
#####
--- mono/Makefile.in.bak	Mon Feb  2 17:02:39 2004
+++ mono/Makefile.in	Tue Mar  2 01:48:16 2004
@@ -123,7 +123,7 @@
 @PLATFORM_WIN32_TRUE@	arch monograph interpreter mini tests benchmark
profiler
 
 @PLATFORM_WIN32_FALSE at SUBDIRS = utils io-layer monoburg os metadata cil
dis \
- at PLATFORM_WIN32_FALSE@	arch monograph interpreter mini tests benchmark
handles profiler
+ at PLATFORM_WIN32_FALSE@	arch monograph interpreter mini benchmark
handles profiler
 
 subdir = mono
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs

<--------------------------FREEBSD PATCHES END----------------------->
-------------- next part --------------
--- configure.orig	Wed Jul  7 22:19:06 2004
+++ configure	Wed Jul  7 22:35:38 2004
@@ -2020,10 +2020,10 @@
 		;;
 	*-*-*freebsd*|*-*-*openbsd*)
 		platform_win32=no
-		CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
-		libmono_cflags="-D_THREAD_SAFE"
-		LDFLAGS="$LDFLAGS -pthread"
-		libmono_ldflags="-pthread"
+		CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
+		libmono_cflags="$PTHREAD_CFLAGS"
+		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
+		libmono_ldflags="$PTHREAD_LIBS"
 		need_link_unlink=yes
 		cat >>confdefs.h <<\_ACEOF
 #define PTHREAD_POINTER_ID 1
@@ -14003,8 +14003,8 @@
 ACCESS_UNALIGNED="yes"
 
 JIT_SUPPORTED=no
-LIBC="libc.so.6"
-INTL="libc.so.6"
+LIBC="libc.so"
+INTL="libc.so"
 
 jit_wanted=false
 case "$host" in
-------------- next part --------------
--- libgc/Makefile.in.orig	Sat Jun 12 15:40:48 2004
+++ libgc/Makefile.in	Sat Jun 12 15:41:15 2004
@@ -120,7 +120,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = include doc
+SUBDIRS = include
 
 noinst_LTLIBRARIES = libmonogc.la
 
-------------- next part --------------
--- configure.orig	Wed Jul  7 22:19:06 2004
+++ configure	Wed Jul  7 22:35:38 2004
@@ -2020,10 +2020,10 @@
 		;;
 	*-*-*freebsd*|*-*-*openbsd*)
 		platform_win32=no
-		CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
-		libmono_cflags="-D_THREAD_SAFE"
-		LDFLAGS="$LDFLAGS -pthread"
-		libmono_ldflags="-pthread"
+		CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
+		libmono_cflags="$PTHREAD_CFLAGS"
+		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
+		libmono_ldflags="$PTHREAD_LIBS"
 		need_link_unlink=yes
 		cat >>confdefs.h <<\_ACEOF
 #define PTHREAD_POINTER_ID 1
@@ -14003,8 +14003,8 @@
 ACCESS_UNALIGNED="yes"
 
 JIT_SUPPORTED=no
-LIBC="libc.so.6"
-INTL="libc.so.6"
+LIBC="libc.so"
+INTL="libc.so"
 
 jit_wanted=false
 case "$host" in
-------------- next part --------------
--- libgc/Makefile.in.orig	Sat Jun 12 15:40:48 2004
+++ libgc/Makefile.in	Sat Jun 12 15:41:15 2004
@@ -120,7 +120,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = include doc
+SUBDIRS = include
 
 noinst_LTLIBRARIES = libmonogc.la
 
-------------- next part --------------
--- libgc/configure.bak	Tue Jun 29 06:29:58 2004
+++ libgc/configure	Wed Jul  7 22:43:28 2004
@@ -3686,8 +3686,8 @@
 #define GC_FREEBSD_THREADS 1
 _ACEOF
 
-	INCLUDES="$INCLUDES -pthread"
-	THREADLIBS=-pthread
+	INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
+	THREADLIBS="$PTHREAD_LIBS"
       	;;
      *-*-solaris*)
 	cat >>confdefs.h <<\_ACEOF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_dbg_mlc.c
Type: text/x-csrc
Size: 2020 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_dyn_load.c
Type: text/x-csrc
Size: 661 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_include_private_gcconfig.h
Type: text/x-chdr
Size: 785 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_ltmain.sh
Type: application/x-shellscript
Size: 1112 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_os_dep.c
Type: text/x-csrc
Size: 1930 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0004.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_threadlibs.c
Type: text/x-csrc
Size: 671 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0005.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-ltmain.sh
Type: application/x-shellscript
Size: 1350 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0006.bin 
-------------- next part --------------
--- mono/Makefile.in.bak	Mon Feb  2 17:02:39 2004
+++ mono/Makefile.in	Tue Mar  2 01:48:16 2004
@@ -123,7 +123,7 @@
 @PLATFORM_WIN32_TRUE@	arch monograph interpreter mini tests benchmark profiler
 
 @PLATFORM_WIN32_FALSE at SUBDIRS = utils io-layer monoburg os metadata cil dis \
- at PLATFORM_WIN32_FALSE@	arch monograph interpreter mini tests benchmark handles profiler
+ at PLATFORM_WIN32_FALSE@	arch monograph interpreter mini benchmark handles profiler
 
 subdir = mono
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-------------- next part --------------
--- mono/mini/mini-x86.c	Mon Sep 29 05:28:49 2003
+++ mono/mini/mini-x86.c	Sat Aug 30 04:01:27 2003
@@ -40,6 +40,32 @@
 	guint8  pad;
 } MonoJitArgumentInfo;
 
+union IEEEd2bits {
+    double d;
+    struct {
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+	unsigned int    manl    :32;
+	unsigned int    manh    :20;
+	unsigned int    exp     :11;
+	unsigned int    sign    :1;
+#else
+	unsigned int    sign    :1;
+	unsigned int    exp     :11;
+	unsigned int    manh    :20;
+	unsigned int    manl    :32;
+#endif
+    } bits;
+};
+
+int
+signbit(double d)
+{
+    union IEEEd2bits u;
+
+    u.d = d;
+    return (u.bits.sign);
+}
+
 /*
  * arch_get_argument_info:
  * @csig:  a method signature
-------------- next part --------------
--- mono/mini/mini-x86.c	Mon Sep 29 05:28:49 2003
+++ mono/mini/mini-x86.c	Sat Aug 30 04:01:27 2003
@@ -40,6 +40,32 @@
 	guint8  pad;
 } MonoJitArgumentInfo;
 
+union IEEEd2bits {
+    double d;
+    struct {
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+	unsigned int    manl    :32;
+	unsigned int    manh    :20;
+	unsigned int    exp     :11;
+	unsigned int    sign    :1;
+#else
+	unsigned int    sign    :1;
+	unsigned int    exp     :11;
+	unsigned int    manh    :20;
+	unsigned int    manl    :32;
+#endif
+    } bits;
+};
+
+int
+signbit(double d)
+{
+    union IEEEd2bits u;
+
+    u.d = d;
+    return (u.bits.sign);
+}
+
 /*
  * arch_get_argument_info:
  * @csig:  a method signature
-------------- next part --------------
--- configure.orig	Wed Jul  7 22:19:06 2004
+++ configure	Wed Jul  7 22:35:38 2004
@@ -2020,10 +2020,10 @@
 		;;
 	*-*-*freebsd*|*-*-*openbsd*)
 		platform_win32=no
-		CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
-		libmono_cflags="-D_THREAD_SAFE"
-		LDFLAGS="$LDFLAGS -pthread"
-		libmono_ldflags="-pthread"
+		CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
+		libmono_cflags="$PTHREAD_CFLAGS"
+		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
+		libmono_ldflags="$PTHREAD_LIBS"
 		need_link_unlink=yes
 		cat >>confdefs.h <<\_ACEOF
 #define PTHREAD_POINTER_ID 1
@@ -14003,8 +14003,8 @@
 ACCESS_UNALIGNED="yes"
 
 JIT_SUPPORTED=no
-LIBC="libc.so.6"
-INTL="libc.so.6"
+LIBC="libc.so"
+INTL="libc.so"
 
 jit_wanted=false
 case "$host" in
-------------- next part --------------
--- libgc/Makefile.in.orig	Sat Jun 12 15:40:48 2004
+++ libgc/Makefile.in	Sat Jun 12 15:41:15 2004
@@ -120,7 +120,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = include doc
+SUBDIRS = include
 
 noinst_LTLIBRARIES = libmonogc.la
 
-------------- next part --------------
--- libgc/configure.bak	Tue Jun 29 06:29:58 2004
+++ libgc/configure	Wed Jul  7 22:43:28 2004
@@ -3686,8 +3686,8 @@
 #define GC_FREEBSD_THREADS 1
 _ACEOF
 
-	INCLUDES="$INCLUDES -pthread"
-	THREADLIBS=-pthread
+	INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
+	THREADLIBS="$PTHREAD_LIBS"
       	;;
      *-*-solaris*)
 	cat >>confdefs.h <<\_ACEOF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_dbg_mlc.c
Type: text/x-csrc
Size: 2020 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0007.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_dyn_load.c
Type: text/x-csrc
Size: 661 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0008.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_include_private_gcconfig.h
Type: text/x-chdr
Size: 785 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0009.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_ltmain.sh
Type: application/x-shellscript
Size: 1112 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0010.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_os_dep.c
Type: text/x-csrc
Size: 1930 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0011.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libgc_threadlibs.c
Type: text/x-csrc
Size: 671 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0012.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-ltmain.sh
Type: application/x-shellscript
Size: 1350 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040716/044adab6/attachment-0013.bin 
-------------- next part --------------
--- mono/Makefile.in.bak	Mon Feb  2 17:02:39 2004
+++ mono/Makefile.in	Tue Mar  2 01:48:16 2004
@@ -123,7 +123,7 @@
 @PLATFORM_WIN32_TRUE@	arch monograph interpreter mini tests benchmark profiler
 
 @PLATFORM_WIN32_FALSE at SUBDIRS = utils io-layer monoburg os metadata cil dis \
- at PLATFORM_WIN32_FALSE@	arch monograph interpreter mini tests benchmark handles profiler
+ at PLATFORM_WIN32_FALSE@	arch monograph interpreter mini benchmark handles profiler
 
 subdir = mono
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs


More information about the Mono-devel-list mailing list