]> git.sesse.net Git - vlc/commitdiff
contrib/gcrypt: fix compilation on x86_64/Darwin with clang
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 22 Mar 2014 19:09:54 +0000 (20:09 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 22 Mar 2014 19:09:54 +0000 (20:09 +0100)
Patch is pending for upstream submission

contrib/src/gcrypt/gcrypt-fix-x86_64-codepath-on-Darwin.patch [new file with mode: 0644]
contrib/src/gcrypt/rules.mak

diff --git a/contrib/src/gcrypt/gcrypt-fix-x86_64-codepath-on-Darwin.patch b/contrib/src/gcrypt/gcrypt-fix-x86_64-codepath-on-Darwin.patch
new file mode 100644 (file)
index 0000000..e04787b
--- /dev/null
@@ -0,0 +1,29 @@
+From 3149e9b73a94b45a5126cc778fe03f0b686dced9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Sat, 22 Mar 2014 19:55:52 +0100
+Subject: [PATCH] Fix code path selection for x86_64 on Darwin
+
+---
+ mpi/config.links | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/mpi/config.links b/mpi/config.links
+index 0217d35..4f35ea2 100644
+--- a/mpi/config.links
++++ b/mpi/config.links
+@@ -127,6 +127,12 @@ case "${host}" in
+       path="i586 i386"
+         mpi_cpu_arch="x86"
+       ;;
++    x86_64-apple-darwin*)
++      echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
++      cat  $srcdir/mpi/i386/syntax.h      >>./mpi/asm-syntax.h
++      path="amd64"
++        mpi_cpu_arch="x86"
++      ;;
+     x86_64-*-*)
+       echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
+       cat  $srcdir/mpi/i386/syntax.h      >>./mpi/asm-syntax.h
+-- 
+1.8.5.2 (Apple Git-48)
+
index ae55695882237a438cb0a64fa91fd4a4bcd533ef..c43ac0949a1d4af22949abe294e17fd8bca39d9d 100644 (file)
@@ -11,6 +11,7 @@ $(TARBALLS)/libgcrypt-$(GCRYPT_VERSION).tar.bz2:
 
 libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
        $(UNPACK)
+       $(APPLY) $(SRC)/gcrypt/gcrypt-fix-x86_64-codepath-on-Darwin.patch
        $(MOVE)
 
 DEPS_gcrypt = gpg-error