Index: libgc/include/private/gcconfig.h
===================================================================
--- libgc/include/private/gcconfig.h	(revision 73669)
+++ libgc/include/private/gcconfig.h	(working copy)
@@ -153,6 +153,11 @@
 #    define SUNOS5
 #    define mach_type_known
 # endif
+# if defined(sun) && (defined(__x86_64__))
+#    define X86_64
+#    define SUNOS5
+#    define mach_type_known
+# endif
 # if (defined(__OS2__) || defined(__EMX__)) && defined(__32BIT__)
 #    define I386
 #    define OS2
@@ -2018,6 +2023,36 @@
 	extern char etext[];
 #	define SEARCH_FOR_DATA_START
 #   endif
+#   ifdef SUNOS5
+#	define ELF_CLASS ELFCLASS64
+#	define OS_TYPE "SUNOS5"
+        extern int _etext[], _end[];
+  	extern ptr_t GC_SysVGetDataStart();
+#       define DATASTART GC_SysVGetDataStart(0x1000, _etext)
+#	define DATAEND (_end)
+/*	# define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7,  	*/
+/*      but reportedly breaks under 2.8.  It appears that the stack	*/
+/* 	base is a property of the executable, so this should not break	*/
+/* 	old executables.						*/
+/*  	HEURISTIC2 probably works, but this appears to be preferable.	*/
+/* #       include <sys/vm.h> */
+/* #	define STACKBOTTOM USRSTACK */
+#	define HEURISTIC2
+#	define PROC_VDB
+#	define DYNAMIC_LOADING
+#	if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
+#	    define USE_MMAP
+	    /* Otherwise we now use calloc.  Mmap may result in the	*/
+	    /* heap interleaved with thread stacks, which can result in	*/
+	    /* excessive blacklisting.  Sbrk is unusable since it	*/
+	    /* doesn't interact correctly with the system malloc.	*/
+#	endif
+#       ifdef USE_MMAP
+#         define HEAP_START (ptr_t)0x40000000
+#       else
+#	  define HEAP_START DATAEND
+#       endif
+#   endif
 # endif
 
 #if defined(LINUX) && defined(USE_MMAP)
Index: mono/tests/tests-config
===================================================================
--- mono/tests/tests-config	(revision 73669)
+++ mono/tests/tests-config	(working copy)
@@ -1,5 +1,5 @@
 <configuration>
-	<dllmap dll="cygwin1.dll" target="libc.so.6" />
-	<dllmap dll="libc" target="libc.so.6" />
+	<dllmap dll="cygwin1.dll" target="libc.so" />
+	<dllmap dll="libc" target="libc.so" />
 </configuration>
 
Index: configure.in
===================================================================
--- configure.in	(revision 73669)
+++ configure.in	(working copy)
@@ -1609,6 +1609,10 @@
 		  solaris*)
 			LIBC="libc.so"
 			INTL="libintl.so"
+			if test "x$ac_cv_sizeof_void_p" = "x8"; then
+				TARGET=AMD64
+				arch_target=amd64
+			fi
 
 			# On solaris 10 x86, gcc prints a warning saying 'visibility attribute not supported on this configuration; ignored', but linking fails. A test case:
 			# int astruct __attribute__ ((visibility ("hidden")));
