scons: Do not build svga if using Solaris Studio C compiler.
authorVinson Lee <vlee@freedesktop.org>
Sat, 16 Jun 2012 17:55:20 +0000 (10:55 -0700)
committerVinson Lee <vlee@freedesktop.org>
Mon, 18 Jun 2012 23:37:46 +0000 (16:37 -0700)
Solaris Studio C compiler does not support anonymous structs and
anonymous unions.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
scons/gallium.py
src/gallium/drivers/svga/SConscript
src/gallium/targets/dri-vmwgfx/SConscript

index ee91ca444171391e903203e4b58523fc32a9aa4a..75c713d1ce3bac8bcecf2e1056b59cd6913933fb 100755 (executable)
@@ -139,6 +139,7 @@ def generate(env):
 
     env['gcc'] = 'gcc' in os.path.basename(env['CC']).split('-')
     env['msvc'] = env['CC'] == 'cl'
+    env['suncc'] = env['platform'] == 'sunos' and os.path.basename(env['CC']) == 'cc'
 
     if env['msvc'] and env['toolchain'] == 'default' and env['machine'] == 'x86_64':
         # MSVC x64 support is broken in earlier versions of scons
@@ -151,6 +152,7 @@ def generate(env):
     ppc = env['machine'] == 'ppc'
     gcc = env['gcc']
     msvc = env['msvc']
+    suncc = env['suncc']
 
     # Determine whether we are cross compiling; in particular, whether we need
     # to compile code generators with a different compiler as the target code.
index 87903d89010733fceba9da07b22ca691d8002a0c..8ffeed563815e1c8eabb254740d32e2507500b45 100644 (file)
@@ -2,6 +2,10 @@ Import('*')
 
 env = env.Clone()
 
+if env['suncc']:
+       print 'warning: not building svga'
+       Return()
+
 if env['platform'] in ['linux']:
        env.Append(CCFLAGS = ['-fvisibility=hidden'])
 
index e758b493f892dceb58347f8b4ea7d930a4b6c472..0d19944f5c0b72071bb63c7d89f73e9eefdf8011 100644 (file)
@@ -2,6 +2,10 @@ Import('*')
 
 env = drienv.Clone()
 
+if env['suncc']:
+    print 'warning: not building dri-vmwgfx'
+    Return()
+
 if env['build'] == 'release':
     env.Append(CPPDEFINES = ['GALLIUM_RBUG'])
     env.Prepend(LIBS = [rbug])