aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2023-07-28 20:07:02 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2023-07-30 22:59:08 +0000
commita5783589a611edd6c2e15a71bdd740a0206058e6 (patch)
tree9a55ff9e7e6e9a081cae90e23424598b6111d34f
parent1c21936e0198bad899a2a4ee01273ed5b8a7a628 (diff)
downloadports-a5783589a611edd6c2e15a71bdd740a0206058e6.tar.gz
ports-a5783589a611edd6c2e15a71bdd740a0206058e6.zip
graphics/gmt: fix build on armv7
Fix wrong code for armv7 mcontext_t PC retrieval. Approved by: portmgr (build fix blanket) MFH: 2023Q3
-rw-r--r--graphics/gmt/files/patch-src_gmt__common__sighandler.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/gmt/files/patch-src_gmt__common__sighandler.c b/graphics/gmt/files/patch-src_gmt__common__sighandler.c
new file mode 100644
index 000000000000..f4368e5d2fa8
--- /dev/null
+++ b/graphics/gmt/files/patch-src_gmt__common__sighandler.c
@@ -0,0 +1,11 @@
+--- src/gmt_common_sighandler.c.orig 2023-07-28 19:57:48 UTC
++++ src/gmt_common_sighandler.c
+@@ -84,7 +84,7 @@ void backtrace_symbols_fd(void *const *buffer, int siz
+ # ifdef __x86_64__
+ # define UC_IP(uc) ((void *) (uc)->uc_mcontext.mc_rip)
+ # elif defined( __arm__)
+-# define UC_IP(uc) ((void *) (uc)->uc_mcontext.arm_pc)
++# define UC_IP(uc) ((void *) (uc)->uc_mcontext.__gregs[_REG_PC])
+ # elif defined( __aarch64__)
+ # define UC_IP(uc) ((void *) (uc)->uc_mcontext.mc_gpregs.gp_elr)
+ # elif defined(__ppc__)