Hello,

Recently we found that lang/guile does not work with frame pointer
omission. The patch below adds the compiler option to always include the
frame pointer.

I found when adding this option that the guile runtime would stack
overflow, which is remedied by increasing the default stack size.

With this, guile will build and run on platforms which have
-fomit-frame-pointer on by default.

Any objections? We don't have to apply this now, but if we want to
enable frame pointer elimination again then it would be needed.

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/guile/Makefile,v
retrieving revision 1.47
diff -u -p -u -r1.47 Makefile
--- Makefile    2 Nov 2018 18:48:39 -0000       1.47
+++ Makefile    25 Apr 2019 01:00:30 -0000
@@ -36,6 +36,7 @@ USE_GMAKE=            Yes
 # warning: format '%ji' expects type 'intmax_t', but argument 4 has type 
'scm_t_intmax'
 CONFIGURE_ARGS+=       --disable-error-on-warning
 CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+               CFLAGS="-fno-omit-frame-pointer" \
                LDFLAGS="-L${LOCALBASE}/lib" \
                PTHREAD_CFLAGS=-pthread \
                PTHREAD_LIBS=-pthread
Index: patches/patch-libguile_eval_c
===================================================================
RCS file: patches/patch-libguile_eval_c
diff -N patches/patch-libguile_eval_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libguile_eval_c       25 Apr 2019 01:00:30 -0000
@@ -0,0 +1,20 @@
+--- libguile/eval.c.orig       Mon Dec 13 12:24:39 2010
++++ libguile/eval.c    Sun Apr 14 10:29:56 2019
+@@ -3078,7 +3078,7 @@
+ long scm_eval_stack;
+
+ scm_t_option scm_eval_opts[] = {
+-  { SCM_OPTION_INTEGER, "stack", 22000, "Size of thread stacks (in machine 
words)." }
++  { SCM_OPTION_INTEGER, "stack", 44000, "Size of thread stacks (in machine 
words)." }
+ };
+
+ scm_t_option scm_debug_opts[] = {
+@@ -3099,7 +3099,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", 44000, "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."},
+   { SCM_OPTION_BOOLEAN, "warn-deprecated", 0, "Warn when deprecated features 
are used." }
+ };

Reply via email to