summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2005-04-24 22:26:38 (GMT)
committerBrett Cannon <bcannon@gmail.com>2005-04-24 22:26:38 (GMT)
commit08cd598c2145d00f1517c93cabf80a5d7d2a4bc0 (patch)
treeff364e13d14455f5850f7af139bd721a1c371ddd /Lib
parent43148c84136697b56cdd9327a64ac3225fe48651 (diff)
downloadcpython-08cd598c2145d00f1517c93cabf80a5d7d2a4bc0.zip
cpython-08cd598c2145d00f1517c93cabf80a5d7d2a4bc0.tar.gz
cpython-08cd598c2145d00f1517c93cabf80a5d7d2a4bc0.tar.bz2
Introduced EXTRA_CFLAGS as an environment variable used by the Makefile. Meant
to be used for flags that change binary compatibility. Distutils was tweaked to also use the variable if used during compilation of the interpreter.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/sysconfig.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index aae0f27..1bd6209 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -146,8 +146,9 @@ def customize_compiler(compiler):
varies across Unices and is stored in Python's Makefile.
"""
if compiler.compiler_type == "unix":
- (cc, cxx, opt, basecflags, ccshared, ldshared, so_ext) = \
- get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO')
+ (cc, cxx, opt, extra_cflags, basecflags, ccshared, ldshared, so_ext) = \
+ get_config_vars('CC', 'CXX', 'OPT', 'EXTRA_CFLAGS', 'BASECFLAGS',
+ 'CCSHARED', 'LDSHARED', 'SO')
if os.environ.has_key('CC'):
cc = os.environ['CC']
@@ -171,7 +172,7 @@ def customize_compiler(compiler):
opt = opt + ' ' + os.environ['CPPFLAGS']
ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
- cc_cmd = cc + ' ' + opt
+ cc_cmd = ' '.join(str(x) for x in (cc, opt, extra_cflags) if x)
compiler.set_executables(
preprocessor=cpp,
compiler=cc_cmd,