summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-12-13 20:50:10 (GMT)
committerGuido van Rossum <guido@python.org>2007-12-13 20:50:10 (GMT)
commit7c862f8077e75bc841cbf1628c70f465831f2377 (patch)
tree730841cb3eb955eba2475dae2978db0632ace58f
parent0a0e5832590f60371208f96d0e5d43876025960c (diff)
downloadcpython-7c862f8077e75bc841cbf1628c70f465831f2377.zip
cpython-7c862f8077e75bc841cbf1628c70f465831f2377.tar.gz
cpython-7c862f8077e75bc841cbf1628c70f465831f2377.tar.bz2
Patch #1608. Someone with access to autoconf 2.61 or higher needs to
run it and check in the resulting configure file.
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS4
-rw-r--r--configure.in6
3 files changed, 10 insertions, 1 deletions
diff --git a/Misc/ACKS b/Misc/ACKS
index 65ee9e7..3b968dd 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -167,6 +167,7 @@ Yves Dionne
Daniel Dittmar
Walter Dörwald
Jaromir Dolecek
+Ismail Donmez
Dima Dorfman
Cesar Douady
Dean Draayer
diff --git a/Misc/NEWS b/Misc/NEWS
index 7dae508..0d420d0 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1123,6 +1123,10 @@ Tools/Demos
Build
-----
+- Bug #1608: use -fwrapv when GCC supports it. This is important,
+ newer GCC versions may optimize away overflow buffer overflow checks
+ without this option!
+
- Patch #1418: Make the AC_REPLACE_FUNCS object files actually work.
- Add a FAST_LOOPS build option that speeds-up looping by trading away
diff --git a/configure.in b/configure.in
index b0313e2..4964954 100644
--- a/configure.in
+++ b/configure.in
@@ -757,6 +757,10 @@ then
if test "$CC" != 'g++' ; then
STRICT_PROTO="-Wstrict-prototypes"
fi
+ # For gcc 4.x we need to use -fwrapv so lets check if its supported
+ if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
+ WRAP="-fwrapv"
+ fi
case $ac_cv_prog_cc_g in
yes)
if test "$Py_DEBUG" = 'true' ; then
@@ -764,7 +768,7 @@ then
# debug builds.
OPT="-g -Wall $STRICT_PROTO"
else
- OPT="-g -O3 -Wall $STRICT_PROTO"
+ OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
fi
;;
*)