[Python-checkins] cpython (3.3): Fix build with 3.x gcc versions.

stefan.krah python-checkins at python.org
Thu Jan 17 12:54:11 CET 2013


http://hg.python.org/cpython/rev/d536f34759f5
changeset: 81554:d536f34759f5
branch: 3.3
parent: 81552:190a115b7748
user: Stefan Krah <skrah at bytereef.org>
date: Thu Jan 17 12:49:34 2013 +0100
summary:
 Fix build with 3.x gcc versions.
files:
 setup.py | 8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1997,8 +1997,12 @@
 
 # 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))
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /