summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-09-25 04:59:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-28 12:00:26 +0100
commit5942dfec50c811da07105b4d062163796c65733a (patch)
tree961a470218807bbd2453e0a181892e2f5519f825 /meta/recipes-graphics
parentcfa3ed00b37ae91db23eb1357698a7aee06f18f1 (diff)
downloadpoky-5942dfec50c811da07105b4d062163796c65733a.tar.gz
waffle: Fix build with musl
Backport needed patches for compilation fixes on musl (From OE-Core rev: d19772d1f3c9d0a06c10dfb246bb156b575a14c5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch54
-rw-r--r--meta/recipes-graphics/waffle/waffle_1.5.1.bb4
2 files changed, 57 insertions, 1 deletions
diff --git a/meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch b/meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch
new file mode 100644
index 0000000000..a0c826ed93
--- /dev/null
+++ b/meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch
@@ -0,0 +1,54 @@
1From 3b9b8f5f6d1b99af43e95ec0868404e552a85b73 Mon Sep 17 00:00:00 2001
2From: Emil Velikov <emil.l.velikov@gmail.com>
3Date: Thu, 19 Mar 2015 22:26:11 +0000
4Subject: [PATCH] third_party/threads: Use PTHREAD_MUTEX_RECURSIVE by default
5
6PTHREAD_MUTEX_RECURSIVE_NP was used for compatibility with old glibc.
7Although due to the_GNU_SOURCES define the portable,
8PTHREAD_MUTEX_RECURSIVE will be available for Linuxes since at least
91998. Simplify things giving us compatibility with musl which
10apparently does not provide the non-portable define.
11
12Inspired by almost identical commit in mesa aead7fe2e2b(c11/threads: Use
13PTHREAD_MUTEX_RECURSIVE by default) by Felix Janda.
14
15Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
16Reviewed-by: Chad Versace <chad.versace@intel.com>
17---
18Upstream-Status: Backport
19
20 third_party/threads/threads_posix.c | 10 ++++------
21 1 file changed, 4 insertions(+), 6 deletions(-)
22
23diff --git a/third_party/threads/threads_posix.c b/third_party/threads/threads_posix.c
24index 5835e43..e122bf9 100644
25--- a/third_party/threads/threads_posix.c
26+++ b/third_party/threads/threads_posix.c
27@@ -26,6 +26,9 @@
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 * DEALINGS IN THE SOFTWARE.
30 */
31+
32+#define _GNU_SOURCE
33+
34 #include <stdlib.h>
35 #ifndef assert
36 #include <assert.h>
37@@ -150,13 +153,8 @@ int mtx_init(mtx_t *mtx, int type)
38 && type != (mtx_try|mtx_recursive))
39 return thrd_error;
40 pthread_mutexattr_init(&attr);
41- if ((type & mtx_recursive) != 0) {
42-#if defined(__linux__) || defined(__linux)
43- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
44-#else
45+ if ((type & mtx_recursive) != 0)
46 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
47-#endif
48- }
49 pthread_mutex_init(mtx, &attr);
50 pthread_mutexattr_destroy(&attr);
51 return thrd_success;
52--
532.5.2
54
diff --git a/meta/recipes-graphics/waffle/waffle_1.5.1.bb b/meta/recipes-graphics/waffle/waffle_1.5.1.bb
index b8aa05a2db..af84020532 100644
--- a/meta/recipes-graphics/waffle/waffle_1.5.1.bb
+++ b/meta/recipes-graphics/waffle/waffle_1.5.1.bb
@@ -3,7 +3,9 @@ LICENSE = "BSD-2-Clause"
3LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \ 3LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \
4 file://include/waffle/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf" 4 file://include/waffle/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf"
5 5
6SRC_URI = "http://waffle-gl.org/files/release/${BPN}-${PV}/${BPN}-${PV}.tar.xz" 6SRC_URI = "http://waffle-gl.org/files/release/${BPN}-${PV}/${BPN}-${PV}.tar.xz \
7 file://0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch \
8 "
7SRC_URI[md5sum] = "c0d802bc3d0aba87c51e423a3a8bdd69" 9SRC_URI[md5sum] = "c0d802bc3d0aba87c51e423a3a8bdd69"
8SRC_URI[sha256sum] = "cbab0e926515064e818bf089a5af04be33307e5f40d07659fb40d59b2bfe20aa" 10SRC_URI[sha256sum] = "cbab0e926515064e818bf089a5af04be33307e5f40d07659fb40d59b2bfe20aa"
9 11