only use -Werror flags with gcc 4.2.x and 4.3.x.
authorAlan Hourihane <alanh@vmware.com>
Tue, 26 Jan 2010 19:13:27 +0000 (19:13 +0000)
committerAlan Hourihane <alanh@vmware.com>
Tue, 26 Jan 2010 19:14:49 +0000 (19:14 +0000)
could use a better test here though.

scons/gallium.py

index 24f88e104bda24677b5c20e09fa655d2ab708c11..1a095d89933402347d68fcc1107a0c7612451c49 100644 (file)
@@ -268,16 +268,22 @@ def generate(env):
         ccflags += [
             '-Wall',
             '-Wmissing-field-initializers',
-            '-Werror=pointer-arith',
             '-Wno-long-long',
             '-ffast-math',
             '-fmessage-length=0', # be nice to Eclipse
         ]
         cflags += [
-            '-Werror=declaration-after-statement',
             '-Wmissing-prototypes',
             '-std=gnu99',
         ]
+        if env['CCVERSION'].startswith('4.2.') or
+           env['CCVERSION'].startswith('4.3.'):
+           ccflags += [
+               '-Werror=pointer-arith',
+           ]
+           cflags += [
+               '-Werror=declaration-after-statement',
+           ]
     if msvc:
         # See also:
         # - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx