Commit df5b4a9d authored by Felix Paul Kühne's avatar Felix Paul Kühne

contrib/harfbuzz: fix OSAtomic calls for AArch64

parent 0de04aff
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))
...@@ -15,6 +15,7 @@ $(TARBALLS)/harfbuzz-$(HARFBUZZ_VERSION).tar.bz2: ...@@ -15,6 +15,7 @@ $(TARBALLS)/harfbuzz-$(HARFBUZZ_VERSION).tar.bz2:
harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 .sum-harfbuzz harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 .sum-harfbuzz
$(UNPACK) $(UNPACK)
$(UPDATE_AUTOCONFIG) $(UPDATE_AUTOCONFIG)
$(APPLY) $(SRC)/harfbuzz/harfbuzz-aarch64.patch
$(MOVE) $(MOVE)
DEPS_harfbuzz = freetype2 $(DEPS_freetype2) DEPS_harfbuzz = freetype2 $(DEPS_freetype2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment