[vlc-devel] [PATCH 2/7] contrib: gmp: patch arm64 asm to build for Apple platforms
Marvin Scholz
epirat07 at gmail.com
Wed Jul 29 13:28:52 CEST 2020
---
contrib/src/gmp/gmp-fix-apple-arm64-asm.patch | 14 ++++++++++++++
contrib/src/gmp/rules.mak | 3 +++
2 files changed, 17 insertions(+)
create mode 100644 contrib/src/gmp/gmp-fix-apple-arm64-asm.patch
diff --git a/contrib/src/gmp/gmp-fix-apple-arm64-asm.patch b/contrib/src/gmp/gmp-fix-apple-arm64-asm.patch
new file mode 100644
index 0000000000..c240be56e6
--- /dev/null
+++ b/contrib/src/gmp/gmp-fix-apple-arm64-asm.patch
@@ -0,0 +1,14 @@
+--- gmp/mpn/arm64/invert_limb.asm.original 2020-07-27 17:36:18.000000000 +0200
++++ gmp/mpn/arm64/invert_limb.asm 2020-07-27 17:37:14.000000000 +0200
+@@ -41,9 +41,9 @@ C Compiler generated, mildly edited. Co
+ ASM_START()
+ PROLOGUE(mpn_invert_limb)
+ lsr x2, x0, #54
+- adrp x1, approx_tab
++ adrp x1, approx_tab at PAGE
+ and x2, x2, #0x1fe
+- add x1, x1, :lo12:approx_tab
++ add x1, x1, approx_tab at PAGEOFF
+ ldrh w3, [x1,x2]
+ lsr x4, x0, #24
+ add x4, x4, #1
diff --git a/contrib/src/gmp/rules.mak b/contrib/src/gmp/rules.mak
index ed34d2038e..a79b2bc955 100644
--- a/contrib/src/gmp/rules.mak
+++ b/contrib/src/gmp/rules.mak
@@ -35,6 +35,9 @@ gmp: gmp-$(GMP_VERSION).tar.bz2 .sum-gmp
$(APPLY) $(SRC)/gmp/ppc64.patch
$(APPLY) $(SRC)/gmp/win-arm64.patch
$(APPLY) $(SRC)/gmp/gmp-fix-asm-detection.patch
+ifdef HAVE_DARWIN_OS
+ $(APPLY) $(SRC)/gmp/gmp-fix-apple-arm64-asm.patch
+endif
# do not try the cross compiler to detect the build compiler
cd $(UNPACK_DIR) && sed -i.orig 's/"$$CC" "$$CC $$CFLAGS $$CPPFLAGS" cc gcc c89 c99/cc gcc c89 c99/' acinclude.m4
$(MOVE)
--
2.24.3 (Apple Git-128)
More information about the vlc-devel
mailing list