From f598b5abe85b03030a4586cbf4425e338576f193 Mon Sep 17 00:00:00 2001
From: jeremyd2019 <4524874+jeremyd2019@users.noreply.github.com>
Date: Thu, 17 Jun 2021 18:52:37 +0530
Subject: [PATCH 049/N] configure.ac: set MINGW stack reserve

---
 configure.ac | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index 6ac5799..18d5f41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3746,6 +3746,11 @@ then
 	VxWorks*)
 		LINKFORSHARED='-Wl,-export-dynamic';;
 	esac
+	case $host in
+	*-*-mingw*)
+		# for https://bugs.python.org/issue40458 on MINGW
+		LINKFORSHARED="-Wl,--stack,4194304";;
+	esac
 fi
 AC_MSG_RESULT([$LINKFORSHARED])
 
