[PATCH] Fix build error on ia64

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Fix build error on ia64

Emanuele Rocca
Patch originally sent by Jason Duerstock <[hidden email]> to
fix Debian bug #884007: https://bugs.debian.org/884007
---
 includes/sys/sdt.h            | 2 ++
 python/HelperSDT/_HelperSDT.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git includes/sys/sdt.h includes/sys/sdt.h
index d1d10a658..a6078e8c4 100644
--- includes/sys/sdt.h
+++ includes/sys/sdt.h
@@ -86,6 +86,8 @@
 # ifndef STAP_SDT_ARG_CONSTRAINT
 # if defined __powerpc__
 # define STAP_SDT_ARG_CONSTRAINT        nZr
+# elif defined __ia64__
+# define STAP_SDT_ARG_CONSTRAINT        nr
 # else
 # define STAP_SDT_ARG_CONSTRAINT        nor
 # endif
diff --git python/HelperSDT/_HelperSDT.c python/HelperSDT/_HelperSDT.c
index 967cb6077..0f76abd8a 100644
--- python/HelperSDT/_HelperSDT.c
+++ python/HelperSDT/_HelperSDT.c
@@ -236,7 +236,11 @@ init_HelperSDT(void)
  // it with the asm() statement. Otherwise we get a @GOTPCREL
  // reference which stap can't parse.
  void *fptr = &PyObject_GenericGetAttr;
+#ifdef __ia64__
+ asm ("nop 0" : "=r"(fptr) : "r"(fptr));
+#else
  asm ("nop" : "=r"(fptr) : "r"(fptr));
+#endif
  STAP_PROBE2(PROVIDER, Init, stap_module, fptr);
     }
     return module;
--
2.27.0

Reply-To: