Hi Andreas,

On 08/08/2014 02:20 PM, Andreas Beckmann wrote:
> On Thu, 12 Jun 2014 17:30:36 +0200 "Helge Deller" <del...@gmx.de> wrote:
>> The attached trivial patch fixes the build on the Debian hppa/linux arch.
>> Please apply for the next version.
> 
> I'll add your patch in the 5.3.2 upload that I'm currently preparing.

Sadly the patch was wrong as I wrote already...
In configure.in it should read "parisc*", not "hppa*" so the build failed again.

> Please report this problem + patch in the upstream bugtracker, too.
> http://icl.cs.utk.edu/trac/papi/

As suggested I just opened a ticket upstream in trac: 
http://icl.cs.utk.edu/trac/papi/ticket/204

I've attached the new (fixed) hppa patch again to this mail.
Maybe you can replace the existing one with this one for the next upload?

Thanks,
Helge

Author: Helge Deller <del...@gmx.de>
Description: fix build on hppa/linux
Bug-Debian: https://bugs.debian.org/751411

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*|parisc*)
     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

Reply via email to