Mesa (master): only use -Werror flags with gcc 4.2.x and 4.3.x.
Alan Hourihane
alanh at kemper.freedesktop.org
Tue Jan 26 19:14:53 UTC 2010
Module: Mesa
Branch: master
Commit: 1019f0de1170f627e8e9ce7b449f7a76d89c6742
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1019f0de1170f627e8e9ce7b449f7a76d89c6742
Author: Alan Hourihane <alanh at vmware.com>
Date: Tue Jan 26 19:13:27 2010 +0000
only use -Werror flags with gcc 4.2.x and 4.3.x.
could use a better test here though.
---
scons/gallium.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/scons/gallium.py b/scons/gallium.py
index 24f88e1..1a095d8 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -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
More information about the mesa-commit
mailing list