From 976464c210816ff0c90e2e24e766dda81193fc79 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 21 Sep 2014 18:14:01 -0700 Subject: mesa: Replace a priori knowledge of gcc attributes with configure tests. Note that I had to add support for testing the packed attribute to m4/ax_gcc_func_attribute.m4. Reviewed-by: Jason Ekstrand [C bits] Reviewed-by: Ian Romanick --- scons/gallium.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scons/gallium.py') diff --git a/scons/gallium.py b/scons/gallium.py index ef6df1a..dd5ca56 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -589,7 +589,13 @@ def generate(env): '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', -- cgit v1.1