]> granicus.if.org Git - python/commitdiff
Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting...
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 11 Feb 2015 18:39:16 +0000 (19:39 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 11 Feb 2015 18:39:16 +0000 (19:39 +0100)
Misc/NEWS
configure
configure.ac

index b411abf2828c27dbff4019e58689322ace55c837..47e325da4be3a60bc22abafa78acaf6d9a8dc380 100644 (file)
--- 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?
 ==============================
index 274af7e0443123a956e5ad1361e1e5a0bd46922f..29cbd3614e26d011628016b4ef60ad48b8836cd6 100755 (executable)
--- 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
index a0d0afa7b1a62d5b51bf702072dbddbf58ef1723..89692798273da6826d9f57b8071aa570464c8ec1 100644 (file)
@@ -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