From cdc399af44f560f7dd5d9b58b4be9caf1f3a7dac Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Fri, 6 Nov 2020 10:48:34 -0500 Subject: Fix build on hppa Closes: https://bugs.debian.org/971768 --- debian/changelog | 1 + debian/copyright | 4 ++++ debian/patches/fix-hppa.diff | 26 ++++++++++++++++++++++++++ debian/patches/series | 1 + 4 files changed, 32 insertions(+) create mode 100644 debian/patches/fix-hppa.diff diff --git a/debian/changelog b/debian/changelog index 48e05312..d2a7b450 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ abseil (0~20200923.2-1) UNRELEASED; urgency=medium * New upstream release. + * Fix build on hppa via patch. (Closes: #971768) -- Benjamin Barenblat Fri, 06 Nov 2020 10:39:11 -0500 diff --git a/debian/copyright b/debian/copyright index 86b38cc4..78336c12 100644 --- a/debian/copyright +++ b/debian/copyright @@ -15,6 +15,10 @@ Files: debian/* Copyright: 2020 Google LLC License: Apache-2.0 +Files: debian/patches/fix-hppa.diff +Copyright: 2020 John David Anglin +License: Apache-2.0 + License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the diff --git a/debian/patches/fix-hppa.diff b/debian/patches/fix-hppa.diff new file mode 100644 index 00000000..915efff4 --- /dev/null +++ b/debian/patches/fix-hppa.diff @@ -0,0 +1,26 @@ +From: John David Anglin +Subject: Fix build on hppa +Bug-Debian: https://bugs.debian.org/971768 +Reviewed-by: Benjamin Barenblat + +--- a/absl/base/internal/direct_mmap.h ++++ b/absl/base/internal/direct_mmap.h +@@ -74,6 +74,7 @@ + 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) || \ +--- a/absl/debugging/internal/examine_stack.cc ++++ b/absl/debugging/internal/examine_stack.cc +@@ -48,6 +48,8 @@ + return reinterpret_cast(context->uc_mcontext.pc); + #elif defined(__arm__) + return reinterpret_cast(context->uc_mcontext.arm_pc); ++#elif defined(__hppa__) ++ return reinterpret_cast(context->uc_mcontext.sc_iaoq[0]); + #elif defined(__i386__) + if (14 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) + return reinterpret_cast(context->uc_mcontext.gregs[14]); diff --git a/debian/patches/series b/debian/patches/series index dbd8a0ad..481e6995 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ configure.diff +fix-hppa.diff -- cgit v1.2.3