summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-03-25 00:21:53 +0000
committerVictor Stinner <victor.stinner@haypocalc.com>2010-03-25 00:21:53 +0000
commit6cbf90fc0fd552ec7689e5a885b278c05aa866ae (patch)
treec4574ec2c29ca4e0bb244f52e3207d03e601df89
parent2ec1f27716ce8452302665e9c140ac8ae6fb472b (diff)
downloadcpython-git-6cbf90fc0fd552ec7689e5a885b278c05aa866ae.tar.gz
Issue #8211: Save/restore CFLAGS around AC_PROG_CC in configure.in, compiler
optimizations are disabled when --with-pydebug is used.
-rw-r--r--Misc/NEWS3
-rwxr-xr-xconfigure2
-rw-r--r--configure.in2
3 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 7987d8c494..bebf2b7dfa 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 2.7 beta 1?
Core and Builtins
-----------------
+- Issue #8211: Save/restore CFLAGS around AC_PROG_CC in configure.in, compiler
+ optimizations are disabled when --with-pydebug is used.
+
- Issue #1583863: An unicode subclass can now override the __unicode__ method
- Issue #6474: Make error message from passing an inadequate number of keyword
diff --git a/configure b/configure
index e6fc4d684a..13e3d4883f 100755
--- a/configure
+++ b/configure
@@ -2367,6 +2367,7 @@ echo "$as_me: error: cached CC is different -- throw away $cache_file
{ (exit 1); exit 1; }; }
fi
+save_CFLAGS=$CFLAGS
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3286,6 +3287,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+CFLAGS=$save_CFLAGS
diff --git a/configure.in b/configure.in
index 9773e8c06f..e9bd94b5ad 100644
--- a/configure.in
+++ b/configure.in
@@ -493,7 +493,9 @@ then
(it is also a good idea to do 'make clean' before compiling)])
fi
+save_CFLAGS=$CFLAGS
AC_PROG_CC
+CFLAGS=$save_CFLAGS
AC_SUBST(CXX)
AC_SUBST(MAINCC)