[vlc-commits] contrib/harfbuzz: fix OSAtomic calls for AArch64

Felix Paul Kühne git at videolan.org
Wed Jul 30 12:26:11 CEST 2014


vlc/vlc-2.1 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Jan 22 15:01:50 2014 +0100| [3ff636bcf12aa01b1100d791a51720070d9db46f] | committer: Rafaël Carré

contrib/harfbuzz: fix OSAtomic calls for AArch64

(cherry picked from commit df5b4a9db941864d2dead106bc70c03322f31ed8)
Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=3ff636bcf12aa01b1100d791a51720070d9db46f
---

 contrib/src/harfbuzz/harfbuzz-aarch64.patch |   27 +++++++++++++++++++++++++++
 contrib/src/harfbuzz/rules.mak              |    1 +
 2 files changed, 28 insertions(+)

diff --git a/contrib/src/harfbuzz/harfbuzz-aarch64.patch b/contrib/src/harfbuzz/harfbuzz-aarch64.patch
new file mode 100644
index 0000000..39c7dde
--- /dev/null
+++ b/contrib/src/harfbuzz/harfbuzz-aarch64.patch
@@ -0,0 +1,27 @@
+diff -ru harfbuzz/src/hb-atomic-private.hh harfbuzz-fied/src/hb-atomic-private.hh
+--- harfbuzz/src/hb-atomic-private.hh	2013-04-04 21:01:42.000000000 +0200
++++ harfbuzz-fied/src/hb-atomic-private.hh	2014-01-22 14:57:21.000000000 +0100
+@@ -65,10 +65,8 @@
+ #elif !defined(HB_NO_MT) && defined(__APPLE__)
+ 
+ #include <libkern/OSAtomic.h>
+-#ifdef __MAC_OS_X_MIN_REQUIRED
++#ifdef __APPLE__
+ #include <AvailabilityMacros.h>
+-#elif defined(__IPHONE_OS_MIN_REQUIRED)
+-#include <Availability.h>
+ #endif
+ 
+ typedef int32_t hb_atomic_int_t;
+@@ -76,7 +74,11 @@
+ 
+ #define hb_atomic_ptr_get(P)		(OSMemoryBarrier (), (void *) *(P))
+ #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100)
++#if __aarch64__
++#define hb_atomic_ptr_cmpexch(P,O,N)    OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P))
++#else
+ #define hb_atomic_ptr_cmpexch(P,O,N)	OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
++#endif
+ #else
+ #if __ppc64__ || __x86_64__
+ #define hb_atomic_ptr_cmpexch(P,O,N)    OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P))
diff --git a/contrib/src/harfbuzz/rules.mak b/contrib/src/harfbuzz/rules.mak
index 1c76764..a34ee2b 100644
--- a/contrib/src/harfbuzz/rules.mak
+++ b/contrib/src/harfbuzz/rules.mak
@@ -15,6 +15,7 @@ $(TARBALLS)/harfbuzz-$(HARFBUZZ_VERSION).tar.bz2:
 harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 .sum-harfbuzz
 	$(UNPACK)
 	$(UPDATE_AUTOCONFIG)
+	$(APPLY) $(SRC)/harfbuzz/harfbuzz-aarch64.patch
 	$(MOVE)
 
 DEPS_harfbuzz = freetype2 $(DEPS_freetype2)



More information about the vlc-commits mailing list