Mesa (master): scons: Use '-Werror=' option on GCC 4.2.x and greater.

Vinson Lee vlee at kemper.freedesktop.org
Wed Jan 27 07:00:48 UTC 2010


Module: Mesa
Branch: master
Commit: 7d29afb3a29642e6e13fb30948f7c87434057102
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d29afb3a29642e6e13fb30948f7c87434057102

Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Jan 26 22:56:58 2010 -0800

scons: Use '-Werror=' option on GCC 4.2.x and greater.

The existing code only checked for GCC 4.2.x and 4.3.x.

---

 scons/gallium.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index 5aa0b7b..c88af96 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -30,6 +30,7 @@ Frontend-tool for Gallium3D architecture.
 #
 
 
+import distutils.version
 import os
 import os.path
 import re
@@ -276,7 +277,7 @@ def generate(env):
             '-Wmissing-prototypes',
             '-std=gnu99',
         ]
-        if env['CCVERSION'].startswith('4.2.') or env['CCVERSION'].startswith('4.3.'):
+        if distutils.version.LooseVersion(env['CCVERSION']) >= distutils.version.LooseVersion('4.2'):
 	    ccflags += [
             	'-Werror=pointer-arith',
 	    ]




More information about the mesa-commit mailing list