[Gc] fix boehm-gc on Debian/m68k

Thorsten Glaser tg at debian.org
Sat May 7 07:42:47 PDT 2011


there’s no getcontext(2) on Debian/m68k but boehm-gc tries to
use it (and fails). This causes an FTBFS in w3m, but using the
gctest.c programme from gcc 3.4.6 is enough to expose the bug.

root at ara2:~ # gcc gctest.c -lgc
root at ara2:~ # ./a.out
Getcontext failed: Use another register retrieval method?

I’ve attached a diff against your CVS which _should_ fix the
problem (not tested), and currently am preparing one against
the Debian package (7.1 still) which will be tested (with the
same effect, just a different location for the ifndef).

Please review and, unless buggy, apply.

FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh
-------------- next part --------------
Index: include/private/gcconfig.h
RCS file: /cvsroot/bdwgc/bdwgc/include/private/gcconfig.h,v
retrieving revision 1.84
diff -u -p -r1.84 gcconfig.h
--- include/private/gcconfig.h	5 May 2011 05:24:48 -0000	1.84
+++ include/private/gcconfig.h	7 May 2011 14:27:11 -0000
@@ -2404,7 +2404,7 @@
 #if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \
                              || defined(OPENBSD) || defined(ARM32) \
                              || defined(MIPS) || defined(AVR32))) \
-     || (defined(LINUX) && defined(SPARC)) \
+     || (defined(LINUX) && (defined(SPARC) || defined(M68K)) \
      || (defined(RTEMS) && defined(I386))) && !defined(NO_GETCONTEXT)

More information about the Gc mailing list