Bug#847525: mozjs24: Please add support for m68k
Source: mozjs24
Version: 24.2.0-4
Severity: normal
Tags: patch
User: debian-68k@lists.debian.org
Usertags: m68k
Hi!
The attached patch adds platform support for m68k. This
includes adding detection for m68k in double-conversion [1]
as well as an additional alignment enforcement to 32 bits
on m68k for the JSErrorReport struct. This is necessary
because the basic alignment on m68k is 16 bits and not
32 bits.
Thanks,
Adrian
> [1] https://github.com/google/double-conversion/commit/da11179623145f53b204105a93b8bbca431141da
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Description: Upstream patch for m68k support in double-conversion
Index: mozjs24-24.2.0/mfbt/double-conversion/utils.h
===================================================================
--- mozjs24-24.2.0.orig/mfbt/double-conversion/utils.h
+++ mozjs24-24.2.0/mfbt/double-conversion/utils.h
@@ -67,6 +67,8 @@
#else
#undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
#endif // _WIN32
+#elif defined(__mc68000__)
+#undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
#else
#error Target architecture was not detected as supported by Double-Conversion.
#endif
Index: mozjs24-24.2.0/js/src/jsapi.h
===================================================================
--- mozjs24-24.2.0.orig/js/src/jsapi.h
+++ mozjs24-24.2.0/js/src/jsapi.h
@@ -4802,7 +4802,12 @@ struct JSErrorReport {
const jschar **messageArgs; /* arguments for the error message */
int16_t exnType; /* One of the JSExnType constants */
unsigned column; /* zero-based column index in line */
+
+#if !defined(__mc68000__)
};
+#else
+} __attribute__ ((aligned(4))); /* enforce 32-bit alignment on m68k */
+#endif
/*
* JSErrorReport flag values. These may be freely composed.
Reply to: