Issue #17361: Use cc from sysconfig for testing flags.

This commit is contained in:
Stefan Krah 2013-03-07 01:12:03 +01:00
parent 2cb16aa3cb
commit 4f1974496a

View File

@ -2013,8 +2013,8 @@ class PyBuildExt(build_ext):
# Increase warning level for gcc:
if 'gcc' in cc:
cmd = ("echo '' | gcc -Wextra -Wno-missing-field-initializers -E - "
"> /dev/null 2>&1")
cmd = ("echo '' | %s -Wextra -Wno-missing-field-initializers -E - "
"> /dev/null 2>&1" % cc)
ret = os.system(cmd)
if ret >> 8 == 0:
extra_compile_args.extend(['-Wextra',