summaryrefslogtreecommitdiffstats
path: root/meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch')
-rw-r--r--meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch
new file mode 100644
index 00000000..2885ab7b
--- /dev/null
+++ b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch
@@ -0,0 +1,47 @@
1commit 8d0004cbd40305114bbe8019122319b43d25a772
2Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
3Date: Tue Sep 8 12:34:39 2009 +0000
4
5 Fix ATTRIBUTE_HIDDEN definition if __attribute__((visibility("hidden"))) is not supported.
6
7commit 7a8bf489ffd436d853364dd0d3c9a6734b8cc7eb
8Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
9Date: Thu Sep 3 15:46:37 2009 +0000
10
11 Check for __attribute__((visibility("hidden"))).
12
13diff --git a/configure.ac b/configure.ac
14index da96872..abef435 100644
15--- a/configure.ac
16+++ b/configure.ac
17@@ -132,6 +132,30 @@ if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdr
18 fi
19 AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes)
20
21+dnl Check for __attribute__((visibility()))
22+AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
23+ libva_cv_visibility_attribute,
24+ [cat > conftest.c <<EOF
25+int foo __attribute__ ((visibility ("hidden"))) = 1;
26+int bar __attribute__ ((visibility ("protected"))) = 1;
27+EOF
28+ libva_cv_visibility_attribute=no
29+ if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
30+ if grep '\.hidden.*foo' conftest.s >/dev/null; then
31+ if grep '\.protected.*bar' conftest.s >/dev/null; then
32+ libva_cv_visibility_attribute=yes
33+ fi
34+ fi
35+ fi
36+ rm -f conftest.[cs]
37+])
38+ATTRIBUTE_HIDDEN=""
39+if test $libva_cv_visibility_attribute = yes; then
40+ ATTRIBUTE_HIDDEN="__attribute__((visibility(\"hidden\")))"
41+fi
42+AC_DEFINE_UNQUOTED([ATTRIBUTE_HIDDEN], [$ATTRIBUTE_HIDDEN],
43+ [Defined to __attribute__((visibility("hidden"))) when available])
44+
45 # We only need the headers, we don't link against the DRM libraries
46 LIBVA_CFLAGS="$DRM_CFLAGS"
47 AC_SUBST(LIBVA_CFLAGS)