diff options
author | marha <marha@users.sourceforge.net> | 2011-07-04 14:26:33 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-04 14:26:33 +0200 |
commit | 7cc339a490eac34596e97788c3b0092d58459cf6 (patch) | |
tree | bc9a29aff5729a5b7314022bc3fea8fdff721dc0 /mesalib/scons/gallium.py | |
parent | 3bbcbc59b6d98f09b26f39d6208faec76cc6aa3e (diff) | |
parent | 5c671fd7f8198bed2fc32b33b81d1081f1486ed9 (diff) | |
download | vcxsrv-7cc339a490eac34596e97788c3b0092d58459cf6.tar.gz vcxsrv-7cc339a490eac34596e97788c3b0092d58459cf6.tar.bz2 vcxsrv-7cc339a490eac34596e97788c3b0092d58459cf6.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/common.py
mesalib/docs/GL3.txt
mesalib/scons/custom.py
mesalib/scons/gallium.py
mesalib/src/SConscript
xorg-server/Xext/xtest.c
xorg-server/dix/getevents.c
xorg-server/dix/window.c
xorg-server/exa/exa_accel.c
xorg-server/exa/exa_migration_classic.c
xorg-server/exa/exa_unaccel.c
xorg-server/hw/kdrive/ephyr/ephyr.c
xorg-server/hw/kdrive/ephyr/ephyr.h
xorg-server/hw/kdrive/ephyr/ephyrinit.c
xorg-server/hw/kdrive/ephyr/hostx.c
xorg-server/hw/kdrive/src/kdrive.h
xorg-server/hw/kdrive/src/kinput.c
xorg-server/hw/xfree86/common/xf86Init.c
xorg-server/hw/xfree86/dri2/dri2.c
xorg-server/hw/xnest/Init.c
xorg-server/hw/xquartz/darwin.c
xorg-server/hw/xquartz/darwinEvents.c
xorg-server/hw/xquartz/darwinEvents.h
xorg-server/hw/xquartz/darwinXinput.c
xorg-server/hw/xwin/InitInput.c
xorg-server/include/input.h
xorg-server/include/window.h
xorg-server/mi/mipointer.c
xorg-server/test/Makefile.am
xorg-server/test/xi2/protocol-eventconvert.c
Diffstat (limited to 'mesalib/scons/gallium.py')
-rw-r--r-- | mesalib/scons/gallium.py | 78 |
1 files changed, 30 insertions, 48 deletions
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py index 97868b930..1cdc11cb5 100644 --- a/mesalib/scons/gallium.py +++ b/mesalib/scons/gallium.py @@ -104,41 +104,6 @@ def num_jobs(): return 1
-def pkg_config_modules(env, name, modules):
- '''Simple wrapper for pkg-config.'''
-
- env[name] = False
-
- if env['platform'] == 'windows':
- return
-
- if not env.Detect('pkg-config'):
- return
-
- if subprocess.call(["pkg-config", "--exists", ' '.join(modules)]) != 0:
- return
-
- # Put -I and -L flags directly into the environment, as these don't affect
- # the compilation of targets that do not use them
- try:
- env.ParseConfig('pkg-config --cflags-only-I --libs-only-L ' + ' '.join(modules))
- except OSError:
- return
-
- # Other flags may affect the compilation of unrelated targets, so store
- # them with a prefix, (e.g., XXX_CFLAGS, XXX_LIBS, etc)
- try:
- flags = env.ParseFlags('!pkg-config --cflags-only-other --libs-only-l --libs-only-other ' + ' '.join(modules))
- except OSError:
- return
- prefix = name.upper() + '_'
- for flag_name, flag_value in flags.iteritems():
- env[prefix + flag_name] = flag_value
-
- env[name] = True
-
-
-
def generate(env):
"""Common environment generation code"""
@@ -289,8 +254,21 @@ def generate(env): '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',
@@ -381,6 +359,8 @@ def generate(env): 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?
@@ -437,10 +417,10 @@ def generate(env): ]
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
ccflags += [
- '-Werror=pointer-arith',
+ '-Wpointer-arith',
]
cflags += [
- '-Werror=declaration-after-statement',
+ '-Wdeclaration-after-statement',
]
if msvc:
# See also:
@@ -622,19 +602,21 @@ def generate(env): if env['llvm']:
env.Tool('llvm')
- pkg_config_modules(env, 'x11', ['x11', 'xext'])
- pkg_config_modules(env, 'drm', ['libdrm'])
- pkg_config_modules(env, 'drm_intel', ['libdrm_intel'])
- pkg_config_modules(env, 'drm_radeon', ['libdrm_radeon'])
- pkg_config_modules(env, 'xorg', ['xorg-server'])
- pkg_config_modules(env, 'kms', ['libkms'])
-
- env['dri'] = env['x11'] and env['drm']
-
# Custom builders and methods
env.Tool('custom')
createInstallMethods(env)
+ env.PkgCheckModules('X11', ['x11', 'xext', 'xdamage', 'xfixes'])
+ env.PkgCheckModules('XF86VIDMODE', ['xxf86vm'])
+ env.PkgCheckModules('DRM', ['libdrm'])
+ env.PkgCheckModules('DRM_INTEL', ['libdrm_intel'])
+ env.PkgCheckModules('DRM_RADEON', ['libdrm_radeon'])
+ env.PkgCheckModules('XORG', ['xorg-server'])
+ env.PkgCheckModules('KMS', ['libkms'])
+ env.PkgCheckModules('UDEV', ['libudev'])
+
+ env['dri'] = env['x11'] and env['drm']
+
# for debugging
#print env.Dump()
|