aboutsummaryrefslogtreecommitdiff
path: root/mesalib/scons
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-03-05 22:17:40 +0100
committermarha <marha@users.sourceforge.net>2015-03-05 22:17:40 +0100
commit8574eba804031f6b19713f0b02952280730bf62e (patch)
tree9afa4d6fe299d43ab7e580dc08a5547120274561 /mesalib/scons
parenteef70231353a6103f47fcae88a6e89e765e5cd47 (diff)
downloadvcxsrv-8574eba804031f6b19713f0b02952280730bf62e.tar.gz
vcxsrv-8574eba804031f6b19713f0b02952280730bf62e.tar.bz2
vcxsrv-8574eba804031f6b19713f0b02952280730bf62e.zip
fontconfig mesa git update 5 Mar 2015
Diffstat (limited to 'mesalib/scons')
-rw-r--r--mesalib/scons/gallium.py74
1 files changed, 41 insertions, 33 deletions
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py
index 519550871..7533f0651 100644
--- a/mesalib/scons/gallium.py
+++ b/mesalib/scons/gallium.py
@@ -87,6 +87,25 @@ def createInstallMethods(env):
env.AddMethod(install_shared_library, 'InstallSharedLibrary')
+def msvc2013_compat(env):
+ if env['gcc']:
+ env.Append(CCFLAGS = [
+ '-Werror=vla',
+ '-Werror=pointer-arith',
+ ])
+
+def msvc2008_compat(env):
+ msvc2013_compat(env)
+ if env['gcc']:
+ env.Append(CFLAGS = [
+ '-Werror=declaration-after-statement',
+ ])
+
+def createMSVCCompatMethods(env):
+ env.AddMethod(msvc2013_compat, 'MSVC2013Compat')
+ env.AddMethod(msvc2008_compat, 'MSVC2008Compat')
+
+
def num_jobs():
try:
return int(os.environ['NUMBER_OF_PROCESSORS'])
@@ -283,6 +302,7 @@ def generate(env):
'_SVID_SOURCE',
'_BSD_SOURCE',
'_GNU_SOURCE',
+ '_DEFAULT_SOURCE',
'HAVE_PTHREAD',
'HAVE_POSIX_MEMALIGN',
]
@@ -342,6 +362,25 @@ def generate(env):
print 'warning: Floating-point textures enabled.'
print 'warning: Please consult docs/patents.txt with your lawyer before building Mesa.'
cppdefines += ['TEXTURE_FLOAT_ENABLED']
+ if gcc_compat:
+ ccversion = env['CCVERSION']
+ cppdefines += [
+ 'HAVE___BUILTIN_EXPECT',
+ 'HAVE___BUILTIN_FFS',
+ 'HAVE___BUILTIN_FFSLL',
+ 'HAVE_FUNC_ATTRIBUTE_FLATTEN',
+ # GCC 3.0
+ 'HAVE_FUNC_ATTRIBUTE_FORMAT',
+ 'HAVE_FUNC_ATTRIBUTE_PACKED',
+ # GCC 3.4
+ 'HAVE___BUILTIN_CTZ',
+ 'HAVE___BUILTIN_POPCOUNT',
+ 'HAVE___BUILTIN_POPCOUNTLL',
+ 'HAVE___BUILTIN_CLZ',
+ 'HAVE___BUILTIN_CLZLL',
+ ]
+ if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.5'):
+ cppdefines += ['HAVE___BUILTIN_UNREACHABLE']
env.Append(CPPDEFINES = cppdefines)
# C compiler options
@@ -377,8 +416,7 @@ def generate(env):
'-m32',
#'-march=pentium4',
]
- if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2') \
- and platform != 'haiku':
+ if platform != 'haiku':
# NOTE: We need to ensure stack is realigned given that we
# produce shared objects, and have no control over the stack
# alignment policy of the application. Therefore we need
@@ -419,13 +457,6 @@ def generate(env):
'-Wmissing-prototypes',
'-std=gnu99',
]
- if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
- ccflags += [
- '-Wpointer-arith',
- ]
- cflags += [
- '-Wdeclaration-after-statement',
- ]
if icc:
cflags += [
'-std=gnu99',
@@ -584,30 +615,6 @@ def generate(env):
env.Append(CCFLAGS = ['-fopenmp'])
env.Append(LIBS = ['gomp'])
- if gcc_compat:
- ccversion = env['CCVERSION']
- cppdefines += [
- 'HAVE___BUILTIN_EXPECT',
- 'HAVE___BUILTIN_FFS',
- 'HAVE___BUILTIN_FFSLL',
- 'HAVE_FUNC_ATTRIBUTE_FLATTEN',
- ]
- if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('3'):
- cppdefines += [
- 'HAVE_FUNC_ATTRIBUTE_FORMAT',
- 'HAVE_FUNC_ATTRIBUTE_PACKED',
- ]
- if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('3.4'):
- cppdefines += [
- 'HAVE___BUILTIN_CTZ',
- 'HAVE___BUILTIN_POPCOUNT',
- 'HAVE___BUILTIN_POPCOUNTLL',
- 'HAVE___BUILTIN_CLZ',
- 'HAVE___BUILTIN_CLZLL',
- ]
- if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.5'):
- cppdefines += ['HAVE___BUILTIN_UNREACHABLE']
-
# Load tools
env.Tool('lex')
env.Tool('yacc')
@@ -617,6 +624,7 @@ def generate(env):
# Custom builders and methods
env.Tool('custom')
createInstallMethods(env)
+ createMSVCCompatMethods(env)
env.PkgCheckModules('X11', ['x11', 'xext', 'xdamage', 'xfixes', 'glproto >= 1.4.13'])
env.PkgCheckModules('XCB', ['x11-xcb', 'xcb-glx >= 1.8.1', 'xcb-dri2 >= 1.8'])