]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Having CFLAGS come before OPT prevents silencing certain classes of warnings
authorBrett Cannon <bcannon@gmail.com>
Sat, 26 Jun 2010 22:29:06 +0000 (22:29 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sat, 26 Jun 2010 22:29:06 +0000 (22:29 +0000)
from the fact that OPT contains -Wall be default. This is annoying when
compilers like clang have thorough debugging information about things that
Python does extensively (e.g. -Wunused-value for unused return values caused by
a macro use).

Makefile.pre.in
Misc/NEWS

index 69a31991892d3e46917d5cd0d2953e7abbdc014e..2b36b87c377d20d08193708fcbb573660f23c3ea 100644 (file)
@@ -59,7 +59,7 @@ MAKESETUP=      $(srcdir)/Modules/makesetup
 # Compiler options
 OPT=           @OPT@
 BASECFLAGS=    @BASECFLAGS@
-CFLAGS=                $(BASECFLAGS) @CFLAGS@ $(OPT) $(EXTRA_CFLAGS)
+CFLAGS=                $(BASECFLAGS) $(OPT) @CFLAGS@ $(EXTRA_CFLAGS)
 # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
 # be able to build extension modules using the directories specified in the
 # environment variables
index 982ef7045bf4d1bd08a2b191057e2e30fc750e9f..a9b19dc20db938e04ca80ba151e4f38e19b23428 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1461,6 +1461,8 @@ Extension Modules
 Build
 -----
 
+- Have CFLAGS come after OPT to allow for overriding warnings flags.
+
 - Issue #8854: Fix finding Visual Studio 2008 on Windows x64.
 
 - Issue #1759169, #8864: Drop _XOPEN_SOURCE on Solaris, define it for