Source: google-perftools
Version: 2.18.1-1
Severity: normal
Tags: ftbfs patch
User: [email protected]
Usertags: alpha
google-perftools FTBFS on Alpha due to missing architecture support.
I attach a patch that provides architecture support for Alpha. With
that, google-perftools builds to completion on Alpha.
Cheers,
Michael.
--- a/src/base/basictypes.h
+++ b/src/base/basictypes.h
@@ -168,6 +168,8 @@
# define CACHELINE_ALIGNED __attribute__((aligned(64)))
# elif defined(__sparcv9) || defined(__sparcv9__)
# define CACHELINE_ALIGNED __attribute__((aligned(64)))
+# elif defined(__alpha) || defined(__alpha__)
+# define CACHELINE_ALIGNED __attribute__((aligned(64)))
# else
# error Could not determine cache line length - unknown architecture
# endif
--- a/src/gen_getpc.rb
+++ b/src/gen_getpc.rb
@@ -44,6 +44,7 @@
d.field "sc_ip", "Linux/ia64"
d.field "__pc", "Linux/loongarch64"
d.field "pc", "Linux/{mips,aarch64}"
+ d.field "sc_pc", "Linux/alpha"
d.ifdef :PT_NIP, "uc_regs->gregs[PT_NIP]", "Linux/ppc"
d.ifdef :PT_NIP, "gp_regs[PT_NIP]", "Linux/ppc"
d.ifdef :REG_PC, "__gregs[REG_PC]", "Linux/riscv"
--- a/src/getpc-inl.h
+++ b/src/getpc-inl.h
@@ -131,6 +131,18 @@
}
};
+// Linux/alpha
+template <class U, class P, class = void>
+struct get_1ff18906 : public P {
+};
+template <class U, class P>
+struct get_1ff18906<U, P, void_t<decltype(((U*){})->uc_mcontext.sc_pc)>> : public P {
+ static void* Get(const U* uc) {
+ // Linux/alpha
+ return (void*)(uc->uc_mcontext.sc_pc);
+ }
+};
+
// Linux/ppc
template <class U, class P, class = void>
struct get_d0eeceae : public P {
@@ -376,8 +388,10 @@
using g_a81f6801 = get_a81f6801<ucontext_t, g_24e794ef>;
// Linux/ppc (with #ifdef PT_NIP)
using g_d0eeceae = get_d0eeceae<ucontext_t, g_a81f6801>;
+ // Linux/alpha
+ using g_1ff18906 = get_1ff18906<ucontext_t, g_d0eeceae>;
// Linux/{mips,aarch64}
- using g_b94b7246 = get_b94b7246<ucontext_t, g_d0eeceae>;
+ using g_b94b7246 = get_b94b7246<ucontext_t, g_1ff18906>;
// Linux/loongarch64
using g_4e9b682d = get_4e9b682d<ucontext_t, g_b94b7246>;
// Linux/ia64