summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2015-02-11 18:41:01 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2015-02-11 18:41:01 (GMT)
commit8b62bbf2e5bbaa392a79eb69c558b41dfe68e745 (patch)
treec3a8cfeea05cea6ed2c50de7d86c3bdd233281e0
parentce2c584ea55e001a9ea2228d62fb525c24aadf04 (diff)
parent3d6c784371bccc2407048652bce50c5bccf9b1af (diff)
downloadcpython-8b62bbf2e5bbaa392a79eb69c558b41dfe68e745.zip
cpython-8b62bbf2e5bbaa392a79eb69c558b41dfe68e745.tar.gz
cpython-8b62bbf2e5bbaa392a79eb69c558b41dfe68e745.tar.bz2
Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster.
-rw-r--r--Misc/NEWS6
-rwxr-xr-xconfigure6
-rw-r--r--configure.ac6
3 files changed, 16 insertions, 2 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index db0d158..b497bd5 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -26,6 +26,12 @@ Library
argument which, if set to True, will pass messages to handlers taking handler
levels into account.
+Build
+-----
+
+- Issue #23445: pydebug builds now use "gcc -Og" where possible, to make
+ the resulting executable faster.
+
What's New in Python 3.5 alpha 1?
=================================
diff --git a/configure b/configure
index ecefde4..35a31bb 100755
--- a/configure
+++ b/configure
@@ -6338,7 +6338,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 c751622..a2c5eb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1128,7 +1128,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