0007-contrib-gcrypt-fix-tvOS-compilation.patch 2.31 KB
Newer Older
1
From effc78557ff4dc6a42e12cd0b64342aa860020a3 Mon Sep 17 00:00:00 2001
Felix Paul Kühne's avatar
Felix Paul Kühne committed
2 3
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Sat, 3 Oct 2015 22:45:14 +0200
4
Subject: [PATCH 07/25] contrib/gcrypt: fix tvOS compilation
Felix Paul Kühne's avatar
Felix Paul Kühne committed
5 6

---
7 8
 .../src/gcrypt/fix-sha1-ssse3-for-clang.patch    | 16 ++++++++++++++++
 contrib/src/gcrypt/rules.mak                     |  6 ++++++
Felix Paul Kühne's avatar
Felix Paul Kühne committed
9 10 11 12 13
 2 files changed, 22 insertions(+)
 create mode 100644 contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch

diff --git a/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch b/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch
new file mode 100644
14
index 0000000000..f1d3ccc71f
Felix Paul Kühne's avatar
Felix Paul Kühne committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
--- /dev/null
+++ b/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch
@@ -0,0 +1,16 @@
+diff -ru libgcrypt/cipher/sha1-ssse3-amd64.S libgcrypt/cipher/sha1-ssse3-amd64.S
+--- libgcrypt/cipher/sha1-ssse3-amd64.S	2014-08-21 14:50:39.000000000 +0200
++++ libgcrypt/cipher/sha1-ssse3-amd64.S	2015-10-03 22:40:21.000000000 +0200
+@@ -217,10 +217,9 @@
+  * _gcry_sha1_transform_amd64_ssse3 (void *ctx, const unsigned char *data)
+  */
+ .text
+-.globl _gcry_sha1_transform_amd64_ssse3
+-.type _gcry_sha1_transform_amd64_ssse3,@function
++.globl __gcry_sha1_transform_amd64_ssse3
+ .align 16
+-_gcry_sha1_transform_amd64_ssse3:
++__gcry_sha1_transform_amd64_ssse3:
+   /* input:
+    *	%rdi: ctx, CTX
+    *	%rsi: data (64 bytes)
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
35
index 6697e6714f..ca78585737 100644
Felix Paul Kühne's avatar
Felix Paul Kühne committed
36 37
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
38
@@ -13,6 +13,7 @@ gcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
Felix Paul Kühne's avatar
Felix Paul Kühne committed
39
 	$(UNPACK)
Felix Paul Kühne's avatar
Felix Paul Kühne committed
40 41 42
 	$(APPLY) $(SRC)/gcrypt/disable-tests-compilation.patch
 	$(APPLY) $(SRC)/gcrypt/work-around-libtool-limitation.patch
+	$(APPLY) $(SRC)/gcrypt/fix-sha1-ssse3-for-clang.patch
43
 	$(APPLY) $(SRC)/gcrypt/fix-pthread-detection.patch
Soomin Lee's avatar
Soomin Lee committed
44 45 46
 	$(APPLY) $(SRC)/gcrypt/0001-random-Don-t-assume-that-_WIN64-implies-x86_64.patch
 	$(APPLY) $(SRC)/gcrypt/0002-aarch64-mpi-Fix-building-the-mpi-aarch64-assembly-fo.patch
@@ -47,6 +48,11 @@ GCRYPT_EXTRA_CFLAGS = -fheinous-gnu-extensions
Felix Paul Kühne's avatar
Felix Paul Kühne committed
47 48 49 50 51 52 53 54 55 56 57 58
 else
 GCRYPT_EXTRA_CFLAGS =
 endif
+ifdef HAVE_TVOS
+ifeq ($(ARCH), x86_64)
+GCRYPT_CONF += --disable-asm --enable-ciphers=des,rfc2268,arcfour --enable-digests=md5,sha1,rmd160
+endif
+endif
 ifdef HAVE_MACOSX
 GCRYPT_CONF += --disable-aesni-support
 else
-- 
59
2.20.1
Felix Paul Kühne's avatar
Felix Paul Kühne committed
60