From 1b62db4e46865949779560e25fe835eeea3dc48b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 29 Nov 2015 18:02:18 -0800 Subject: Increase stack size on Windows. * Makefile: include CONF_LDFLAGS in LDFLAGS. * configure (conf_ldflags): New variable. (gen_config_make): Generate CONF_LDFLAGS make variable. New test which sets up conf_ldflags for a 16Mb stack size if we are on Cygwin or MinGW. --- Makefile | 2 +- configure | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f718e40d..5a6e9111 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ CFLAGS := -iquote $(conf_dir) $(if $(top_srcdir),-iquote $(top_srcdir)) \ $(LANG_FLAGS) $(DIAG_FLAGS) \ $(DBG_FLAGS) $(PLATFORM_CFLAGS) $(EXTRA_FLAGS) CFLAGS := $(filter-out $(REMOVE_FLAGS),$(CFLAGS)) -LDFLAGS := -lm $(PLATFORM_LDFLAGS) +LDFLAGS := -lm $(CONF_LDFLAGS) $(PLATFORM_LDFLAGS) ifneq ($(subst g++,@,$(notdir $(CC))),$(notdir $(CC))) CFLAGS := $(filter-out -Wmissing-prototypes -Wstrict-prototypes,$(CFLAGS)) diff --git a/configure b/configure index 682b69ac..bd1eee31 100755 --- a/configure +++ b/configure @@ -105,6 +105,7 @@ inline= platform_cflags= remove_flags= lex_dbg_flags= +conf_ldflags= platform_ldflags= txr_dbg_opts=--gc-debug valgrind= @@ -685,6 +686,7 @@ BUILD_TARGETS := $(if [ $debug_also ] ; then echo '$(PROG)'; fi) PLATFORM_CFLAGS := $platform_cflags PLATFORM_LDFLAGS := $platform_ldflags +CONF_LDFLAGS := $conf_ldflags REMOVE_FLAGS := $remove_flags LEX_DBG_FLAGS := $lex_dbg_flags TXR_DBG_OPTS := $txr_dbg_opts @@ -2320,6 +2322,20 @@ else printf "no\n" fi +# +# Low stack size on Windows fails the man or boy test case. +# + +printf "Do we need to set stack size ... " + +if uname -a | grep -q -E 'MINGW|CYGWIN' ; then + conf_ldflags='-Wl,--stack,16777216' + printf "yes\n" +else + printf "no\n" +fi + + # # Dependent variables # -- cgit v1.2.3