Commit 1133a2e0 authored by Brett Cannon's avatar Brett Cannon

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.
parent 7edd1145
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment