--- configure 2006/10/18 01:36:48 1.104 +++ configure 2007/01/02 21:51:40 1.105 @@ -718,6 +718,17 @@ fi fi +# CLISP needs a lot of stack space for bootstrapping, +# and insufficient stack space manifests itself via arbitrary GC errors. +# it was believed that 8192 is enough until power5 came along: +# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=166347 +STACK_LIMIT=16384 +stacksizelimit=`ulimit -s 2>/dev/null || :` # cygwin /bin/sh ulimit is broken +# need 3 separate test calls because of "integer expression expected" errors +# when $stacksizelimit is "" or "unlimited" (no short-circuiting!) +test -z "$stacksizelimit" || { test "$stacksizelimit" != unlimited && test "$stacksizelimit" -lt ${STACK_LIMIT}; } +STACK_TOO_SMALL=$? # 0=true => need to reset; 1=false => big enough + if test -z "$do_build"; then echo @@ -729,13 +740,12 @@ echo " ./makemake $makemake_args > Makefile" echo " make config.lisp" echo " ${EDITOR:-vi} config.lisp" - stacksizelimit=`ulimit -s 2>/dev/null || :` # cygwin /bin/sh ulimit is broken - if test -z "$stacksizelimit" || { test "$stacksizelimit" != unlimited && test "$stacksizelimit" -lt 8192; }; then + if [ "${STACK_TOO_SMALL}" = 0 ]; then cat </dev/null; set -e; + if [ "${STACK_TOO_SMALL}" = 0 ]; then + set +e; ulimit -s ${STACK_LIMIT} 2>/dev/null; set -e; + fi make make check cd ..