Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster.
diff --git a/configure b/configure
index 274af7e..29cbd36 100755
--- a/configure
+++ b/configure
@@ -6283,7 +6283,11 @@
 	    if test "$Py_DEBUG" = 'true' ; then
 		# Optimization messes up debuggers, so turn it off for
 		# debug builds.
-		OPT="-g -O0 -Wall $STRICT_PROTO"
+                if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
+                    OPT="-g -Og -Wall $STRICT_PROTO"
+                else
+                    OPT="-g -O0 -Wall $STRICT_PROTO"
+                fi
 	    else
 		OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
 	    fi