From 0f8e9aef6c845d89471aa936bb2ac75996256b9b Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 16 Aug 2017 11:45:28 +0100
Subject: [PATCH 24/24] Do not pass -g to GCC when not Py_DEBUG

This bloats our exe and our modules a lot.
---
 configure    | 6 +++---
 configure.ac | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Index: CPython/configure
===================================================================
--- CPython.orig/configure	2023-12-14 17:49:31.864960501 -0600
+++ CPython/configure	2023-12-14 17:50:52.191001230 -0600
@@ -4806,9 +4806,9 @@
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
   if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
+    CFLAGS="-O2"
   else
-    CFLAGS="-g"
+    CFLAGS=
   fi
 else
   if test "$GCC" = yes; then
@@ -8138,7 +8138,7 @@
 	    if test "$Py_DEBUG" = 'true' ; then
 		OPT="-g $PYDEBUG_CFLAGS -Wall"
 	    else
-		OPT="-g $WRAP -O3 -Wall"
+		OPT="$WRAP -O3 -Wall"
 	    fi
 	    ;;
 	*)
Index: CPython/configure.ac
===================================================================
--- CPython.orig/configure.ac	2023-12-14 17:49:31.866025176 -0600
+++ CPython/configure.ac	2023-12-14 17:50:52.192276782 -0600
@@ -2089,7 +2089,7 @@
 	    if test "$Py_DEBUG" = 'true' ; then
 		OPT="-g $PYDEBUG_CFLAGS -Wall"
 	    else
-		OPT="-g $WRAP -O3 -Wall"
+		OPT="$WRAP -O3 -Wall"
 	    fi
 	    ;;
 	*)
