[Gc] [patch] gc for GNU/kFreeBSD (amd64 variant)

Petr Salinger Petr.Salinger at seznam.cz
Fri Jan 5 06:17:05 PST 2007


Hi,

please would be possible to extend support for GNU/kFreeBSD
also on amd64/x86-64.

The support for i386 went on 
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2006-May/001309.html
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2006-June/001332.html

This patch only adds recognition of amd64 into three places.

Thanks in advance,

         Petr
-------------- next part --------------
diff -u libgc-6.8/include/private/gcconfig.h libgc-6.8/include/private/gcconfig.h
--- libgc-6.8/include/private/gcconfig.h
+++ libgc-6.8/include/private/gcconfig.h
@@ -334,6 +334,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
only in patch2:
unchanged:
--- libgc-6.8.orig/os_dep.c
+++ libgc-6.8/os_dep.c
@@ -84,7 +84,7 @@
 #   define NEED_FIND_LIMIT
 # endif
 
-#if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__))
+#if defined(FREEBSD) && (defined(I386) || defined(X86_64) || defined(powerpc) || defined(__powerpc__))
 #  include <machine/trap.h>
 #  if !defined(PCR)
 #    define NEED_FIND_LIMIT
@@ -1392,7 +1392,7 @@
 }
 # endif
 
-# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR)
+# if defined(FREEBSD) && (defined(I386) || defined(X86_64) || defined(powerpc) || defined(__powerpc__)) && !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	*/


More information about the Gc mailing list