summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Díaz <daniel.diaz@linaro.org>2017-06-07 09:51:20 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 17:03:17 +0100
commit262af7bf2d22d3a41865965b21aec06d9b9976cc (patch)
tree8c5c34909121f3c4594cf421df957ac3fefdad6e
parenta99c56fb6d5e79de81b1b37aa67136d1b032fbcc (diff)
downloadpoky-262af7bf2d22d3a41865965b21aec06d9b9976cc.tar.gz
piglit: add patch for lack of gbm_bo_map
[Backported from master.] [Piglit Bug #100978] -- https://bugs.freedesktop.org/show_bug.cgi?id=100978 When linking against Mali 450 r6, errors like the following can be seen: ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap' ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map' collect2: error: ld returned 1 exit status make[2]: *** [bin/point-sprite] Error 1 This is due to gbm_bo_map() and gbm_bo_unmap() being recently added but not yet implemented by all graphics drivers. Instead of relying on GBM's version, actually try to link against those symbols. (From OE-Core rev: 484db109df742aafa8efc41dc3a8d31386d9b2a3) Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch51
-rw-r--r--meta/recipes-graphics/piglit/piglit_git.bb1
2 files changed, 52 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..8b634243a3
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
@@ -0,0 +1,51 @@
1From 47697aee05a112422acf203982085e7b3e6c05b2 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
3Date: Thu, 4 May 2017 00:57:39 -0500
4Subject: [PATCH 1/4] CMake: define GBM_BO_MAP only when symbol is found
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9gbm_bo_map() and _unmap() have been added recently to Mesa,
10and this update may not have reached all implementations of
11GBM, such as the one provided by Mali r6, where said
12definitions can be found in the header file but not in the
13library itself. This leads to errors like the following when
14linking:
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
20Instead of relying on the header file, actually try to link
21using that symbol to determine if PIGLIT_HAS_GBM_BO_MAP
22should be defined.
23
24Upstream-Status: Submitted [piglit@lists.freedesktop.org]
25
26Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
27Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
28Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
29---
30 CMakeLists.txt | 5 +++--
31 1 file changed, 3 insertions(+), 2 deletions(-)
32
33diff --git a/CMakeLists.txt b/CMakeLists.txt
34index a4ff99e..cc26fa8 100644
35--- a/CMakeLists.txt
36+++ b/CMakeLists.txt
37@@ -141,8 +141,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
38 if(GBM_FOUND)
39 set(PIGLIT_HAS_GBM True)
40 add_definitions(-DPIGLIT_HAS_GBM)
41- if (GBM_VERSION VERSION_EQUAL "12.1" OR GBM_VERSION VERSION_GREATER "12.1")
42- set(PIGLIT_HAS_GBM_BO_MAP True)
43+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GBM_LIBRARIES})
44+ CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP)
45+ if (PIGLIT_HAS_GBM_BO_MAP)
46 add_definitions(-DPIGLIT_HAS_GBM_BO_MAP)
47 endif()
48 endif(GBM_FOUND)
49--
501.9.1
51
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index eae3eed342..19db86c70b 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
5SRC_URI = "git://anongit.freedesktop.org/piglit \ 5SRC_URI = "git://anongit.freedesktop.org/piglit \
6 file://0001-cmake-install-bash-completions-in-the-right-place.patch \ 6 file://0001-cmake-install-bash-completions-in-the-right-place.patch \
7 file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \ 7 file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
8 file://0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch \
8 " 9 "
9 10
10# From 2017-02-06 11# From 2017-02-06