Fix build on hppa
authorJohn David Anglin <dave.anglin@bell.net>
Tue, 9 Feb 2021 19:41:06 +0000 (19:41 +0000)
committerBenjamin Barenblat <bbaren@debian.org>
Tue, 9 Feb 2021 19:41:06 +0000 (19:41 +0000)
Bug-Debian: https://bugs.debian.org/971768
Reviewed-by: Benjamin Barenblat <bbaren@debian.org>
Gbp-Pq: Name fix-hppa.diff

absl/base/internal/direct_mmap.h
absl/debugging/internal/examine_stack.cc

index 16accf0966046456a4eef288d9a28642e56f3dd6..f389d3ebcf6f7e8c0c509ef152fa4339a47bc10d 100644 (file)
@@ -74,6 +74,7 @@ namespace base_internal {
 inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
                         off64_t offset) noexcept {
 #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \
+    (defined(__hppa__) && !defined(__LP64__)) ||                             \
     (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) ||                   \
     (defined(__PPC__) && !defined(__PPC64__)) ||                             \
     (defined(__riscv) && __riscv_xlen == 32) ||                              \
index 6e5ff1fbd83674bdd380379ecf4a6d49182af599..652d8e3f4b6c4f90d2da097015e7a5bfff0e37fc 100644 (file)
@@ -48,6 +48,8 @@ void* GetProgramCounter(void* vuc) {
     return reinterpret_cast<void*>(context->uc_mcontext.pc);
 #elif defined(__arm__)
     return reinterpret_cast<void*>(context->uc_mcontext.arm_pc);
+#elif defined(__hppa__)
+    return reinterpret_cast<void*>(context->uc_mcontext.sc_iaoq[0]);
 #elif defined(__i386__)
     if (14 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs))
       return reinterpret_cast<void*>(context->uc_mcontext.gregs[14]);