Package: guile-1.6
Version: 1.6.8-6
Severity: serious
Tags: patch

Guile 1.6 fails to build with gcc-4.3 on at least powerpc. The
bootstrap guile segfaults at start time. This is the same problem
as guile 1.8 had in #481378. I adapted the upstream change and
tested the resulting patch. The appended version of it covers only
the configure.in, configure needs to be regenerated afterwards,
which conflicts with a patch from the debian patchset.


Thiemo


--- configure.in~       2006-05-19 07:02:16.000000000 +0200
+++ configure.in        2008-09-03 21:52:37.000000000 +0200
@@ -521,17 +521,42 @@ GUILE_STRUCT_UTIMBUF
 #
 # Which way does the stack grow?
 #
+# Following code comes from Autoconf 2.61's internal _AC_LIBOBJ_ALLOCA
+# macro (/usr/share/autoconf/autoconf/functions.m4).  Gnulib has
+# very similar code, so in future we could look at using that.
+#
+# An important detail is that the code involves find_stack_direction
+# calling _itself_ - which means that find_stack_direction (or at
+# least the second find_stack_direction() call) cannot be inlined.
+# If the code could be inlined, that might cause the test to give
+# an incorrect answer.
 #--------------------------------------------------------------------
 
-AC_TRY_RUN(aux (l) unsigned long l;
-            { int x; exit (l >= ((unsigned long)&x)); }
-          main () { int q; aux((unsigned long)&q); },
-          [AC_DEFINE([SCM_STACK_GROWS_UP], 1,
-              [Define this if a callee's stack frame has a higher address
-               than the caller's stack frame.  On most machines, this is
-               not the case.])],
-           [],
-           [AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in)])
+SCM_I_GSC_STACK_GROWS_UP=0
+AC_RUN_IFELSE([AC_LANG_SOURCE(
+[AC_INCLUDES_DEFAULT
+int
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+  return find_stack_direction () < 0;
+}])],
+              [SCM_I_GSC_STACK_GROWS_UP=1],
+              [],
+              [AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h)])
 
 
 AH_TEMPLATE([SCM_SINGLES],



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to