Use a large heap to build the system with LIAR/svm on a 32bit host.
authorMatt Birkholz <matt@birchwood-abbey.net>
Sat, 4 Feb 2017 00:38:41 +0000 (17:38 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Sat, 4 Feb 2017 00:38:41 +0000 (17:38 -0700)
The default heap (4096Kw) is exhausted compiling xml-parser.bin.

src/Makefile.in
src/configure.ac

index 174b060d61431251d28773b5a1bdb7409078770a..11b4a001c4d65d6340023cbdb08315a13afa1975 100644 (file)
@@ -98,6 +98,7 @@ all-native: cross-target
 
 @IF_CROSS@COMPILER_SETTINGS_CROSS = (set! compiler:cross-compiling? true)
 @IF_LIARC@COMPILER_SETTINGS_LIARC = (set! compiler:invoke-c-compiler? false)
+TOOL_TOOLCHAIN_HEAP = @TOOL_TOOLCHAIN_HEAP@
 
 TOOL_COMPILER_SETTINGS = \
        $(COMPILER_SETTINGS_CROSS) \
@@ -110,6 +111,7 @@ HOST_SCHEME = '$(MIT_SCHEME_EXE)' --batch-mode
 TOOL_COMPILER = $(TOOL_TOOLCHAIN)
 TOOL_SYNTAXER = $(HOST_SCHEME) --band $(TOOLCHAIN)/syntaxer.com
 TOOL_TOOLCHAIN = $(HOST_SCHEME) --band $(TOOLCHAIN)/compiler.com \
+  $(TOOL_TOOLCHAIN_HEAP) \
   --eval '(begin $(TOOL_COMPILER_SETTINGS))'
 
 .PHONY: toolchain
index e6e5028885c183d308b1c05fee6b5a3ae6a8a24a..d71e45092125e5cb25502879bc326b8901aa193d 100644 (file)
@@ -177,6 +177,13 @@ directory, which is usually \`/usr/local/lib/mit-scheme-${mit_scheme_native_code
     fi
 fi
 
+# A 32bit host running LIAR/svm needs a large heap.
+small_words='(= 4 (vector-ref (gc-space-status) 0))'
+if test x"${mit_scheme_native_code}" = xsvm1 \
+   && ${MIT_SCHEME_EXE} --eval "(%exit (if ${small_words} 0 1))"; then \
+    TOOL_TOOLCHAIN_HEAP="--heap 10000"
+fi
+
 AC_SUBST([DEFAULT_TARGET])
 AC_SUBST([ALL_TARGET])
 AC_SUBST([INSTALL_COM])
@@ -189,6 +196,7 @@ AC_SUBST([IF_DEBUG_TOOLCHAIN])
 AC_SUBST([IF_LIARC])
 AC_SUBST([IF_NOT_DEBUG_TOOLCHAIN])
 AC_SUBST([IF_SVM])
+AC_SUBST([TOOL_TOOLCHAIN_HEAP])
 
 AC_PROG_INSTALL
 AC_PROG_LN_S