Package: libgc
Severity: important
Tags: patch

Hi,

The attached patch fixes a few bugs, which keeps the package from
working properly on m68k.
- the thread suspend handler has to save all registers
- change STACKBOTTOM to LINUX_STACKBOTTOM so it works with 2.6 kernel
- reenable MPROTECT_VDB, it should work, otherwise it's probably a
  kernel bug

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: m68k
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.30
Locale: LANG=de_DE.UTF-8, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
diff -ur libgc-6.7.org/include/private/gcconfig.h libgc-6.7/include/private/gcconfig.h
--- libgc-6.7.org/include/private/gcconfig.h	2006-08-04 12:27:03.000000000 +0200
+++ libgc-6.7/include/private/gcconfig.h	2006-08-19 20:05:33.000000000 +0200
@@ -673,10 +673,10 @@
 #   endif
 #   ifdef LINUX
 #       define OS_TYPE "LINUX"
-#       define STACKBOTTOM ((ptr_t)0xf0000000)
+#       define LINUX_STACKBOTTOM
 #       define USE_GENERIC_PUSH_REGS
 		/* We never got around to the assembly version. */
-/* #       define MPROTECT_VDB - Reported to not work  9/17/01 */
+#       define MPROTECT_VDB
 #       ifdef __ELF__
 #            define DYNAMIC_LOADING
 #	     include <features.h>
diff -ur libgc-6.7.org/pthread_stop_world.c libgc-6.7/pthread_stop_world.c
--- libgc-6.7.org/pthread_stop_world.c	2006-08-04 12:27:03.000000000 +0200
+++ libgc-6.7/pthread_stop_world.c	2006-08-04 12:29:37.000000000 +0200
@@ -129,7 +129,7 @@
 
 void GC_suspend_handler_inner(ptr_t sig_arg);
 
-#if defined(IA64) || defined(HP_PA)
+#if defined(IA64) || defined(HP_PA) || defined(M68K)
 extern void GC_with_callee_saves_pushed();
 
 void GC_suspend_handler(int sig)

Reply via email to