Package: papi
Version: 5.3.0-3
Severity: normal
Tags: patch
The attached trivial patch fixes the build on the Debian hppa/linux arch.
Please apply for the next version.
Thanks,
Helge
PS: Here is the old build-log:
http://buildd.debian-ports.org/status/fetch.php?pkg=papi&arch=hppa&ver=5.3.0-3&stamp=1391584125
diff -up ./src/configure.in.org ./src/configure.in
--- ./src/configure.in.org 2014-06-12 16:36:43.136183226 +0200
+++ ./src/configure.in 2014-06-12 16:36:55.312184354 +0200
@@ -384,7 +384,7 @@ AC_DEFINE_UNQUOTED(CPU,$CPU,[cpu type])
# First set pthread-mutexes based on arch
case $arch in
- aarch64|arm*)
+ aarch64|arm*|hppa*)
pthread_mutexes=yes
CFLAGS="$CFLAGS -DUSE_PTHREAD_MUTEXES"
echo "forcing use of pthread mutexes... " >&6
diff -up ./src/linux-context.h.org ./src/linux-context.h
--- ./src/linux-context.h.org 2014-06-12 16:38:34.792193369 +0200
+++ ./src/linux-context.h 2014-06-12 16:43:47.632219446 +0200
@@ -35,6 +35,8 @@ typedef ucontext_t hwd_ucontext_t;
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.pc
#elif defined(__mips__)
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.pc
+#elif defined(__hppa__)
+#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.sc_iaoq[0]
#else
#error "OVERFLOW_ADDRESS() undefined!"
#endif
diff -up ./src/linux-timer.c.org ./src/linux-timer.c
--- ./src/linux-timer.c.org 2014-06-12 16:49:06.096242651 +0200
+++ ./src/linux-timer.c 2014-06-12 16:49:35.744244649 +0200
@@ -215,7 +215,7 @@ get_cycles( void )
/* POWER get_cycles() */
/************************/
-#elif (defined(__powerpc__) || defined(__arm__) || defined(__mips__) || defined(__aarch64__))
+#elif (defined(__powerpc__) || defined(__arm__) || defined(__mips__) || defined(__aarch64__) || defined(__hppa__))
/*
* It's not possible to read the cycles from user space on ppc970.
* There is a 64-bit time-base register (TBU|TBL), but its