File google-perftools_stacktrace_env.patch of Package google-perftools
Index: google-perftools-0.94.1/src/stacktrace.cc
===================================================================
--- google-perftools-0.94.1.orig/src/stacktrace.cc
+++ google-perftools-0.94.1/src/stacktrace.cc
@@ -81,8 +81,30 @@
# error Cannnot calculate stack trace: need libunwind (see INSTALL file)
# endif
+// The ia64 case.
+#elif defined(__ia64__) && __GNUC__ >= 2
+# if defined(HAVE_LIBUNWIND_H) // a proxy for having libunwind installed
+# define UNW_LOCAL_ONLY
+# include "stacktrace_libunwind-inl.h"
+# elif defined(__linux)
+# error Cannnot calculate stack trace: need either libunwind or frame-pointers (see INSTALL file)
+# else
+# error Cannnot calculate stack trace: need libunwind (see INSTALL file)
+# endif
+
+// The s390 case.
+#elif defined(__s390__) && __GNUC__ >= 2
+# if defined(HAVE_LIBUNWIND_H) // a proxy for having libunwind installed
+# define UNW_LOCAL_ONLY
+# include "stacktrace_libunwind-inl.h"
+# elif defined(__linux)
+# error Cannnot calculate stack trace: need either libunwind or frame-pointers (see INSTALL file)
+# else
+# error Cannnot calculate stack trace: need libunwind (see INSTALL file)
+# endif
+
// The PowerPC case
-#elif defined(__ppc__) && __GNUC__ >= 2
+#elif (defined(__ppc__) || defined(__powerpc)) && __GNUC__ >= 2
# if !defined(NO_FRAME_POINTER)
# include "stacktrace_powerpc-inl.h"
# else