[vlc-commits] contrib: gcrypt: fix clang mips64 build
Thomas Guillem
git at videolan.org
Tue Aug 30 13:13:25 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Aug 30 13:11:38 2016 +0200| [6107e1ba74407a6a885f59a95b9853f29c4a3939] | committer: Thomas Guillem
contrib: gcrypt: fix clang mips64 build
Fix umul_ppmm definition.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6107e1ba74407a6a885f59a95b9853f29c4a3939
---
contrib/src/gcrypt/clang-mips64.patch | 12 ++++++++++++
contrib/src/gcrypt/rules.mak | 5 +++++
2 files changed, 17 insertions(+)
diff --git a/contrib/src/gcrypt/clang-mips64.patch b/contrib/src/gcrypt/clang-mips64.patch
new file mode 100644
index 0000000..7018cec
--- /dev/null
+++ b/contrib/src/gcrypt/clang-mips64.patch
@@ -0,0 +1,12 @@
+diff -Naur libgcrypt.orig/mpi/longlong.h libgcrypt/mpi/longlong.h
+--- libgcrypt.orig/mpi/longlong.h 2016-06-08 18:18:15.000000000 +0200
++++ libgcrypt/mpi/longlong.h 2016-08-30 12:56:30.751262074 +0200
+@@ -890,7 +890,7 @@
+ ************** MIPS/64 **************
+ ***************************************/
+ #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
+-# if (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
++# if defined (__clang__) || (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+ typedef unsigned int UTItype __attribute__ ((mode (TI)));
+ # define umul_ppmm(w1, w0, u, v) \
+ do { \
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
index 5239cb2..291f0fc 100644
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
@@ -18,6 +18,11 @@ endif
ifdef HAVE_WIN64
$(APPLY) $(SRC)/gcrypt/64bits-relocation.patch
endif
+ifeq ($(CC), clang)
+ifeq ($(ARCH),mips64el)
+ $(APPLY) $(SRC)/gcrypt/clang-mips64.patch
+endif
+endif
$(MOVE)
DEPS_gcrypt = gpg-error
More information about the vlc-commits
mailing list