[vlc-devel] [PATCH] contribs: gcrypt: Fix 64bits with optimizations enabled
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Tue May 17 17:53:13 CEST 2016
This inline assembly block doesn't use longs, so there is no need to
bother about the size of it.
This check was making this block of inline assembly disabled when
building on windows, causing 64bits assembly to use 32bits pointers,
which seems to make gcc unhappy when optimizations are enabled.
---
contrib/src/gcrypt/fix-64bits-inline-asm.patch | 11 +++++++++++
contrib/src/gcrypt/rules.mak | 1 +
2 files changed, 12 insertions(+)
create mode 100644 contrib/src/gcrypt/fix-64bits-inline-asm.patch
diff --git a/contrib/src/gcrypt/fix-64bits-inline-asm.patch b/contrib/src/gcrypt/fix-64bits-inline-asm.patch
new file mode 100644
index 0000000..33b0d6a
--- /dev/null
+++ b/contrib/src/gcrypt/fix-64bits-inline-asm.patch
@@ -0,0 +1,11 @@
+--- libgcrypt/random/rndhw.c.orig 2016-05-17 17:46:47.928645907 +0200
++++ libgcrypt/random/rndhw.c 2016-05-17 17:46:53.416656443 +0200
+@@ -69,7 +69,7 @@
+ nbytes = 0;
+ while (nbytes < 64)
+ {
+-#if defined(__x86_64__) && defined(__LP64__)
++#if defined(__x86_64__)
+ asm volatile
+ ("movq %1, %%rdi\n\t" /* Set buffer. */
+ "xorq %%rdx, %%rdx\n\t" /* Request up to 8 bytes. */
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
index 2a22b77..88f8686 100644
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
@@ -15,6 +15,7 @@ libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
$(APPLY) $(SRC)/gcrypt/0001-Fix-assembly-division-check.patch
$(APPLY) $(SRC)/gcrypt/disable-doc-compilation.patch
$(APPLY) $(SRC)/gcrypt/disable-tests-compilation.patch
+ $(APPLY) $(SRC)/gcrypt/fix-64bits-inline-asm.patch
ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/gcrypt/winrt.patch
endif
--
2.8.1
More information about the vlc-devel
mailing list