From: Antoine Pitrou Date: Wed, 11 Feb 2015 18:39:16 +0000 (+0100) Subject: Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting... X-Git-Tag: v3.5.0a2~165^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d6c784371bccc2407048652bce50c5bccf9b1af;p=thirdparty%2FPython%2Fcpython.git Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster. --- diff --git a/Misc/NEWS b/Misc/NEWS index b411abf2828c..47e325da4be3 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -17,6 +17,12 @@ Library - Issue #23361: Fix possible overflow in Windows subprocess creation code. +Build +----- + +- Issue #23445: pydebug builds now use "gcc -Og" where possible, to make + the resulting executable faster. + What's New in Python 3.4.3rc1? ============================== diff --git a/configure b/configure index 274af7e04431..29cbd3614e26 100755 --- a/configure +++ b/configure @@ -6283,7 +6283,11 @@ then 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 diff --git a/configure.ac b/configure.ac index a0d0afa7b1a6..89692798273d 100644 --- a/configure.ac +++ b/configure.ac @@ -1119,7 +1119,11 @@ then 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