• Bug#859508: thunderbird: Please add build support for sh4

    From John Paul Adrian Glaubitz@21:1/5 to All on Tue Apr 4 17:00:02 2017
    XPost: linux.debian.bugs.dist

    This is a multi-part MIME message sent by reportbug.


    Source: icedove
    Version: 1:45.8.0-3
    Severity: normal
    Tags: patch
    User: debian-superh@lists.debian.org
    Usertags: sh4

    Hi!

    The attached patch adds build support for Thunderbird 45.x for SuperH
    (sh4). Most of the changes contained in this patch have already been
    merged upstream (upstream commit are mentioned in the patch), the only
    part not merged upstream yet is the SH-specific XPCOM code [1] which
    is also currently part of Debian's Thunderbird package in the patch "Add-xptcall-support-for-SH4-processors.patch".

    Since the version of the patch that the Debian package is currently
    shipping is outdated and does not actually work, I have requested
    the removal of this patch in #859362 [2].

    Please let me know when you need help with any of the patches I sent
    in. I'm happy to provide updated patches for newer Thunderbird versions
    if necessary.

    Thanks,
    Adrian

    [1] https://bugzilla.mozilla.org/show_bug.cgi?id=382214
    [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859362

    --
    .''`. 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: Add sh4 support to Thunderbird
    Cherry-picked and adapted patches from Firefox upstream:
    - b179235c38eb631286f9e2fd4a7b23361dbab6d2
    Bug 1329194 - js:jit: Use PowerPC atomic operations on SH.
    - ba58645c87ed7e08b16adc3b40f0c6e3b6a2e140
    Bug 1329194 - mfbt:tests: Define RETURN_INSTR for SH in TestPoisonArea.
    - 942df3d3a4a1db3d182e97c54fb1705c50128470
    Bug 1329194 - ipc:chromium: Add platform defines for SH.
    - 85ae466ed90b3a0cac396aed24722ce4d0febb31
    Bug 1329194 - media:webrtc: Add platform defines for SH.
    - 5a74d13630a969473f72a143f37728f5bb87f552
    Bug 1329194 - mozbuild: Add SH4 as target architecture.
    - (not committed upstream yet)
    Bug 382214 - xpcom: Add xptcall support for Linux/SH
    - (not committed upstream yet)
    Bug 382214 - xpcom: Make SH xpctcall inline assembly position-independent Author: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    Last-Update: 2017-04-04

    --- icedove-45.8.0.orig/mozilla/ipc/chromium/src/build/build_config.h
    +++ icedove-45.8.0/mozilla/ipc/chromium/src/build/build_config.h
    @@ -106,6 +106,9 @@
    #elif defined(__s390__)
    #define ARCH_CPU_S390 1
    #define ARCH_CPU_32_BITS 1
    +#elif defined(__sh__)
    +#define ARCH_CPU_SH 1
    +#define ARCH_CPU_32_BITS 1
    #elif defined(__alpha__)
    #define ARCH_CPU_ALPHA 1
    #define ARCH_CPU_64_BITS 1
    --- icedove-45.8.0.orig/mozilla/js/src/jit/AtomicOperations.h
    +++ icedove-45.8.0/mozilla/js/src/jit/AtomicOperations.h
    @@ -306,6 +306,8 @@ AtomicOperations::isLockfree(int32_t siz
    || defined(__ppc64le__) || defined(__PPC64LE__) \
    || defined(__ppc__) || defined(__PPC__)
    # include "jit/none/AtomicOperations-ppc.h"
    +#elif defined(__sh__)
    +# include "jit/none/AtomicOperations-ppc.h"
    #elif defined(JS_CODEGEN_NONE)
    # include "jit/none/AtomicOperations-none.h"
    #elif defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
    --- icedove-45.8.0.orig/mozilla/media/webrtc/trunk/build/build_config.h
    +++ icedove-