Package: icedove / 1:52.3.0-4~deb8u2

porting-hppa/FTBFS-hppa-xpcshell-segfaulting-during-make-install.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From: Christoph Goehre <chris@sigxcpu.org>
Date: Sun, 5 Mar 2017 19:02:38 -0500
Subject: FTBFS hppa: xpcshell segfaulting during 'make install'

Mozilla-Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1325495
---
 mozilla/js/src/jit/AtomicOperations.h                    |  2 ++
 mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/mozilla/js/src/jit/AtomicOperations.h b/mozilla/js/src/jit/AtomicOperations.h
index 42aee72..85cd3e7 100644
--- a/mozilla/js/src/jit/AtomicOperations.h
+++ b/mozilla/js/src/jit/AtomicOperations.h
@@ -324,6 +324,8 @@ AtomicOperations::isLockfree(int32_t size)
 # include "jit/arm/AtomicOperations-arm.h"
 #elif defined(JS_CODEGEN_ARM64)
 # include "jit/arm64/AtomicOperations-arm64.h"
+#elif defined(__hppa__)
+# include "jit/none/AtomicOperations-ppc.h"
 #elif defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
 # include "jit/mips-shared/AtomicOperations-mips-shared.h"
 #elif defined(__ppc__) || defined(__PPC__)
diff --git a/mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp b/mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
index 7353709..e988283 100644
--- a/mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
+++ b/mozilla/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
@@ -126,11 +126,21 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
 
 extern "C" nsresult SharedStub(int);
 
+#ifdef __GNUC__
 #define STUB_ENTRY(n)       \
 nsresult nsXPTCStubBase::Stub##n()  \
 {                           \
+    /* Save arg0 in its stack slot.  This assumes the frame size is 64. */ \
+    __asm__ __volatile__ ("STW %r26, -36-64(%sp)"); \
     return SharedStub(n);   \
 }
+#else
+#define STUB_ENTRY(n)       \
+nsresult nsXPTCStubBase::Stub##n()  \
+{                           \
+    return SharedStub(n);   \
+}
+#endif
 
 #define SENTINEL_ENTRY(n) \
 nsresult nsXPTCStubBase::Sentinel##n() \