From e780abbcb0f32b1ba97561566599a30fc07650b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 18 Mar 2018 13:54:29 +0200 Subject: [PATCH] contrib: pthreads: Use the right CONTEXT field on arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 6869332cc10ad6b7292fd87d1b06aa30e0074ed4) Signed-off-by: Hugo Beauzée-Luyssen --- contrib/src/pthreads/arm64.patch | 14 ++++++++++++++ contrib/src/pthreads/rules.mak | 1 + 2 files changed, 15 insertions(+) create mode 100644 contrib/src/pthreads/arm64.patch diff --git a/contrib/src/pthreads/arm64.patch b/contrib/src/pthreads/arm64.patch new file mode 100644 index 0000000000..ef2cad1a73 --- /dev/null +++ b/contrib/src/pthreads/arm64.patch @@ -0,0 +1,14 @@ +diff -urN pthreads-orig/context.h pthreads/context.h +--- pthreads-orig/context.h 2011-03-04 01:37:20.000000000 +0200 ++++ pthreads/context.h 2018-03-18 13:50:07.362676429 +0200 +@@ -67,6 +67,10 @@ + #define PTW32_PROGCTR(Context) ((Context).Pc) + #endif + ++#if defined(_ARM64_) || defined(__aarch64__) ++#define PTW32_PROGCTR(Context) ((Context).Pc) ++#endif ++ + #if !defined(PTW32_PROGCTR) + #error Module contains CPU-specific code; modify and recompile. + #endif diff --git a/contrib/src/pthreads/rules.mak b/contrib/src/pthreads/rules.mak index 9bc9014b72..6e39bfc05b 100644 --- a/contrib/src/pthreads/rules.mak +++ b/contrib/src/pthreads/rules.mak @@ -22,6 +22,7 @@ endif $(APPLY) $(SRC)/pthreads/implib.patch $(APPLY) $(SRC)/pthreads/remove-inline.patch $(APPLY) $(SRC)/pthreads/x86-inline-asm.patch + $(APPLY) $(SRC)/pthreads/arm64.patch $(MOVE) ifdef HAVE_CROSS_COMPILE