From bd8cc934ed2db3f7e8bca438961aa750d4fd5e9b Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Thu, 13 Jun 2013 16:54:00 -0400 Subject: [PATCH] Force the runtime on OSX to use a 8Mb stack. This change doesn't affect any of the cats that default to 8Mb. We need a significantly big main stack because mcs is implemented in a recursive fashion and, right now, parts of the corlib test suite require in excess of 1Mb of stack space to compile. --- configure.in | 8 ++++++++ mono/mini/Makefile.am.in | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 718895a6d50..c18e9371ab2 100644 --- a/configure.in +++ b/configure.in @@ -72,6 +72,9 @@ no_version_script=no # Set to yes if Unix sockets cannot be created in an anonymous namespace need_link_unlink=no +#Set to extra linker flags to be passed to the runtime binaries (mono /mono-sgen) +extra_runtime_ldflags="" + # Thread configuration inspired by sleepycat's db AC_MSG_CHECKING([host platform characteristics]) libgc_threads=no @@ -323,6 +326,10 @@ case "$host" in CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS" CPPFLAGS_FOR_EGLIB="$CPPFLAGS_FOR_EGLIB $BROKEN_DARWIN_CPPFLAGS" CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS" + extra_runtime_ldflags="-stack_size,0x800000" + ;; + x*64-*-darwin*) + extra_runtime_ldflags="-stack_size,0x800000" ;; arm*-darwin*) has_dtrace=no @@ -352,6 +359,7 @@ if test x$need_link_unlink = xyes; then AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace]) fi +AC_SUBST(extra_runtime_ldflags) AM_CONDITIONAL(HOST_WIN32, test x$host_win32 = xyes) AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes) AM_CONDITIONAL(PLATFORM_LINUX, echo x$target_os | grep -q linux) diff --git a/mono/mini/Makefile.am.in b/mono/mini/Makefile.am.in index e700043bf21..4b4bbbf088b 100644 --- a/mono/mini/Makefile.am.in +++ b/mono/mini/Makefile.am.in @@ -75,10 +75,10 @@ genmdesc_CFLAGS = $(AM_CFLAGS) if NO_VERSION_SCRIPT monoldflags=$(export_ldflags) -monobinldflags=$(export_ldflags) +monobinldflags=$(export_ldflags) $(extra_runtime_ldflags) else monoldflags=-Wl,-version-script=$(srcdir)/ldscript $(export_ldflags) -monobinldflags=-Wl,-version-script=$(srcdir)/ldscript.mono $(export_ldflags) +monobinldflags=-Wl,-version-script=$(srcdir)/ldscript.mono $(export_ldflags) $(extra_runtime_ldflags) endif if HOST_WIN32 -- 2.11.4.GIT