View | Details | Raw Unified | Return to bug 176030
Collapse All | Expand All

(-)files/patch-configure (-8 / +7 lines)
Lines 1-12 Link Here
1
1
--- ./configure.orig	2013-01-08 13:47:51.000000000 -0500
2
$FreeBSD$
2
+++ ./configure	2013-02-11 07:52:29.000000000 -0500
3
3
@@ -3993,12 +3993,6 @@
4
--- configure.orig
4
 
5
+++ configure
5
 		libdl=
6
@@ -3995,10 +3995,6 @@
7
 		libgc_threads=pthreads
6
 		libgc_threads=pthreads
8
 		# This doesn't seem to work as of 7.0 on amd64
7
-		# This doesn't seem to work as of 7.0 on amd64
9
 		with_sigaltstack=no
8
-		with_sigaltstack=no
10
-# TLS is only partially implemented on -CURRENT (compiler support
9
-# TLS is only partially implemented on -CURRENT (compiler support
11
-# but NOT library support)
10
-# but NOT library support)
12
-#
11
-#
(-)files/patch-mcs_tools_gacutil_driver.cs (+38 lines)
Line 0 Link Here
1
--- ./mcs/tools/gacutil/driver.cs.orig	2013-01-08 13:43:19.000000000 -0500
2
+++ ./mcs/tools/gacutil/driver.cs	2013-02-11 08:32:50.000000000 -0500
3
@@ -427,15 +427,33 @@
4
 					break;
5
 
6
 				string dir = directories [i];
7
+				string extension = null;
8
+				
9
+				if (File.Exists(Path.Combine (dir, assembly_name + ".dll"))) {
10
+					extension = ".dll";
11
+				} else if (File.Exists(Path.Combine (dir, assembly_name + ".DLL"))) {
12
+					extension = ".DLL";
13
+				} else if (File.Exists(Path.Combine (dir, assembly_name + ".exe"))) {
14
+					extension = ".exe";
15
+				} else if (File.Exists(Path.Combine (dir, assembly_name + ".EXE"))) {
16
+					extension = ".EXE";
17
+				} else {
18
+					failures++;
19
+					WriteLine("Cannot find the assembly: " + assembly_name);
20
+					continue;
21
+				}
22
+
23
+				string AssemblyFilename = assembly_name + extension;
24
 
25
 				AssemblyName an = AssemblyName.GetAssemblyName (
26
-					Path.Combine (dir, assembly_name + ".dll"));
27
+					Path.Combine(dir, AssemblyFilename));
28
 				WriteLine ("Assembly: " + an.FullName);
29
 
30
 				Directory.Delete (dir, true);
31
 				if (package != null) {
32
 					string link_dir = Path.Combine (libdir, package);
33
-					string link = Path.Combine (link_dir, assembly_name + ".dll");
34
+					string link = Path.Combine(link_dir, AssemblyFilename);
35
+
36
 					try { 
37
 						File.Delete (link);
38
 					} catch {
(-)files/patch-mono_metadata_sgen-gc.c (+52 lines)
Line 0 Link Here
1
--- ./mono/metadata/sgen-gc.c.orig	2013-01-08 13:41:08.000000000 -0500
2
+++ ./mono/metadata/sgen-gc.c	2013-02-09 12:28:15.000000000 -0500
3
@@ -179,6 +179,9 @@
4
 #ifdef HAVE_PTHREAD_H
5
 #include <pthread.h>
6
 #endif
7
+#ifdef HAVE_PTHREAD_ATTR_GET_NP
8
+#include <pthread_np.h>
9
+#endif
10
 #ifdef HAVE_SEMAPHORE_H
11
 #include <semaphore.h>
12
 #endif
13
@@ -3990,17 +3993,28 @@
14
 #endif
15
 
16
 	/* try to get it with attributes first */
17
-#if defined(HAVE_PTHREAD_GETATTR_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK)
18
-	{
19
-		size_t size;
20
-		void *sstart;
21
-		pthread_attr_t attr;
22
-		pthread_getattr_np (pthread_self (), &attr);
23
-		pthread_attr_getstack (&attr, &sstart, &size);
24
-		info->stack_start_limit = sstart;
25
-		info->stack_end = (char*)sstart + size;
26
-		pthread_attr_destroy (&attr);
27
-	}
28
+#if (defined(HAVE_PTHREAD_GETATTR_NP) || defined(HAVE_PTHREAD_ATTR_GET_NP)) && defined(HAVE_PTHREAD_ATTR_GETSTACK)
29
+  {
30
+	size_t size;
31
+	void *sstart;
32
+	pthread_attr_t attr;
33
+
34
+#if defined(HAVE_PTHREAD_GETATTR_NP)
35
+	/* Linux */
36
+	pthread_getattr_np (pthread_self (), &attr);
37
+#elif defined(HAVE_PTHREAD_ATTR_GET_NP)
38
+	/* BSD */
39
+	pthread_attr_init (&attr);
40
+	pthread_attr_get_np (pthread_self (), &attr);
41
+#else
42
+#error Cannot determine which API is needed to retrieve pthread attributes.
43
+#endif
44
+
45
+	pthread_attr_getstack (&attr, &sstart, &size);
46
+	info->stack_start_limit = sstart;
47
+	info->stack_end = (char*)sstart + size;
48
+	pthread_attr_destroy (&attr);
49
+  }
50
 #elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
51
 		 info->stack_end = (char*)pthread_get_stackaddr_np (pthread_self ());
52
 		 info->stack_start_limit = (char*)info->stack_end - pthread_get_stacksize_np (pthread_self ());
(-)files/patch-mono_metadata_threads.c (+107 lines)
Line 0 Link Here
1
--- ./mono/metadata/threads.c.orig	2013-01-08 13:41:07.000000000 -0500
2
+++ ./mono/metadata/threads.c	2013-02-09 12:28:05.000000000 -0500
3
@@ -785,7 +785,16 @@
4
 void
5
 mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize)
6
 {
7
-#if defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
8
+#if defined(HOST_WIN32)
9
+	/* FIXME: 	If this function won't (or shouldn't) ever be called when running on
10
+			Windows, use the error preprocessor declaration here instead of this
11
+			default code (to _ensure_ we don't call this function on Windows). */
12
+	*staddr = NULL;
13
+	*stsize = (size_t)-1;
14
+	return;
15
+
16
+#elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
17
+	/* Mac OS X */
18
 	*staddr = (guint8*)pthread_get_stackaddr_np (pthread_self ());
19
 	*stsize = pthread_get_stacksize_np (pthread_self ());
20
 
21
@@ -793,52 +802,54 @@
22
 	*staddr -= *stsize;
23
 	*staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
24
 	return;
25
-	/* FIXME: simplify the mess below */
26
-#elif !defined(HOST_WIN32)
27
+
28
+#elif (defined(HAVE_PTHREAD_GETATTR_NP) || defined(HAVE_PTHREAD_ATTR_GET_NP)) && defined(HAVE_PTHREAD_ATTR_GETSTACK)
29
+	/* Linux, BSD */
30
+
31
 	pthread_attr_t attr;
32
 	guint8 *current = (guint8*)&attr;
33
 
34
-	pthread_attr_init (&attr);
35
-#  ifdef HAVE_PTHREAD_GETATTR_NP
36
-	pthread_getattr_np (pthread_self(), &attr);
37
-#  else
38
-#    ifdef HAVE_PTHREAD_ATTR_GET_NP
39
-	pthread_attr_get_np (pthread_self(), &attr);
40
-#    elif defined(sun)
41
-	*staddr = NULL;
42
-	pthread_attr_getstacksize (&attr, &stsize);
43
-#    elif defined(__OpenBSD__)
44
-	stack_t ss;
45
-	int rslt;
46
-
47
-	rslt = pthread_stackseg_np(pthread_self(), &ss);
48
-	g_assert (rslt == 0);
49
+	#if defined(HAVE_PTHREAD_GETATTR_NP)
50
+	/* Linux */
51
+	pthread_getattr_np (pthread_self (), &attr);
52
 
53
-	*staddr = (guint8*)((size_t)ss.ss_sp - ss.ss_size);
54
-	*stsize = ss.ss_size;
55
-#    else
56
-	*staddr = NULL;
57
-	*stsize = 0;
58
-	return;
59
-#    endif
60
-#  endif
61
+	#elif defined(HAVE_PTHREAD_ATTR_GET_NP)
62
+	/* BSD */
63
+	pthread_attr_init (&attr);
64
+	pthread_attr_get_np (pthread_self (), &attr);
65
+	
66
+	#else
67
+	#error Cannot determine which API is needed to retrieve pthread attributes.
68
+	#endif
69
 
70
-#  if !defined(sun)
71
-#    if !defined(__OpenBSD__)
72
 	pthread_attr_getstack (&attr, (void**)staddr, stsize);
73
-#    endif
74
+	pthread_attr_destroy (&attr);
75
+
76
 	if (*staddr)
77
 		g_assert ((current > *staddr) && (current < *staddr + *stsize));
78
-#  endif
79
 
80
+	/* When running under emacs, sometimes staddr is not aligned to a page size */
81
+	*staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
82
+
83
+#elif defined(sun)
84
+	/* What OS / architecture is this for? */
85
+	pthread_attr_t attr;
86
+	pthread_attr_init (&attr);
87
+	pthread_attr_getstacksize (&attr, &stsize);
88
 	pthread_attr_destroy (&attr);
89
-#else
90
 	*staddr = NULL;
91
-	*stsize = (size_t)-1;
92
-#endif
93
 
94
 	/* When running under emacs, sometimes staddr is not aligned to a page size */
95
 	*staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
96
+	return;
97
+
98
+#else
99
+	/* FIXME:	It'd be better to use the 'error' preprocessor macro here so we know
100
+			at compile-time if the target platform isn't supported. */
101
+	*staddr = NULL;
102
+	*stsize = 0;
103
+	return;
104
+#endif
105
 }	
106
 
107
 MonoThread *
(-)files/patch-mono_mini_mini-exceptions.c (+16 lines)
Line 0 Link Here
1
--- ./mono/mini/mini-exceptions.c.orig	2013-02-09 12:00:43.000000000 -0500
2
+++ ./mono/mini/mini-exceptions.c	2013-02-09 12:01:11.000000000 -0500
3
@@ -2002,10 +2002,10 @@
4
 
5
 	sa.ss_sp = tls->signal_stack;
6
 	sa.ss_size = MONO_ARCH_SIGNAL_STACK_SIZE;
7
-#if __APPLE__
8
-	sa.ss_flags = 0;
9
-#else
10
+#ifdef __linux__
11
 	sa.ss_flags = SS_ONSTACK;
12
+#else
13
+	sa.ss_flags = 0;
14
 #endif
15
 	g_assert (sigaltstack (&sa, NULL) == 0);
16

Return to bug 176030