Hi,

I looked into this problem and with the attached patch I can successfully 
compile the package.
The most important part is the SHORT_ALIGN define, as m68k has different 
alignment rules. I also synced the m68k gc_os_dep.c with the current 
Debian boehm-gc definitions.
I tested it with debug options and found a few smaller problems, which I 
included in the patch.

bye, Roman
- m68k usually has 16bit alignment, so define SHORT_ALIGN
- SHORT_ALIGN halves the stack size, so increase it a bit
  otherwise it can get close during some tests.
- update the M68K specific info for gc_os_dep.c
- two miscellaneous fixes where memory is allocated via
  scm_must_alloc() but not freed via scm_must_free().


diff -ur guile-1.6-1.6.8.org/libguile/__scm.h guile-1.6-1.6.8/libguile/__scm.h
--- guile-1.6-1.6.8.org/libguile/__scm.h        2005-06-10 00:42:53.000000000 
+0200
+++ guile-1.6-1.6.8/libguile/__scm.h    2006-10-15 06:07:08.000000000 +0200
@@ -373,6 +373,9 @@
 #ifdef atarist
 # define SHORT_ALIGN
 #endif
+#ifdef __mc68000__
+# define SHORT_ALIGN
+#endif
 
 #ifdef SHORT_ALIGN
 typedef short SCM_STACKITEM;
diff -ur guile-1.6-1.6.8.org/libguile/eval.c guile-1.6-1.6.8/libguile/eval.c
--- guile-1.6-1.6.8.org/libguile/eval.c 2006-05-19 07:15:55.000000000 +0200
+++ guile-1.6-1.6.8/libguile/eval.c     2006-10-15 16:55:52.000000000 +0200
@@ -1705,7 +1705,7 @@
   { SCM_OPTION_INTEGER, "depth", 20, "Maximal length of printed backtrace." },
   { SCM_OPTION_BOOLEAN, "backtrace", 0, "Show backtrace on error." },
   { SCM_OPTION_BOOLEAN, "debug", 0, "Use the debugging evaluator." },
-  { SCM_OPTION_INTEGER, "stack", 20000, "Stack size limit (measured in words; 
0 = no check)." },
+  { SCM_OPTION_INTEGER, "stack", 50000, "Stack size limit (measured in words; 
0 = no check)." },
   { SCM_OPTION_SCM, "show-file-name", (unsigned long)SCM_BOOL_T, "Show file 
names and line numbers in backtraces when not `#f'.  A value of `base' displays 
only base names, while `#t' displays full names."}
 };
 
diff -ur guile-1.6-1.6.8.org/libguile/gc_os_dep.c 
guile-1.6-1.6.8/libguile/gc_os_dep.c
--- guile-1.6-1.6.8.org/libguile/gc_os_dep.c    2004-12-14 06:21:39.000000000 
+0100
+++ guile-1.6-1.6.8/libguile/gc_os_dep.c        2006-09-11 23:44:36.000000000 
+0200
@@ -550,12 +550,17 @@
 #   endif
 #   ifdef LINUX
 #       define OS_TYPE "LINUX"
-#       define STACKBOTTOM ((ptr_t)0xf0000000)
+#       define LINUX_STACKBOTTOM
 #       define MPROTECT_VDB
 #       ifdef __ELF__
 #            define DYNAMIC_LOADING
-             extern char **__environ;
-#            define DATASTART ((ptr_t)(&__environ))
+#            include <features.h>
+#            if defined(__GLIBC__)&& __GLIBC__>=2
+#              define SEARCH_FOR_DATA_START
+#              define DATASTART GC_data_start
+#            else /* !GLIBC2 */
+               extern char **__environ;
+#              define DATASTART ((ptr_t)(&__environ))
                              /* hideous kludge: __environ is the first */
                              /* word in crt0.o, and delimits the start */
                              /* of the data segment, no matter which   */
@@ -564,6 +569,7 @@
                              /* would include .rodata, which may       */
                              /* contain large read-only data tables    */
                              /* that we'd rather not scan.             */
+#            endif /* !GLIBC2 */
              extern int _end;
 #            define DATAEND (&_end)
 #       else
diff -ur guile-1.6-1.6.8.org/libguile/environments.c 
guile-1.6-1.6.8/libguile/environments.c
--- guile-1.6-1.6.8.org/libguile/environments.c 2005-06-10 00:42:53.000000000 
+0200
+++ guile-1.6-1.6.8/libguile/environments.c     2006-10-15 15:02:33.000000000 
+0200
@@ -996,7 +996,7 @@
 {
   core_environments_finalize (env);
 
-  free (LEAF_ENVIRONMENT (env));
+  scm_must_free (LEAF_ENVIRONMENT (env));
   return sizeof (struct leaf_environment);
 }
 
diff -ur guile-1.6-1.6.8.org/libguile/regex-posix.c 
guile-1.6-1.6.8/libguile/regex-posix.c
--- guile-1.6-1.6.8.org/libguile/regex-posix.c  2005-06-10 00:42:55.000000000 
+0200
+++ guile-1.6-1.6.8/libguile/regex-posix.c      2006-10-14 21:21:48.000000000 
+0200
@@ -95,7 +95,7 @@
 regex_free (SCM obj)
 {
   regfree (SCM_RGX (obj));
-  free (SCM_RGX (obj));
+  scm_must_free (SCM_RGX (obj));
   return sizeof(regex_t);
 }
 

Reply via email to