[vlc-commits] contrib: pthreads: Don't use x86 inline asm on non-x86 platforms

Martin Storsjö git at videolan.org
Fri Nov 23 16:10:50 CET 2018


vlc/vlc-3.0 | branch: master | Martin Storsjö <martin at martin.st> | Wed Jan 10 14:54:49 2018 +0200| [bd1bd2a894d6ce52994e2cb608f5c256e9d8aba8] | committer: Hugo Beauzée-Luyssen

contrib: pthreads: Don't use x86 inline asm on non-x86 platforms

(cherry picked from commit f391a2a3b0410a4361ca0b93209b6e5ec79ff918)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=bd1bd2a894d6ce52994e2cb608f5c256e9d8aba8
---

 contrib/src/pthreads/rules.mak            |  1 +
 contrib/src/pthreads/x86-inline-asm.patch | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/contrib/src/pthreads/rules.mak b/contrib/src/pthreads/rules.mak
index 8aeaf90fb0..9bc9014b72 100644
--- a/contrib/src/pthreads/rules.mak
+++ b/contrib/src/pthreads/rules.mak
@@ -21,6 +21,7 @@ ifdef HAVE_WINSTORE
 endif
 	$(APPLY) $(SRC)/pthreads/implib.patch
 	$(APPLY) $(SRC)/pthreads/remove-inline.patch
+	$(APPLY) $(SRC)/pthreads/x86-inline-asm.patch
 	$(MOVE)
 
 ifdef HAVE_CROSS_COMPILE
diff --git a/contrib/src/pthreads/x86-inline-asm.patch b/contrib/src/pthreads/x86-inline-asm.patch
new file mode 100644
index 0000000000..0169a190be
--- /dev/null
+++ b/contrib/src/pthreads/x86-inline-asm.patch
@@ -0,0 +1,12 @@
+diff -u pthreads-orig/implement.h pthreads/implement.h
+--- pthreads-orig/implement.h	2012-03-18 07:11:43.000000000 +0200
++++ pthreads/implement.h	2018-01-10 14:53:53.596756881 +0200
+@@ -746,7 +746,7 @@
+  *
+  * The above aren't available in Mingw32 as of gcc 4.5.2 so define our own.
+  */
+-#if defined(__GNUC__)
++#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ # if defined(_WIN64)
+ # define PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(location, value, comparand)    \
+     ({                                                                     \



More information about the vlc-commits mailing list