[Gc] [PATCH] Improved MIPS/Linux support for Boehm C

Thiemo Seufer ths at networkno.de
Wed May 28 08:57:42 PDT 2008


The appended patch improves the configuration definitions for Linux/MIPS.
 - _MIPS_SZPTR is always defined for a mips-linux compiler.
 - I changed the fallback value of STACKBOTTOM to 0x7fff8000, as this
   is the highest userspace address allowed by 32-bit MIPS/Linux. For
   64-bit adressing (N64 ABI), earlier glibcs than 2.2 won't do much
   good, so the fallback case should never trigger.


Thiemo


Index: boehm-gc/bdwgc/include/private/gcconfig.h
===================================================================
--- boehm-gc.orig/bdwgc/include/private/gcconfig.h	2008-05-28 16:21:49.000000000 +0100
+++ boehm-gc/bdwgc/include/private/gcconfig.h	2008-05-28 16:51:50.000000000 +0100
@@ -1316,24 +1316,18 @@
 # ifdef MIPS
 #   define MACH_TYPE "MIPS"
 #   ifdef LINUX
-      /* This was developed for a linuxce style platform.  Probably	*/
-      /* needs to be tweaked for workstation class machines.		*/
 #     define OS_TYPE "LINUX"
 #     define DYNAMIC_LOADING
       extern int _end[];
 #     define DATAEND (_end)
       extern int __data_start[];
 #     define DATASTART ((ptr_t)(__data_start))
-#     ifdef _MIPS_SZPTR
-#	define CPP_WORDSZ _MIPS_SZPTR
-#	define ALIGNMENT (_MIPS_SZPTR/8)
-#     else
-#	define ALIGNMENT 4
-#     endif
+#     define CPP_WORDSZ _MIPS_SZPTR
+#     define ALIGNMENT (_MIPS_SZPTR/8)
 #     if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 || __GLIBC__ > 2
-#        define LINUX_STACKBOTTOM
+#       define LINUX_STACKBOTTOM
 #     else
-#        define STACKBOTTOM 0x80000000
+#       define STACKBOTTOM ((ptr_t)0x7fff8000)
 #     endif
 #   endif /* Linux */
 #   ifdef EWS4800


More information about the Gc mailing list