diff options
author | Stefan Krah <skrah@bytereef.org> | 2013-01-17 11:49:34 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2013-01-17 11:49:34 (GMT) |
commit | 13fe6d1c466a7c73dea0c8019164d713c5d5d565 (patch) | |
tree | c17f498204f8b825bacd8f7f67e6d75449c10db5 /setup.py | |
parent | 897c3e994f7ae7a219c5956d304f75ba8dec1583 (diff) | |
download | cpython-13fe6d1c466a7c73dea0c8019164d713c5d5d565.zip cpython-13fe6d1c466a7c73dea0c8019164d713c5d5d565.tar.gz cpython-13fe6d1c466a7c73dea0c8019164d713c5d5d565.tar.bz2 |
Fix build with 3.x gcc versions.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1997,8 +1997,12 @@ class PyBuildExt(build_ext): # Increase warning level for gcc: if 'gcc' in cc: - extra_compile_args.extend(['-Wextra', - '-Wno-missing-field-initializers']) + cmd = ("echo '' | gcc -Wextra -Wno-missing-field-initializers -E - " + "> /dev/null 2>&1") + ret = os.system(cmd) + if ret >> 8 == 0: + extra_compile_args.extend(['-Wextra', + '-Wno-missing-field-initializers']) # Uncomment for extra functionality: #define_macros.append(('EXTRA_FUNCTIONALITY', 1)) |