scons: Buid libGL.so (WIP).
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 17 Jun 2011 19:12:18 +0000 (20:12 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 30 Jun 2011 10:34:51 +0000 (11:34 +0100)
common.py
scons/gallium.py
src/SConscript
src/gallium/targets/libgl-xlib/SConscript

index 8f13186f52a9797fc579ec856a36c564b619074a..8657030ea3f6480109e9fb17c12f7f4dbd4f9a9f 100644 (file)
--- a/common.py
+++ b/common.py
@@ -90,6 +90,6 @@ def AddOptions(opts):
        opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
        opts.Add(BoolOption('debug', 'DEPRECATED: debug build', 'yes'))
        opts.Add(BoolOption('profile', 'DEPRECATED: profile build', 'no'))
        opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
        opts.Add(BoolOption('debug', 'DEPRECATED: debug build', 'yes'))
        opts.Add(BoolOption('profile', 'DEPRECATED: profile build', 'no'))
-       opts.Add(BoolOption('quiet', 'DEPRECATED: quiet command lines', 'yes'))
+       opts.Add(BoolOption('quiet', 'DEPRECATED: profile build', 'yes'))
        if host_platform == 'windows':
                opts.Add(EnumOption('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
        if host_platform == 'windows':
                opts.Add(EnumOption('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
index bde1a3c6df760ac598a1f7d7ad316b87cfc9968d..7b239635b9c0e98bed23d421cd76acad52ef17bd 100755 (executable)
@@ -289,8 +289,21 @@ def generate(env):
             'PTHREADS',
             'HAVE_POSIX_MEMALIGN',
         ]
             'PTHREADS',
             'HAVE_POSIX_MEMALIGN',
         ]
-    if env['platform'] == 'darwin':
-        cppdefines += ['_DARWIN_C_SOURCE']
+        if env['platform'] == 'darwin':
+            cppdefines += [
+                '_DARWIN_C_SOURCE',
+                'GLX_USE_APPLEGL',
+                'GLX_DIRECT_RENDERING',
+            ]
+        else:
+            cppdefines += [
+                'GLX_DIRECT_RENDERING',
+                'GLX_INDIRECT_RENDERING',
+            ]
+        if env['platform'] in ('linux', 'freebsd'):
+            cppdefines += ['HAVE_ALIAS']
+        else:
+            cppdefines += ['GLX_ALIAS_UNSUPPORTED']
     if platform == 'windows':
         cppdefines += [
             'WIN32',
     if platform == 'windows':
         cppdefines += [
             'WIN32',
@@ -381,6 +394,8 @@ def generate(env):
             ccflags += ['-O0']
         else:
             ccflags += ['-O3']
             ccflags += ['-O0']
         else:
             ccflags += ['-O3']
+        # Work around aliasing bugs - developers should comment this out
+        ccflags += ['-fno-strict-aliasing']
         ccflags += ['-g3']
         if env['build'] in ('checked', 'profile'):
             # See http://code.google.com/p/jrfonseca/wiki/Gprof2Dot#Which_options_should_I_pass_to_gcc_when_compiling_for_profiling?
         ccflags += ['-g3']
         if env['build'] in ('checked', 'profile'):
             # See http://code.google.com/p/jrfonseca/wiki/Gprof2Dot#Which_options_should_I_pass_to_gcc_when_compiling_for_profiling?
index 7b614daeea1cf18f0b28e43628d901fb8893108a..6d7bd6cd6ece9be89fc48983fc4a66223bb22f65 100644 (file)
@@ -22,6 +22,7 @@ SConscript('mesa/SConscript')
 SConscript('mapi/vgapi/SConscript')
 
 if env['platform'] != 'embedded':
 SConscript('mapi/vgapi/SConscript')
 
 if env['platform'] != 'embedded':
+    SConscript('glx/SConscript')
     SConscript('egl/main/SConscript')
     SConscript('glu/sgi/SConscript')
     SConscript('glut/glx/SConscript')
     SConscript('egl/main/SConscript')
     SConscript('glu/sgi/SConscript')
     SConscript('glut/glx/SConscript')
index ca15372f1d9dc14d00dbe482a53f20ba6acb2cf1..7d5d9bc47a9e45f44e455bfebd51a458449a25f9 100644 (file)
@@ -54,7 +54,7 @@ libgl = env.SharedLibrary(
     source = sources,
 )
 
     source = sources,
 )
 
-if True:
+if False:
     # XXX: Only install this libGL.so if DRI not enabled
     libgl = env.InstallSharedLibrary(libgl, version=(1, 5))
 
     # XXX: Only install this libGL.so if DRI not enabled
     libgl = env.InstallSharedLibrary(libgl, version=(1, 5))