Module: Mesa Branch: master Commit: 8734584952ea257d53ce421959bd9706345f221f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8734584952ea257d53ce421959bd9706345f221f
Author: Vinson Lee <v...@freedesktop.org> Date: Tue Jul 31 22:55:39 2012 -0700 scons: Add support for Intel Compiler. The patch makes the SCons build with Intel Compiler successful. Signed-off-by: Vinson Lee <v...@freedesktop.org> Reviewed-by: Brian Paul <bri...@vmware.com> --- scons/gallium.py | 6 ++++++ src/gallium/winsys/svga/drm/SConscript | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/scons/gallium.py b/scons/gallium.py index 458651b..f4776d8 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 diff --git a/src/gallium/winsys/svga/drm/SConscript b/src/gallium/winsys/svga/drm/SConscript index 2d511d2..fea9df3 100644 --- a/src/gallium/winsys/svga/drm/SConscript +++ b/src/gallium/winsys/svga/drm/SConscript @@ -4,7 +4,7 @@ env = env.Clone() env.PkgUseModules('DRM') -if env['gcc'] or env['clang']: +if env['gcc'] or env['clang'] or env['icc']: env.Append(CCFLAGS = ['-fvisibility=hidden']) env.Append(CPPDEFINES = [ 'HAVE_STDINT_H', _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit