diff options
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r-- | meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch new file mode 100644 index 0000000000..0750676bb7 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 6b6acee8841d092e5066b1bec2ba1c49cce4f91f Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org> | ||
3 | Date: Thu, 4 May 2017 00:57:39 -0500 | ||
4 | Subject: [PATCH 1/4] CMake: define GBM_BO_MAP only when symbol is found | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | gbm_bo_map() and _unmap() have been added recently to Mesa, | ||
10 | and this update may not have reached all implementations of | ||
11 | GBM, such as the one provided by Mali r6, where said | ||
12 | definitions can be found in the header file but not in the | ||
13 | library itself. This leads to errors like the following when | ||
14 | linking: | ||
15 | ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap' | ||
16 | ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map' | ||
17 | collect2: error: ld returned 1 exit status | ||
18 | make[2]: *** [bin/point-sprite] Error 1 | ||
19 | |||
20 | Instead of relying on the header file, actually try to link | ||
21 | using that symbol to determine if PIGLIT_HAS_GBM_BO_MAP | ||
22 | should be defined. | ||
23 | |||
24 | Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> | ||
25 | Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> | ||
26 | --- | ||
27 | CMakeLists.txt | 5 +++-- | ||
28 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
29 | |||
30 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
31 | index a4ff99e..cc26fa8 100644 | ||
32 | --- a/CMakeLists.txt | ||
33 | +++ b/CMakeLists.txt | ||
34 | @@ -141,8 +141,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") | ||
35 | if(GBM_FOUND) | ||
36 | set(PIGLIT_HAS_GBM True) | ||
37 | add_definitions(-DPIGLIT_HAS_GBM) | ||
38 | - if (GBM_VERSION VERSION_EQUAL "12.1" OR GBM_VERSION VERSION_GREATER "12.1") | ||
39 | - set(PIGLIT_HAS_GBM_BO_MAP True) | ||
40 | + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GBM_LIBRARIES}) | ||
41 | + CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP) | ||
42 | + if (PIGLIT_HAS_GBM_BO_MAP) | ||
43 | add_definitions(-DPIGLIT_HAS_GBM_BO_MAP) | ||
44 | endif() | ||
45 | endif(GBM_FOUND) | ||
46 | -- | ||
47 | 1.9.1 | ||
48 | |||