summaryrefslogtreecommitdiff
path: root/scons
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2012-07-31 22:55:39 -0700
committerVinson Lee <vlee@freedesktop.org>2012-08-01 21:28:47 -0700
commit8734584952ea257d53ce421959bd9706345f221f (patch)
tree21579adb5f3027d62dc215e0b26a56a0aa52d05b /scons
parent204bfb904bd5d4dd9ce90fe4d3e8e48b0d01fdae (diff)
scons: Add support for Intel Compiler.
The patch makes the SCons build with Intel Compiler successful. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'scons')
-rwxr-xr-xscons/gallium.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index 458651b4513..f4776d83d7f 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -141,6 +141,7 @@ def generate(env):
env['msvc'] = env['CC'] == 'cl'
env['suncc'] = env['platform'] == 'sunos' and os.path.basename(env['CC']) == 'cc'
env['clang'] = env['CC'] == 'clang'
+ env['icc'] = 'icc' == os.path.basename(env['CC'])
if env['msvc'] and env['toolchain'] == 'default' and env['machine'] == 'x86_64':
# MSVC x64 support is broken in earlier versions of scons
@@ -154,6 +155,7 @@ def generate(env):
gcc = env['gcc']
msvc = env['msvc']
suncc = env['suncc']
+ icc = env['icc']
# Determine whether we are cross compiling; in particular, whether we need
# to compile code generators with a different compiler as the target code.
@@ -382,6 +384,10 @@ def generate(env):
cflags += [
'-Wdeclaration-after-statement',
]
+ if icc:
+ cflags += [
+ '-std=gnu99',
+ ]
if msvc:
# See also:
# - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx