diff options
author | Vinson Lee <vlee@vmware.com> | 2010-07-23 17:24:21 -0700 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2010-07-23 17:24:21 -0700 |
commit | 32502b0eeb38f47f42528ee592fe93673034d15e (patch) | |
tree | a63831b47c0a90dbb7d96e8730fcf0e7134b40f6 /scons | |
parent | 658fc7539d6befaa48e69496097d383048af9173 (diff) |
scons: Use '-Wmissing-field-initializers' on GCC 4.0 and greater only.
Diffstat (limited to 'scons')
-rw-r--r-- | scons/gallium.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scons/gallium.py b/scons/gallium.py index f03716bad8..03a4ef5881 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -295,7 +295,6 @@ def generate(env): # - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html ccflags += [ '-Wall', - '-Wmissing-field-initializers', '-Wno-long-long', '-ffast-math', '-fmessage-length=0', # be nice to Eclipse @@ -304,6 +303,10 @@ def generate(env): '-Wmissing-prototypes', '-std=gnu99', ] + if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.0'): + ccflags += [ + '-Wmissing-field-initializers', + ] if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'): ccflags += [ '-Werror=pointer-arith', |