[SCM] mpv/master: Make 04_use-atomic-not-sync.patch actually work on mips
ghedo at users.alioth.debian.org
ghedo at users.alioth.debian.org
Mon Dec 30 15:01:06 UTC 2013
The following commit has been merged in the master branch:
commit 5d63560e15a8c8014c14ba8d5bc233a191bf9a90
Author: Alessandro Ghedini <alessandro at ghedini.me>
Date: Mon Dec 30 16:00:22 2013 +0100
Make 04_use-atomic-not-sync.patch actually work on mips
Git-Dch: Ignore
diff --git a/debian/patches/04_use-atomic-not-sync.patch b/debian/patches/04_use-atomic-not-sync.patch
index f0ee8c3..2d23c79 100644
--- a/debian/patches/04_use-atomic-not-sync.patch
+++ b/debian/patches/04_use-atomic-not-sync.patch
@@ -13,12 +13,14 @@ Applied-Upstream: *** FIXME ***
--- a/compat/atomics.h
+++ b/compat/atomics.h
-@@ -19,5 +19,14 @@
+@@ -19,5 +19,16 @@
// At this point both gcc and clang had __sync_synchronize support for some
// time. We only support a full memory barrier.
-#define mp_memory_barrier() __sync_synchronize()
-#define mp_atomic_add_and_fetch(a, b) __sync_add_and_fetch(a, b)
++#include "config.h"
++
+#if HAVE_ATOMIC_THREAD_FENCE
+# define mp_memory_barrier() __atomic_thread_fence(__ATOMIC_SEQ_CST)
+#else
@@ -32,10 +34,14 @@ Applied-Upstream: *** FIXME ***
+#endif
--- a/wscript
+++ b/wscript
-@@ -99,6 +99,14 @@
+@@ -99,6 +99,18 @@
'req': True,
'fmsg': 'Unable to find pthreads support.'
}, {
++ 'name': 'libatomic',
++ 'desc': '-latomic',
++ 'func': check_cc(lib='atomic')
++ }, {
+ 'name': 'atomic_thread_fence',
+ 'desc': '__atomic_thread_fence',
+ 'func': check_statement('stdio.h', '__atomic_thread_fence()')
--
mpv packaging
More information about the pkg-multimedia-commits
mailing list