Bug#849838: firefox: Fix broken hppa build support
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Sun Jan 1 01:11:35 UTC 2017
Source: firefox
Version: 50.1.0-1
Severity: normal
Tags: patch
User: debian-hppa at lists.debian.org
Usertags: hppa
Hi!
Firefox currently fails to build from source on hppa due to a bug
in the xpcom code. The resulting crash happens during 'make install':
resource://gre/components/Push.js
resource://gre/components/PushComponents.js
resource://gre/components/PushServiceHandler.js
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/toolkit/mozapps/installer/packager.py", line 415, in <module>
main()
File "/<<PKGBUILDDIR>>/toolkit/mozapps/installer/packager.py", line 409, in main
args.source, gre_path, base)
File "/<<PKGBUILDDIR>>/toolkit/mozapps/installer/packager.py", line 166, in precompile_cache
errors.fatal('Error while running startup cache precompilation')
File "/<<PKGBUILDDIR>>/python/mozbuild/mozpack/errors.py", line 103, in fatal
self._handle(self.FATAL, msg)
File "/<<PKGBUILDDIR>>/python/mozbuild/mozpack/errors.py", line 98, in _handle
raise ErrorMessage(msg)
mozpack.errors.ErrorMessage: Error: Error while running startup cache precompilation
The attached patch fixes the problem by fixing the hppa-specific xpcom
code. Furthermore, it enables the PowerPC atomic operations for hppa
as these are generic enough to be used on other targets as well.
Thanks,
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz at debian.org
`. `' Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
-------------- next part --------------
Description: Fix build on hppa
Author: John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
Forwarded: https://bugzilla.mozilla.org/show_bug.cgi?id=1325495
Last-Update: 2017-01-01
Index: firefox-50.1.0/js/src/jit/AtomicOperations.h
===================================================================
--- firefox-50.1.0.orig/js/src/jit/AtomicOperations.h
+++ firefox-50.1.0/js/src/jit/AtomicOperations.h
@@ -324,6 +324,8 @@ AtomicOperations::isLockfree(int32_t siz
# 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__)
Index: firefox-50.1.0/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
===================================================================
--- firefox-50.1.0.orig/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
+++ firefox-50.1.0/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
@@ -126,11 +126,20 @@ PrepareAndDispatch(nsXPTCStubBase* self,
extern "C" nsresult SharedStub(int);
+#ifdef __GNUC__
#define STUB_ENTRY(n) \
nsresult nsXPTCStubBase::Stub##n() \
{ \
+ __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() \
More information about the pkg-mozilla-maintainers
mailing list