]> granicus.if.org Git - python/commitdiff
Issue #8211: Save/restore CFLAGS around AC_PROG_CC in configure.in, compiler
authorVictor Stinner <victor.stinner@haypocalc.com>
Thu, 25 Mar 2010 00:21:53 +0000 (00:21 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Thu, 25 Mar 2010 00:21:53 +0000 (00:21 +0000)
optimizations are disabled when --with-pydebug is used.

Misc/NEWS
configure
configure.in

index 7987d8c494ac00424242a8ffd37f3e91a65ad11b..bebf2b7dfabd6bb46da75dcc67ccc5cd4968a62a 100644 (file)
--- 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
index e6fc4d684a645222bbac701a7a44b922b9281c06..13e3d4883f5160efe05d63f2a84d69a447eaeacf 100755 (executable)
--- 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
 
 
 
index 9773e8c06f8176b58286325e997d1e76b2ee6f12..e9bd94b5adb557987efe4d52203783634f768f95 100644 (file)
@@ -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)