Bug#865726: gmt: Please add support for m68k
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Sat Jun 24 08:49:57 UTC 2017
Source: gmt
Version: 5.4.1+dfsg-1
Severity: normal
Tags: patch
User: debian-68k at lists.debian.org
Usertags: m68k
Hi!
gmt currently fails to build from source on m68k because the UC_IP macro
is not properly defined on this architecture:
[ 13%] Building C object src/CMakeFiles/gmtlib.dir/gmt_api.c.o
cd /<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src && /usr/bin/cc -DLIBRARY_EXPORTS -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/src -I/usr/include/m68k-linux-gnu -I/usr/include/gdal -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src/gshhg -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src/img -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src/meca -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src/mgd77 -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src/misc -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src/potential -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src/segy -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src/spotter -I/<<BUILDDIR>>/gmt-5.4.1+dfsg/debian/build/src/x2sys -std=gnu99 -fstrict-aliasing -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/gmt-5.4.1+dfsg=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -DNDEBUG -fPIC -o CMakeFiles/gmtlib.dir/gmt_api.c.o -c /<<BUILDDIR>>/gmt-5.4.1+dfsg/src/gmt_api.c
/<<BUILDDIR>>/gmt-5.4.1+dfsg/src/common_sighandler.c: In function 'sig_handler':
/<<BUILDDIR>>/gmt-5.4.1+dfsg/src/common_sighandler.c:95:55: error: 'REG_EIP' undeclared (first use in this function)
# define UC_IP(uc) ((void *) (uc)->uc_mcontext.gregs[REG_EIP])
^
/<<BUILDDIR>>/gmt-5.4.1+dfsg/src/common_sighandler.c:168:14: note: in expansion of macro 'UC_IP'
array [0] = UC_IP (uc); /* caller's address */
^~~~~
/<<BUILDDIR>>/gmt-5.4.1+dfsg/src/common_sighandler.c:95:55: note: each undeclared identifier is reported only once for each function it appears in
# define UC_IP(uc) ((void *) (uc)->uc_mcontext.gregs[REG_EIP])
^
/<<BUILDDIR>>/gmt-5.4.1+dfsg/src/common_sighandler.c:168:14: note: in expansion of macro 'UC_IP'
array [0] = UC_IP (uc); /* caller's address */
^~~~~
src/CMakeFiles/gmtlib.dir/build.make:119: recipe for target 'src/CMakeFiles/gmtlib.dir/common_sighandler.c.o' failed
This is fixed by the attached patch. Please consider including it in your
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 support for m68k
This patch adds support for m68k by defining the correct
macro to determine the instruction pointer from ucontext.
.
Author: John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
Last-Update: 2017-06-24
Index: gmt-5.4.1+dfsg/src/common_sighandler.c
===================================================================
--- gmt-5.4.1+dfsg.orig/src/common_sighandler.c
+++ gmt-5.4.1+dfsg/src/common_sighandler.c
@@ -83,6 +83,8 @@ void backtrace_symbols_fd(void *const *b
# define UC_IP(uc) ((void *) (uc)->uc_mcontext.arm_pc)
# elif defined( __hppa__)
# 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(__s390__)
# define UC_IP(uc) ((void *) (uc)->uc_mcontext.psw.addr)
# elif defined(__sparc__)
More information about the Pkg-grass-devel
mailing list