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.
This commit is contained in:
Vinson Lee
2010-01-26 22:56:58 -08:00
parent fc20efe8e5
commit 7d29afb3a2

View File

@@ -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',
]