https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
--- Comment #6 from Jakub Kulik <jakub.kulik at oracle dot com> --- So, I tested it with the following simple change and it works nicely: --- gcc-12.2.0/libgo/runtime/proc.c +++ gcc-12.2.0/libgo/runtime/proc.c @@ -798,7 +798,15 @@ runtime_malg(bool allocatestack, bool si } newg = allocg(); if(allocatestack) { - stacksize = StackMin; + char* res = getenv("GCCGO_MIN_STACK_SIZE"); + if (res) { + stacksize = atoi(res) * 1024 * 1024; + + if (stacksize < StackMin) + stacksize = StackMin; + } else { + stacksize = StackMin; + } if(signalstack) { stacksize = 32 * 1024; // OS X wants >= 8K, GNU/Linux >= 2K #ifdef SIGSTKSZ As said, it's not the right solution, but it's an improvement. As for the split stack, I am wondering whether it is possible to do it without linker support? IIUIC, gold makes sure then when split stack code calls a non split stack one, much bigger stack is available. But if we make sure that the headroom is big enough all the time, then it might work without the linker support as well.