Bug#958556: gmt: Platform support for RISC-V and SuperH

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Thu Apr 23 17:37:19 BST 2020


Source: gmt
Severity: normal
Tags: patch
User: debian-riscv at lists.debian.org
Usertags: riscv64 sh4

Hi!

The attached patch adds build support for riscv64 and sh4.

Please include it in the next upload.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
-------------- next part --------------
Description: Add build support for riscv64 and sh4
 Defines UC_IP() on riscv64 and sh4 so that gmt can be built on
 these targets.
 .
Author: John Paul Adrian <glaubitz at physik.fu-berlin.de>

---

Forwarded: https://github.com/GenericMappingTools/gmt/pull/3155
Last-Update: 2020-04-23

Index: gmt-6.0.0+dfsg/src/common_sighandler.c
===================================================================
--- gmt-6.0.0+dfsg.orig/src/common_sighandler.c
+++ gmt-6.0.0+dfsg/src/common_sighandler.c
@@ -86,8 +86,12 @@ void backtrace_symbols_fd(void *const *b
 #  define UC_IP(uc) ((void *) (uc)->uc_mcontext.sc_iaoq[0])
 # elif defined(__m68k__)
 #  define UC_IP(uc) ((void *) (uc)->uc_mcontext.gregs[R_PC])
+# elif defined(__riscv)
+#  define UC_IP(uc) ((void *) (uc)->uc_mcontext.__gregs[REG_PC])
 # elif defined(__s390__)
 #  define UC_IP(uc) ((void *) (uc)->uc_mcontext.psw.addr)
+# elif defined( __sh4__)
+#  define UC_IP(uc) ((void *) (uc)->uc_mcontext.pc)
 # elif defined(__sparc__)
 #  if defined (__arch64__)
 #   define UC_IP(uc) ((void *) (uc)->uc_mcontext.mc_gregs[MC_PC])


More information about the Pkg-grass-devel mailing list