[vlc-devel] [PATCH] contrib/gcrypt: fix compilation with clang

Rémi Denis-Courmont remi at remlab.net
Thu Feb 13 22:09:10 CET 2014


Err, are you sure the mnemonics work correctly with the downgraded alignment? 
That seems very dubious... Typically SIMD requires higher than natural memory 
boundaries to work fast/without crashes/correctly. Why would upstream put 
those requirements in the first place if they were not required?!

Le jeudi 13 février 2014, 20:22:37 Felix Paul Kühne a écrit :
> ---
>  .../gcrypt/gcrypt-fix-compilation-with-clang.patch | 24
> ++++++++++++++++++++++ contrib/src/gcrypt/rules.mak                       |
>  3 +++
>  2 files changed, 27 insertions(+)
>  create mode 100644
> contrib/src/gcrypt/gcrypt-fix-compilation-with-clang.patch
> 
> diff --git a/contrib/src/gcrypt/gcrypt-fix-compilation-with-clang.patch
> b/contrib/src/gcrypt/gcrypt-fix-compilation-with-clang.patch new file mode
> 100644
> index 0000000..fd7497a
> --- /dev/null
> +++ b/contrib/src/gcrypt/gcrypt-fix-compilation-with-clang.patch
> @@ -0,0 +1,24 @@
> +diff -ru libgcrypt/mpi/amd64/mpih-mul1.S
> libgcrypt-fixed/mpi/amd64/mpih-mul1.S +---
> libgcrypt/mpi/amd64/mpih-mul1.S	2013-03-15 20:25:38.000000000 +0100 ++++
> libgcrypt-fixed/mpi/amd64/mpih-mul1.S	2014-02-13 20:15:16.000000000 +0100
> +@@ -40,7 +40,7 @@
> +
> +
> + 	TEXT
> +-	ALIGN(5)
> ++	ALIGN(2)
> + 	.byte	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
> +
> + 	GLOBL	C_SYMBOL_NAME(_gcry_mpih_mul_1)
> +diff -ru libgcrypt/mpi/amd64/mpih-rshift.S
> libgcrypt-fixed/mpi/amd64/mpih-rshift.S +---
> libgcrypt/mpi/amd64/mpih-rshift.S	2013-03-15 20:25:38.000000000 +0100 ++++
> libgcrypt-fixed/mpi/amd64/mpih-rshift.S	2014-02-13 20:15:34.000000000 +0100
> +@@ -56,7 +56,7 @@
> + 	addq	$2, %rdx
> + 	jg	.Lendo
> +
> +-	ALIGN(8)			/* minimal alignment for claimed speed */
> ++	ALIGN(2)			/* minimal alignment for claimed speed */
> + .Loop:	movq	-8(%rsi,%rdx,8), %mm6
> + 	movq	%mm6, %mm2
> + 	psllq	%mm0, %mm6
> diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
> index ae55695..b3570c6 100644
> --- a/contrib/src/gcrypt/rules.mak
> +++ b/contrib/src/gcrypt/rules.mak
> @@ -11,6 +11,9 @@ $(TARBALLS)/libgcrypt-$(GCRYPT_VERSION).tar.bz2:
> 
>  libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
>  	$(UNPACK)
> +ifdef HAVE_MACOSX
> +	$(APPLY) $(SRC)/gcrypt/gcrypt-fix-compilation-with-clang.patch
> +endif
>  	$(MOVE)
> 
>  DEPS_gcrypt = gpg-error

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list