This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Increase tool executables' stack size to 12MB on windows


    Hi lists,

  The default stack allocation for the main thread of an executable on Windows
is only 2MB, which isn't very much.  This leads to failures in some of the GCC
testsuite limits-* tests.

  Some time ago the cygwin and mingw host config scripts had LDFLAGS adjusted
to turn the stack size up to 8MB in the compilers (and other tools).  However,
it turns out that LDFLAGS only affects the stage 1 and cross build (the
original patch was tested in cross, which is presumably why no problem showed
up); to pass flags through a full bootstrap, you need to set BOOT_LDFLAGS

  So, the attached patch adds the same setting to BOOT_LDFLAGS, and turns both
up from 8MB to 12MB in the process.  (I tried 10MB and that wasn't enough.
This was only actually needed by the compilers, but will affect the other
tools anyway; however I don't suppose the extra memory usage will matter on
these desktop workstation platforms.)

config/ChangeLog:

2010-12-02  Dave Korn  <...

	* mh-cygwin (LDFLAGS): Turn up stack allocation to 12MB.
	(BOOT_LDFLAGS): Add matching stack size flag.
	* mh-mingw (LDFLAGS): Likewise.
	(BOOT_LDFLAGS): Likewise.

  Committed to GCC svn at r.167400 and synced across to CVS src/.

    cheers,
      DaveK
Index: config/mh-cygwin
===================================================================
--- config/mh-cygwin	(revision 167399)
+++ config/mh-cygwin	(working copy)
@@ -1,8 +1,10 @@
 EXTRA_TARGET_HOST_ALL_MODULES=maybe-all-libtermcap
 EXTRA_TARGET_HOST_INSTALL_MODULES=maybe-install-libtermcap
 
-# Increase stack limit to same as Linux default.
-LDFLAGS += -Wl,--stack,8388608
+# Increase stack limit to a figure based on the Linux default, with 4MB added
+# as GCC turns out to need that much more to pass all the limits-* tests.
+LDFLAGS += -Wl,--stack,12582912
+BOOT_LDFLAGS += -Wl,--stack,12582912
 
 all-gdb: maybe-all-libtermcap
 
Index: config/mh-mingw
===================================================================
--- config/mh-mingw	(revision 167399)
+++ config/mh-mingw	(working copy)
@@ -2,5 +2,7 @@
 # Vista (see PR33281 for details).
 BOOT_CFLAGS += -D__USE_MINGW_ACCESS -Wno-pedantic-ms-format
 CFLAGS += -D__USE_MINGW_ACCESS
-# Increase stack limit to same as Linux default.
-LDFLAGS += -Wl,--stack,8388608
+# Increase stack limit to a figure based on the Linux default, with 4MB added
+# as GCC turns out to need that much more to pass all the limits-* tests.
+LDFLAGS += -Wl,--stack,12582912
+BOOT_LDFLAGS += -Wl,--stack,12582912

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]