1. mirror
  2. cpython

Commits

Stefan Krah  committed 9638fc9 Merge

Merge 3.3.

  • Participants
  • Parent commits f3e348a, d536f34
  • Branches default

Comments (0)

Files changed (1)

File setup.py

View file
 
         # 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))