diff options
Diffstat (limited to 'lang/mono/files')
-rw-r--r-- | lang/mono/files/patch-configure | 27 | ||||
-rw-r--r-- | lang/mono/files/patch-libgc_include_private_gcconfig.h | 47 | ||||
-rw-r--r-- | lang/mono/files/patch-libgc_os_dep.c | 20 | ||||
-rw-r--r-- | lang/mono/files/patch-libgc_pthread_support.c | 2 | ||||
-rw-r--r-- | lang/mono/files/patch-mcs_class_FirebirdSql.Data.Firebird_Assembly_AssemblyInfo.cs | 13 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_dis_get.h | 10 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_handles_Makefile.in | 96 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_handles_semdel.c | 37 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_io-layer_sockets.c | 57 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_mini_Makefile.in | 42 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_mini_exceptions-amd64.c | 83 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_mini_mini-amd64.c | 107 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_mini_mini-amd64.h | 59 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_tests_Makefile.in | 93 | ||||
-rw-r--r-- | lang/mono/files/patch-mono_utils_mono-codeman.c | 24 | ||||
-rw-r--r-- | lang/mono/files/patch-runtime_Makefile.in | 148 | ||||
-rw-r--r-- | lang/mono/files/patch-runtime_semdel-wrapper.in | 6 |
17 files changed, 424 insertions, 447 deletions
diff --git a/lang/mono/files/patch-configure b/lang/mono/files/patch-configure deleted file mode 100644 index 6a2f4fe771f..00000000000 --- a/lang/mono/files/patch-configure +++ /dev/null @@ -1,27 +0,0 @@ ---- configure.orig Wed Jul 6 21:41:55 2005 -+++ configure Wed Jul 6 22:00:23 2005 -@@ -35047,6 +35047,8 @@ - - ac_config_files="$ac_config_files runtime/monodis-wrapper" - -+ ac_config_files="$ac_config_files runtime/semdel-wrapper" -+ - - ac_config_commands="$ac_config_commands runtime/etc/mono/1.0/machine.config" - -@@ -35804,6 +35806,7 @@ - # Handling of arguments. - "runtime/mono-wrapper" ) CONFIG_FILES="$CONFIG_FILES runtime/mono-wrapper" ;; - "runtime/monodis-wrapper" ) CONFIG_FILES="$CONFIG_FILES runtime/monodis-wrapper" ;; -+ "runtime/semdel-wrapper" ) CONFIG_FILES="$CONFIG_FILES runtime/semdel-wrapper" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "mint.pc" ) CONFIG_FILES="$CONFIG_FILES mint.pc" ;; - "mono.pc" ) CONFIG_FILES="$CONFIG_FILES mono.pc" ;; -@@ -36348,6 +36351,7 @@ - case $ac_file in - runtime/mono-wrapper ) chmod +x runtime/mono-wrapper ;; - runtime/monodis-wrapper ) chmod +x runtime/monodis-wrapper ;; -+ runtime/semdel-wrapper ) chmod +x runtime/semdel-wrapper ;; - esac - done - _ACEOF diff --git a/lang/mono/files/patch-libgc_include_private_gcconfig.h b/lang/mono/files/patch-libgc_include_private_gcconfig.h new file mode 100644 index 00000000000..3b0eaeea961 --- /dev/null +++ b/lang/mono/files/patch-libgc_include_private_gcconfig.h @@ -0,0 +1,47 @@ +--- libgc/include/private/gcconfig.h.orig Tue Aug 2 17:51:19 2005 ++++ libgc/include/private/gcconfig.h Wed Aug 3 02:05:34 2005 +@@ -306,6 +306,10 @@ + # define I386 + # define mach_type_known + # endif ++# if defined(FREEBSD) && defined(__x86_64__) ++# define X86_64 ++# define mach_type_known ++# endif + # if defined(__NetBSD__) && (defined(i386) || defined(__i386__)) + # define I386 + # define mach_type_known +@@ -1859,6 +1863,33 @@ + # define PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1) + # endif + # endif ++ ++# ifdef FREEBSD ++# define OS_TYPE "FREEBSD" ++# ifndef GC_FREEBSD_THREADS ++# define MPROTECT_VDB ++# endif ++# define SIG_SUSPEND SIGTSTP ++# define SIG_THR_RESTART SIGCONT ++# define FREEBSD_STACKBOTTOM ++# ifdef __ELF__ ++# define DYNAMIC_LOADING ++# endif ++ extern char etext[]; ++// extern char * GC_FreeBSDGetDataStart(); ++# define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext) ++ ++//# define HEURISTIC2 ++ extern char etext[]; ++//# define SEARCH_FOR_DATA_START ++ ++/* ++ extern char etext[]; ++ extern char * GC_FreeBSDGetDataStart(); ++# define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext) ++*/ ++# endif ++ + # ifdef NETBSD + # define OS_TYPE "NETBSD" + # ifdef __ELF__ diff --git a/lang/mono/files/patch-libgc_os_dep.c b/lang/mono/files/patch-libgc_os_dep.c new file mode 100644 index 00000000000..9a7daef3c9a --- /dev/null +++ b/lang/mono/files/patch-libgc_os_dep.c @@ -0,0 +1,20 @@ +--- libgc/os_dep.c.orig Tue May 3 09:54:00 2005 ++++ libgc/os_dep.c Sat Aug 6 18:23:12 2005 +@@ -80,7 +80,7 @@ + # define NEED_FIND_LIMIT + # endif + +-#if defined(FREEBSD) && defined(I386) ++#if defined(FREEBSD) && (defined(I386) || defined(X86_64)) + # include <machine/trap.h> + # if !defined(PCR) + # define NEED_FIND_LIMIT +@@ -1385,7 +1385,7 @@ + } + # endif + +-# if defined(FREEBSD) && defined(I386) && !defined(PCR) ++# if defined(FREEBSD) && (defined(X86_64) || defined(I386)) && !defined(PCR) + /* Its unclear whether this should be identical to the above, or */ + /* whether it should apply to non-X86 architectures. */ + /* For now we don't assume that there is always an empty page after */ diff --git a/lang/mono/files/patch-libgc_pthread_support.c b/lang/mono/files/patch-libgc_pthread_support.c index 1ba5d63d208..f24549ba31a 100644 --- a/lang/mono/files/patch-libgc_pthread_support.c +++ b/lang/mono/files/patch-libgc_pthread_support.c @@ -8,7 +8,7 @@ - * gcc-3.3.6 miscompiles the &GC_thread_key+sizeof(&GC_thread_key) expression so - * put it into a separate function. - */ --# ifdef __GNUC__ +-# if defined(__GNUC__) && defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL) -static __attribute__((noinline)) unsigned char* get_gc_thread_key_addr GC_PROTO((void)) -{ - return (unsigned char*)&GC_thread_key; diff --git a/lang/mono/files/patch-mcs_class_FirebirdSql.Data.Firebird_Assembly_AssemblyInfo.cs b/lang/mono/files/patch-mcs_class_FirebirdSql.Data.Firebird_Assembly_AssemblyInfo.cs new file mode 100644 index 00000000000..24adb8a5fe9 --- /dev/null +++ b/lang/mono/files/patch-mcs_class_FirebirdSql.Data.Firebird_Assembly_AssemblyInfo.cs @@ -0,0 +1,13 @@ +--- mcs/class/FirebirdSql.Data.Firebird/Assembly/AssemblyInfo.cs.orig Thu Jan 20 15:30:07 2005 ++++ mcs/class/FirebirdSql.Data.Firebird/Assembly/AssemblyInfo.cs Wed Oct 12 23:19:24 2005 +@@ -30,7 +30,7 @@ + [assembly: AssemblyCompany("FirebirdSQL")] + [assembly: AssemblyProduct("Firebird .NET Data Provider")] + [assembly: AssemblyCopyright("(c) 2002-2004. Carlos Guzman Alvarez")] +-[assembly: AssemblyVersion("1.7.0.*")] ++[assembly: AssemblyVersion("1.7.0.0")] + [assembly: AssemblyDelaySign(false)] + [assembly: AssemblyKeyFile("FirebirdSql.Data.Firebird.snk")] +-[assembly: AssemblyKeyName("")] +\ No newline at end of file ++[assembly: AssemblyKeyName("")] diff --git a/lang/mono/files/patch-mono_dis_get.h b/lang/mono/files/patch-mono_dis_get.h new file mode 100644 index 00000000000..f5eb2d1f9da --- /dev/null +++ b/lang/mono/files/patch-mono_dis_get.h @@ -0,0 +1,10 @@ +--- mono/dis/get.h.orig Thu Aug 25 11:12:40 2005 ++++ mono/dis/get.h Sun Oct 2 16:21:54 2005 +@@ -44,6 +44,7 @@ + char *dis_stringify_method_signature (MonoImage *m, MonoMethodSignature *method, int methoddef_row, + MonoGenericContext *context, gboolean fully_qualified); + char *dis_stringify_function_ptr (MonoImage *m, MonoMethodSignature *method); ++char *dis_stringify_marshal_spec (MonoMarshalSpec *spec); + + guint32 method_dor_to_token (guint32 idx); + diff --git a/lang/mono/files/patch-mono_handles_Makefile.in b/lang/mono/files/patch-mono_handles_Makefile.in deleted file mode 100644 index b75b7b64227..00000000000 --- a/lang/mono/files/patch-mono_handles_Makefile.in +++ /dev/null @@ -1,96 +0,0 @@ ---- mono/handles/Makefile.in.orig Thu Jul 7 00:50:49 2005 -+++ mono/handles/Makefile.in Thu Jul 7 01:27:17 2005 -@@ -14,7 +14,7 @@ - - @SET_MAKE@ - --SOURCES = hps.c -+SOURCES = hps.c semdel.c - - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ -@@ -39,7 +39,7 @@ - build_triplet = @build@ - host_triplet = @host@ - target_triplet = @target@ --noinst_PROGRAMS = hps$(EXEEXT) -+noinst_PROGRAMS = hps$(EXEEXT) semdel$(EXEEXT) - subdir = mono/handles - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -56,6 +56,11 @@ - hps_DEPENDENCIES = ../io-layer/libwapi.la ../utils/libmonoutils.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -+semdel_SOURCES = semdel.c -+semdel_OBJECTS = semdel.$(OBJEXT) -+semdel_DEPENDENCIES = ../io-layer/libwapi.la ../utils/libmonoutils.la \ -+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ -+ $(am__DEPENDENCIES_1) - DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp - am__depfiles_maybe = depfiles -@@ -67,8 +72,8 @@ - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ --SOURCES = hps.c --DIST_SOURCES = hps.c -+SOURCES = hps.c semdel.c -+DIST_SOURCES = hps.c semdel.c - ETAGS = etags - CTAGS = ctags - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -@@ -213,6 +218,7 @@ - ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ - ac_ct_RANLIB = @ac_ct_RANLIB@ - ac_ct_STRIP = @ac_ct_STRIP@ -+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ - am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ - am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ - am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -@@ -280,6 +286,14 @@ - $(GMODULE_LIBS) \ - -lm - -+semdel_LDADD = \ -+ ../io-layer/libwapi.la \ -+ ../utils/libmonoutils.la \ -+ $(LIBGC_LIBS) \ -+ $(GLIB_LIBS) \ -+ $(GMODULE_LIBS) \ -+ -lm -+ - EXTRA_DIST = ChangeLog - all: all-am - -@@ -294,9 +308,9 @@ - exit 1;; \ - esac; \ - done; \ -- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mono/handles/Makefile'; \ -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu mono/handles/Makefile'; \ - cd $(top_srcdir) && \ -- $(AUTOMAKE) --foreign mono/handles/Makefile -+ $(AUTOMAKE) --gnu mono/handles/Makefile - .PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ -@@ -324,6 +338,9 @@ - hps$(EXEEXT): $(hps_OBJECTS) $(hps_DEPENDENCIES) - @rm -f hps$(EXEEXT) - $(LINK) $(hps_LDFLAGS) $(hps_OBJECTS) $(hps_LDADD) $(LIBS) -+semdel$(EXEEXT): $(semdel_OBJECTS) $(semdel_DEPENDENCIES) -+ @rm -f semdel$(EXEEXT) -+ $(LINK) $(semdel_LDFLAGS) $(semdel_OBJECTS) $(semdel_LDADD) $(LIBS) - - mostlyclean-compile: - -rm -f *.$(OBJEXT) -@@ -332,6 +349,7 @@ - -rm -f *.tab.c - - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hps.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/semdel.Po@am__quote@ - - .c.o: - @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ diff --git a/lang/mono/files/patch-mono_handles_semdel.c b/lang/mono/files/patch-mono_handles_semdel.c deleted file mode 100644 index 7ef7f2927b2..00000000000 --- a/lang/mono/files/patch-mono_handles_semdel.c +++ /dev/null @@ -1,37 +0,0 @@ ---- /dev/null Thu Jul 7 01:22:00 2005 -+++ mono/handles/semdel.c Thu Jul 7 01:27:26 2005 -@@ -0,0 +1,34 @@ -+#include <config.h> -+#include <glib.h> -+#include <errno.h> -+#include <sys/types.h> -+#include <sys/ipc.h> -+#include <sys/sem.h> -+ -+#include <mono/io-layer/io-layer.h> -+ -+/* We're digging into handle internals here... */ -+#include <mono/io-layer/handles-private.h> -+#include <mono/io-layer/wapi-private.h> -+#include <mono/io-layer/shared.h> -+ -+int main (int argc, char **argv) -+{ -+ int sem_id, ret; -+ -+ _wapi_shared_layout = _wapi_shm_attach(WAPI_SHM_DATA); -+ if (_wapi_shared_layout == FALSE) { -+ exit (0); -+ } -+ -+ sem_id = semget (_wapi_shared_layout->sem_key, _WAPI_SHARED_SEM_COUNT, 0600); -+ if (sem_id != -1) { -+ ret = semctl (sem_id, IPC_RMID, 0); -+ if (ret == -1) { -+ g_message ("Error deleting semaphore: %s", -+ g_strerror (errno)); -+ } -+ } -+ -+ exit (0); -+} diff --git a/lang/mono/files/patch-mono_io-layer_sockets.c b/lang/mono/files/patch-mono_io-layer_sockets.c new file mode 100644 index 00000000000..9a717a487d5 --- /dev/null +++ b/lang/mono/files/patch-mono_io-layer_sockets.c @@ -0,0 +1,57 @@ +--- mono/io-layer/sockets.c.orig Sat May 7 14:54:36 2005 ++++ mono/io-layer/sockets.c Wed Oct 12 22:04:38 2005 +@@ -846,35 +846,32 @@ + return(SOCKET_ERROR); + } + +- if (command != FIONBIO && +- command != FIONREAD && +- command != SIOCATMARK) { +- /* Not listed in the MSDN specs, but ioctl(2) returns +- * this if command is invalid +- */ +- WSASetLastError (WSAEINVAL); +- return(SOCKET_ERROR); +- } +- ++ switch(command){ ++ case FIONBIO: + #ifdef O_NONBLOCK + /* This works better than ioctl(...FIONBIO...) on Linux (it causes + * connect to return EINPROGRESS, but the ioctl doesn't seem to) + */ +- if (command == FIONBIO) { +- ret = fcntl (fd, F_GETFL, 0); +- if (ret != -1) { +- if (*(gboolean *)arg) { +- ret |= O_NONBLOCK; +- } else { +- ret &= ~O_NONBLOCK; ++ ret = fcntl(fd, F_GETFL, 0); ++ if (ret != -1) { ++ if (*(gboolean *)arg) { ++ ret |= O_NONBLOCK; ++ } else { ++ ret &= ~O_NONBLOCK; ++ } ++ ret = fcntl(fd, F_SETFL, ret); + } +- ret = fcntl (fd, F_SETFL, ret); +- } +- } else + #endif /* O_NONBLOCK */ +- { +- ret = ioctl (fd, command, arg); ++ break; ++ case FIONREAD: ++ case SIOCATMARK: ++ ret = ioctl (fd, command, arg); ++ break; ++ default: ++ WSASetLastError (WSAEINVAL); ++ return(SOCKET_ERROR); + } ++ + if (ret == -1) { + gint errnum = errno; + #ifdef DEBUG diff --git a/lang/mono/files/patch-mono_mini_Makefile.in b/lang/mono/files/patch-mono_mini_Makefile.in deleted file mode 100644 index e950f35fe68..00000000000 --- a/lang/mono/files/patch-mono_mini_Makefile.in +++ /dev/null @@ -1,42 +0,0 @@ ---- mono/mini/Makefile.in.orig Wed Jul 6 21:41:54 2005 -+++ mono/mini/Makefile.in Wed Jul 6 23:48:29 2005 -@@ -341,6 +341,7 @@ - ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ - ac_ct_RANLIB = @ac_ct_RANLIB@ - ac_ct_STRIP = @ac_ct_STRIP@ -+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ - am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ - am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ - am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -@@ -422,7 +423,7 @@ - $(libgc_static_libs) \ - $(ICU_LIBS) - --RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/default MONO_SHARED_DIR=$(mono_build_root)/runtime MONO_CFG_DIR=$(mono_cfg_dir) ./mono --config $(top_builddir)/data/config -+RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/default $(top_builddir)/runtime/mono-wrapper - MCS = $(RUNTIME) $(mcs_topdir)/class/lib/default/mcs.exe -unsafe -nowarn:0162 - ILASM = $(RUNTIME) $(mcs_topdir)/ilasm/ilasm.exe - INCLUDES = \ -@@ -641,9 +642,9 @@ - exit 1;; \ - esac; \ - done; \ -- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mono/mini/Makefile'; \ -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu mono/mini/Makefile'; \ - cd $(top_srcdir) && \ -- $(AUTOMAKE) --foreign mono/mini/Makefile -+ $(AUTOMAKE) --gnu mono/mini/Makefile - .PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ -@@ -1124,7 +1125,9 @@ - docu: mini.sgm - docbook2txt mini.sgm - --check-local: rcheck -+check-local: -+ ok=:; $(MAKE) rcheck || ok=false; \ -+ $(top_builddir)/runtime/semdel-wrapper || :; $$ok - - clean-local: - rm -f mono a.out gmon.out *.o test.exe diff --git a/lang/mono/files/patch-mono_mini_exceptions-amd64.c b/lang/mono/files/patch-mono_mini_exceptions-amd64.c new file mode 100644 index 00000000000..3e7142defcb --- /dev/null +++ b/lang/mono/files/patch-mono_mini_exceptions-amd64.c @@ -0,0 +1,83 @@ +--- mono/mini/exceptions-amd64.c.orig Tue Aug 2 17:53:06 2005 ++++ mono/mini/exceptions-amd64.c Tue Aug 2 17:53:20 2005 +@@ -573,11 +573,27 @@ + * @obj: the exception object + */ + gboolean +-mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only) ++mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only) + { +- ucontext_t *ctx = (ucontext_t*)sigctx; +- MonoContext mctx; ++ ucontext_t *ctx = (ucontext_t*)sigctx; ++ MonoContext mctx; + ++#if defined(__FreeBSD__) ++ guint64 *gregs = (guint64 *) &ctx->uc_mcontext; ++ mctx.rax = gregs [REG_RAX]; ++ mctx.rbx = gregs [REG_RBX]; ++ mctx.rcx = gregs [REG_RCX]; ++ mctx.rdx = gregs [REG_RDX]; ++ mctx.rbp = gregs [REG_RBP]; ++ mctx.rsp = gregs [REG_RSP]; ++ mctx.rsi = gregs [REG_RSI]; ++ mctx.rdi = gregs [REG_RDI]; ++ mctx.rip = gregs [REG_RIP]; ++ mctx.r12 = gregs [REG_R12]; ++ mctx.r13 = gregs [REG_R13]; ++ mctx.r14 = gregs [REG_R14]; ++ mctx.r15 = gregs [REG_R15]; ++#else + mctx.rax = ctx->uc_mcontext.gregs [REG_RAX]; + mctx.rbx = ctx->uc_mcontext.gregs [REG_RBX]; + mctx.rcx = ctx->uc_mcontext.gregs [REG_RCX]; +@@ -591,9 +607,25 @@ + mctx.r13 = ctx->uc_mcontext.gregs [REG_R13]; + mctx.r14 = ctx->uc_mcontext.gregs [REG_R14]; + mctx.r15 = ctx->uc_mcontext.gregs [REG_R15]; ++#endif + + mono_handle_exception (&mctx, obj, (gpointer)mctx.rip, test_only); + ++#if defined(__FreeBSD__) ++ gregs [REG_RAX] = mctx.rax; ++ gregs [REG_RBX] = mctx.rbx; ++ gregs [REG_RCX] = mctx.rcx; ++ gregs [REG_RDX] = mctx.rdx; ++ gregs [REG_RBP] = mctx.rbp; ++ gregs [REG_RSP] = mctx.rsp; ++ gregs [REG_RSI] = mctx.rsi; ++ gregs [REG_RDI] = mctx.rdi; ++ gregs [REG_RIP] = mctx.rip; ++ gregs [REG_R12] = mctx.r12; ++ gregs [REG_R13] = mctx.r13; ++ gregs [REG_R14] = mctx.r14; ++ gregs [REG_R15] = mctx.r15; ++#else + ctx->uc_mcontext.gregs [REG_RAX] = mctx.rax; + ctx->uc_mcontext.gregs [REG_RBX] = mctx.rbx; + ctx->uc_mcontext.gregs [REG_RCX] = mctx.rcx; +@@ -607,14 +639,20 @@ + ctx->uc_mcontext.gregs [REG_R13] = mctx.r13; + ctx->uc_mcontext.gregs [REG_R14] = mctx.r14; + ctx->uc_mcontext.gregs [REG_R15] = mctx.r15; ++#endif + + return TRUE; + } + + gpointer +-mono_arch_ip_from_context (void *sigctx) ++mono_arch_ip_from_context (void *sigctx) + { +- ucontext_t *ctx = (ucontext_t*)sigctx; +- return (gpointer)ctx->uc_mcontext.gregs [REG_RIP]; ++ ucontext_t *ctx = (ucontext_t*)sigctx; ++#if defined(__FreeBSD__) ++ __register_t *gregs = (__register_t *) &ctx->uc_mcontext; ++ return (gpointer)gregs[REG_RIP]; ++#else ++ return (gpointer)ctx->uc_mcontext.gregs [REG_RIP]; ++#endif + } + diff --git a/lang/mono/files/patch-mono_mini_mini-amd64.c b/lang/mono/files/patch-mono_mini_mini-amd64.c new file mode 100644 index 00000000000..da728145b02 --- /dev/null +++ b/lang/mono/files/patch-mono_mini_mini-amd64.c @@ -0,0 +1,107 @@ +--- mono/mini/mini-amd64.c.orig Tue Aug 2 17:52:50 2005 ++++ mono/mini/mini-amd64.c Tue Aug 2 17:53:27 2005 +@@ -15,6 +15,9 @@ + #include <math.h> + #include <unistd.h> + #include <sys/mman.h> ++#include <sys/ucontext.h> ++ ++#include <pthread_np.h> + + #include <mono/metadata/appdomain.h> + #include <mono/metadata/debug-helpers.h> +@@ -55,6 +58,10 @@ + #define ARGS_OFFSET 16 + #define GP_SCRATCH_REG AMD64_R11 + ++#ifndef MAP_ANONYMOUS ++#define MAP_ANONYMOUS MAP_ANON ++#endif ++ + /* + * AMD64 register usage: + * - callee saved registers are used for global register allocation +@@ -5683,6 +5690,7 @@ + + #define IS_REX(inst) (((inst) >= 0x40) && ((inst) <= 0x4f)) + ++ + static int reg_to_ucontext_reg [] = { + REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI, + REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, +@@ -5694,27 +5702,37 @@ + * integer overflow. + */ + gboolean +-mono_arch_is_int_overflow (void *sigctx, void *info) ++mono_arch_is_int_overflow (void *sigctx, void *info) + { +- ucontext_t *ctx = (ucontext_t*)sigctx; +- guint8* rip; +- int reg; +- +- rip = (guint8*)ctx->uc_mcontext.gregs [REG_RIP]; ++ ucontext_t *ctx = (ucontext_t*)sigctx; ++ guint8* rip; ++ int reg; ++ ++#if defined(__FreeBSD__) ++ __register_t *gregs = (__register_t *) &ctx->uc_mcontext; ++ rip = (guint8*) gregs[REG_RIP]; ++#else ++ rip = (guint8*) ctx->uc_mcontext.gregs [REG_RIP]; ++#endif + +- if (IS_REX (rip [0])) { +- reg = amd64_rex_b (rip [0]); +- rip ++; ++ if (IS_REX (rip [0])) { ++ reg = amd64_rex_b (rip [0]); ++ rip ++; + } + else +- reg = 0; ++ reg = 0; + +- if ((rip [0] == 0xf7) && (x86_modrm_mod (rip [1]) == 0x3) && (x86_modrm_reg (rip [1]) == 0x7)) { +- /* idiv REG */ +- reg += x86_modrm_rm (rip [1]); ++ if ((rip [0] == 0xf7) && (x86_modrm_mod (rip [1]) == 0x3) && (x86_modrm_reg (rip [1]) == 0x7)) { ++ /* idiv REG */ ++ reg += x86_modrm_rm (rip [1]); + +- if (ctx->uc_mcontext.gregs [reg_to_ucontext_reg [reg]] == -1) ++#if defined(__FreeBSD__) ++ if (gregs[reg_to_ucontext_reg[reg]] == -1) + return TRUE; ++#else ++ if (ctx->uc_mcontext.gregs [reg_to_ucontext_reg [reg]] == -1) ++ return TRUE; ++#endif + } + + return FALSE; +@@ -5888,10 +5906,10 @@ + #ifdef HAVE_PTHREAD_GETATTR_NP + pthread_getattr_np( self, &attr ); + #else ++ pthread_attr_init( &attr ); + #ifdef HAVE_PTHREAD_ATTR_GET_NP + pthread_attr_get_np( self, &attr ); + #elif defined(sun) +- pthread_attr_init( &attr ); + pthread_attr_getstacksize( &attr, &stsize ); + #else + #error "Not implemented" +@@ -5925,6 +5943,11 @@ + sa.ss_size = SIGNAL_STACK_SIZE; + sa.ss_flags = SS_ONSTACK; + sigaltstack (&sa, NULL); ++ ++#if !defined(HAVE_PTHREAD_GETATTR_NP) ++ pthread_attr_destroy(&attr); ++#endif ++ + } + + #endif diff --git a/lang/mono/files/patch-mono_mini_mini-amd64.h b/lang/mono/files/patch-mono_mini_mini-amd64.h new file mode 100644 index 00000000000..46256a19e3a --- /dev/null +++ b/lang/mono/files/patch-mono_mini_mini-amd64.h @@ -0,0 +1,59 @@ +--- mono/mini/mini-amd64.h.orig Tue Aug 2 17:52:47 2005 ++++ mono/mini/mini-amd64.h Tue Aug 2 17:53:40 2005 +@@ -130,7 +130,7 @@ + guint64 r15; + } MonoContext; + +-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++/*#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + # define SC_EAX sc_eax + # define SC_EBX sc_ebx + # define SC_ECX sc_ecx +@@ -140,7 +140,7 @@ + # define SC_ESP sc_esp + # define SC_EDI sc_edi + # define SC_ESI sc_esi +-#else ++#else*/ + # define SC_EAX rax + # define SC_EBX rbx + # define SC_ECX rcx +@@ -160,7 +160,7 @@ + # define SC_R14 r14 + # define SC_R15 r15 + +-#endif ++//#endif + + #define MONO_CONTEXT_SET_IP(ctx,ip) do { (ctx)->rip = (long)(ip); } while (0); + #define MONO_CONTEXT_SET_BP(ctx,bp) do { (ctx)->rbp = (long)(bp); } while (0); +@@ -215,6 +215,29 @@ + + gboolean + mono_amd64_is_sse2 (void); ++ ++ ++#ifdef __FreeBSD__ ++ ++#define REG_RAX 7 ++#define REG_RCX 4 ++#define REG_RDX 3 ++#define REG_RBX 8 ++#define REG_RSP 23 ++#define REG_RBP 9 ++#define REG_RSI 2 ++#define REG_RDI 1 ++#define REG_R8 5 ++#define REG_R9 6 ++#define REG_R10 10 ++#define REG_R11 11 ++#define REG_R12 12 ++#define REG_R13 13 ++#define REG_R14 14 ++#define REG_R15 15 ++#define REG_RIP 20 ++ ++#endif // __FreeBSD__ + + #endif /* __MONO_MINI_AMD64_H__ */ + diff --git a/lang/mono/files/patch-mono_tests_Makefile.in b/lang/mono/files/patch-mono_tests_Makefile.in deleted file mode 100644 index b3ef7541756..00000000000 --- a/lang/mono/files/patch-mono_tests_Makefile.in +++ /dev/null @@ -1,93 +0,0 @@ ---- mono/tests/Makefile.in.orig Wed Jul 6 21:41:54 2005 -+++ mono/tests/Makefile.in Wed Jul 6 23:51:30 2005 -@@ -211,6 +211,7 @@ - ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ - ac_ct_RANLIB = @ac_ct_RANLIB@ - ac_ct_STRIP = @ac_ct_STRIP@ -+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ - am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ - am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ - am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -@@ -270,7 +271,12 @@ - TEST_PROG_RUN = MONO_PATH=$(mcs_topdir)/class/lib/default MONO_SHARED_DIR=$(mono_build_root)/runtime $(LIBTOOL) --mode=execute $(TEST_PROG) - JITTEST_PROG_RUN = MONO_PATH=$(mcs_topdir)/class/lib/default MONO_SHARED_DIR=$(mono_build_root)/runtime $(LIBTOOL) --mode=execute $(JITTEST_PROG) - RUNTIME_ARGS = --config tests-config --optimize=all --RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/default $(top_builddir)/runtime/mono-wrapper -+with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/default -+RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper -+MKBUNDLE = \ -+ PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \ -+ $(RUNTIME) $(mcs_topdir)/tools/mkbundle/mkbundle.exe -+ - CSC = $(RUNTIME) $(mcs_topdir)/class/lib/default/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 - ILASM = $(RUNTIME) $(mcs_topdir)/ilasm/ilasm.exe - BENCHSRC = fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs -@@ -326,7 +332,6 @@ - pinvoke11.cs \ - pinvoke13.cs \ - pinvoke17.cs \ -- pinvoke18.cs \ - invoke.cs \ - invoke2.cs \ - runtime-invoke.cs \ -@@ -386,7 +391,6 @@ - appdomain.cs \ - appdomain1.cs \ - appdomain2.cs \ -- appdomain3.cs \ - appdomain-client.cs \ - appdomain-unload.cs \ - loader.cs \ -@@ -521,9 +525,9 @@ - exit 1;; \ - esac; \ - done; \ -- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mono/tests/Makefile'; \ -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu mono/tests/Makefile'; \ - cd $(top_srcdir) && \ -- $(AUTOMAKE) --foreign mono/tests/Makefile -+ $(AUTOMAKE) --gnu mono/tests/Makefile - .PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ -@@ -762,7 +766,9 @@ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am - --check-local: test -+check-local: -+ ok=:; $(MAKE) test || ok=false; \ -+ $(top_builddir)/runtime/semdel-wrapper || :; $$ok - - %.exe: %.il - $(ILASM) -out:$@ $< -@@ -770,7 +776,7 @@ - %.exe: %.cs TestDriver.dll - $(CSC) -r:TestDriver.dll -out:$@ $< - --test: testjit -+test: testjit testbundle - - TestDriver.dll: - $(CSC) -target:library -out:$@ $(srcdir)/../mini/TestDriver.cs -@@ -836,7 +842,7 @@ - export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \ - for i in $(TESTSI_CS) $(TESTBS); do \ - rm -f $${i}.so; \ -- $(JITTEST_PROG) --aot $${i} > /dev/null; \ -+ $(JITTEST_PROG_RUN) --aot $${i} > /dev/null; \ - if $(srcdir)/test-driver '$(JITTEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \ - then \ - passed=`expr $${passed} + 1`; \ -@@ -895,6 +901,11 @@ - echo "$${passed} test(s) passed. $${failed} test(s) failed."; \ - if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \ - for i in $${failed_tests}; do echo $${i}; done; exit 1; fi -+ -+testbundle: console.exe -+ $(MKBUNDLE) --static console.exe -+ $(with_mono_path) ./a.out -+ - rm -rf a.out - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: diff --git a/lang/mono/files/patch-mono_utils_mono-codeman.c b/lang/mono/files/patch-mono_utils_mono-codeman.c new file mode 100644 index 00000000000..c5f06b3335a --- /dev/null +++ b/lang/mono/files/patch-mono_utils_mono-codeman.c @@ -0,0 +1,24 @@ +--- mono/utils/mono-codeman.c.orig Tue Aug 2 17:52:22 2005 ++++ mono/utils/mono-codeman.c Tue Aug 2 17:52:29 2005 +@@ -40,7 +40,11 @@ + #endif + #endif + +-#ifdef __x86_64__ ++#if defined(__x86_64__) && defined(__FreeBSD__) ++#define FORCE_MALLOC ++#endif ++ ++#if defined(__x86_64__) && !defined(__FreeBSD__) + #define ARCH_MAP_FLAGS MAP_32BIT + #else + #define ARCH_MAP_FLAGS 0 +@@ -282,7 +286,7 @@ + chunk->pos = bsize; + chunk->bsize = bsize; + +- /*printf ("code chunk at: %p\n", ptr);*/ ++ //printf ("code chunk at: %p\n", ptr); + return chunk; + } + diff --git a/lang/mono/files/patch-runtime_Makefile.in b/lang/mono/files/patch-runtime_Makefile.in deleted file mode 100644 index b309cc1b904..00000000000 --- a/lang/mono/files/patch-runtime_Makefile.in +++ /dev/null @@ -1,148 +0,0 @@ ---- runtime/Makefile.in.orig Wed Jul 6 21:41:54 2005 -+++ runtime/Makefile.in Wed Jul 6 23:33:56 2005 -@@ -14,10 +14,6 @@ - - @SET_MAKE@ - --# This is just used to copy and install the DLL files that are currently --# being compiled on windows. --# -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -43,14 +39,15 @@ - target_triplet = @target@ - subdir = runtime - DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(srcdir)/mono-wrapper.in $(srcdir)/monodis-wrapper.in -+ $(srcdir)/mono-wrapper.in $(srcdir)/monodis-wrapper.in \ -+ $(srcdir)/semdel-wrapper.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h --CONFIG_CLEAN_FILES = mono-wrapper monodis-wrapper -+CONFIG_CLEAN_FILES = mono-wrapper monodis-wrapper semdel-wrapper - SCRIPTS = $(noinst_SCRIPTS) - depcomp = - am__depfiles_maybe = -@@ -196,6 +193,7 @@ - ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ - ac_ct_RANLIB = @ac_ct_RANLIB@ - ac_ct_STRIP = @ac_ct_STRIP@ -+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ - am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ - am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ - am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -@@ -254,7 +252,7 @@ - # hack to prevent 'check' from depending on 'all' - AUTOMAKE_OPTIONS = cygnus - tmpinst = _tmpinst --noinst_SCRIPTS = mono-wrapper monodis-wrapper -+noinst_SCRIPTS = mono-wrapper monodis-wrapper semdel-wrapper - etctmp = etc - symlinks = etc/mono/1.0/machine.config etc/mono/2.0/machine.config - SUPPORT_FILES = $(symlinks) mono-wrapper wrapper-config -@@ -273,7 +271,7 @@ - CLEANFILES = wrapper-config - - # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want --MYDISTFILES = Makefile.am Makefile.in mono-wrapper.in monodis-wrapper.in -+MYDISTFILES = $(DIST_COMMON) - all: all-am - - .SUFFIXES: -@@ -310,6 +308,8 @@ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - monodis-wrapper: $(top_builddir)/config.status $(srcdir)/monodis-wrapper.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -+semdel-wrapper: $(top_builddir)/config.status $(srcdir)/semdel-wrapper.in -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - - mostlyclean-libtool: - -rm -f *.lo -@@ -418,15 +418,20 @@ - # The write check is to foil 'make distcheck' - all-local: $(SUPPORT_FILES) - if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi -- d=`pwd`; cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' all-profiles -+ d=`pwd`; ok=:; \ -+ ( cd $(mcs_topdir) && \ -+ $(MAKE) PROFILES='$(build_profiles)' all-profiles ) || ok=false; \ -+ ./semdel-wrapper || :; $$ok - - # override automake - install: install-exec install-data - - # override automake - install-exec: $(SUPPORT_FILES) -- d=`pwd`; \ -- cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles -+ d=`pwd`; ok=:; \ -+ ( cd $(mcs_topdir) && \ -+ $(MAKE) PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles ) || ok=false; \ -+ ./semdel-wrapper || :; $$ok - - # override automake - install-data: -@@ -434,33 +439,38 @@ - - # override automake - uninstall: -- d=`pwd`; \ -- cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles -+ d=`pwd`; ok=:; \ -+ ( cd $(mcs_topdir) && \ -+ $(MAKE) PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles ) || ok=false; \ -+ ./semdel-wrapper || :; $$ok - - clean-local: - d=`pwd`; cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' clean-profiles -+ -./semdel-wrapper - -rm -fr $(etctmp) $(tmpinst) .wapi - - mcs-do-test-profiles: -- d=`pwd`; cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' test-profiles -+ d=`pwd`; ok=:; \ -+ ( cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' test-profiles ) || ok=false; \ -+ ./semdel-wrapper || :; $$ok - - mcs-do-run-test-profiles: test-support-files -- d=`pwd`; PATH=$$d/$(tmpinst)/bin:$$PATH ; export PATH ; \ -- ( cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' run-test-profiles ) || ret=false ; \ -- rm -fr $(tmpinst); $$ret -+ d=`pwd`; ok=:; PATH=$$d/$(tmpinst)/bin:$$PATH ; export PATH ; \ -+ ( cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' run-test-profiles ) || ok=false; \ -+ ./semdel-wrapper || :; rm -fr $(tmpinst); $$ok - - # Use --compile-all as a poor man's PEVerify to detect invalid IL - mcs-compileall: mono-wrapper wrapper-config -- save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ret=:; \ -+ save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \ - for profile in $(build_profiles); do \ - MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; export MONO_PATH; \ - for i in $(mcs_topdir)/class/lib/$$profile/*.dll $(mcs_topdir)/class/lib/$$profile/*.exe $(mcs_topdir)/class/Microsoft.VisualBasic/fixup/$$profile/*.dll; do \ - if ./mono-wrapper --compile-all $$i; then \ - echo $$i verified OK; \ - else \ -- echo $$i verification failed; ret=false; \ -+ echo $$i verification failed; ok=false; \ - fi; done; done; \ -- $$ret -+ ./semdel-wrapper || :; $$ok - - check-local: mcs-compileall mcs-do-test-profiles - $(MAKE) $(test_select) mcs-do-run-test-profiles -@@ -506,8 +516,7 @@ - rm -fr $(distdir) - mkdir $(distdir) - test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \ -- if test -f $$file; then d=.; else d=$(srcdir); fi; \ -- cp -p $$d/$$file $(distdir) ; done -+ cp -p $$file $(distdir) ; done - find $(distdir) -type f -exec chmod a+r {} ';' - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/lang/mono/files/patch-runtime_semdel-wrapper.in b/lang/mono/files/patch-runtime_semdel-wrapper.in index 45a8e19aa78..6175c630d53 100644 --- a/lang/mono/files/patch-runtime_semdel-wrapper.in +++ b/lang/mono/files/patch-runtime_semdel-wrapper.in @@ -1,9 +1,9 @@ ---- /dev/null Wed Jul 6 23:13:43 2005 -+++ runtime/semdel-wrapper.in Wed Jul 6 23:20:15 2005 +--- runtime/semdel-wrapper.in.orig Sun Sep 4 18:19:00 2005 ++++ runtime/semdel-wrapper.in Sun Sep 4 19:04:03 2005 @@ -0,0 +1,6 @@ +#! /bin/sh +r='@mono_build_root@' +MONO_CFG_DIR='@mono_cfg_dir@' -+MONO_SHARED_DIR=$r/runtime ++MONO_SHARED_DIR=${MONO_SHARED_DIR_PORT:="$r/runtime"} +export MONO_CFG_DIR MONO_SHARED_DIR +exec "$r/libtool" --mode=execute "$r/mono/handles/semdel" "$@" |