From 95763d168a81c09dfe5eb809757d076d1fd11b9d 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 07/22] 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(-)

diff --git a/configure b/configure
index c807c98e56..3a14b854c3 100755
--- a/configure	2022-03-17 23:06:54.685917004 +0300
+++ b/configure	2022-03-17 23:07:12.798702585 +0300
@@ -4251,9 +4251,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
@@ -6877,7 +6877,7 @@
                     OPT="-g -O0 -Wall"
                 fi
 	    else
-		OPT="-g $WRAP -O3 -Wall"
+		OPT="$WRAP -O3 -Wall"
 	    fi
 	    ;;
 	*)
diff --git a/configure.ac b/configure.ac
index 805c0bba08..2bdc0f35ad 100644
--- a/configure.ac	2022-03-17 23:06:54.685917004 +0300
+++ b/configure.ac	2022-03-17 23:07:12.802702756 +0300
@@ -1535,7 +1535,7 @@
                     OPT="-g -O0 -Wall"
                 fi
 	    else
-		OPT="-g $WRAP -O3 -Wall"
+		OPT="$WRAP -O3 -Wall"
 	    fi
 	    ;;
 	*)
