Bug#859271: closed by Carsten Schoenert <c.schoen...@t-online.de> (Bug#859271: fixed in icedove 1:52.1.1-1)

2017-06-07 Thread John Paul Adrian Glaubitz
On Tue, Jun 06, 2017 at 10:33:14PM +0200, John Paul Adrian Glaubitz wrote:
> Updated patch attached. The sh4 needs another update, too.

Second update. The current patch missed another hunk [1].

Attaching an updated patch which I just verified to work (except that
it fails at:

Executing /<>/obj-thunderbird/dist/bin/xpcshell -g
/<>/obj-thunderbird/dist/bin/ -a
/<>/obj-thunderbird/dist/bin/ -f /<>
/mozilla/toolkit/mozapps/installer/precompile_cache.js -e 
precompile_startupcache("resource://gre/");

But that's expected as this happens on many of the other architectures
as well and is therefore unrelated to this patch.

Adrian

> [1] 
> https://github.com/glaubitz/gecko-dev/commit/e820770f9e5df12e984e1ae533f39d223f825402

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
From: John Paul Adrian Glaubitz 
Date: Wed, 7 Jun 2017 15:42:19 +0200
Subject: Add m68k support to Thunderbird

Origin: not yet exist
Bug-Debian: https://bugs.debian.org/859271
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1325771
Applied-Upstream: TBD

All patches have been reviewed by positively by upstream with the
exception of the alignment fixes where upstream wants to use a
C++11 solution instead of the other suggestions I made. This patch
currently uses __attribute__((aligned(4))) to ensure the alignment
is at least 4 bytes. This method is safe and works on gcc and clang
and unlike the suggested alignas() from C++11 does not break on
architectures which require stricter alignment (e.g. alignas(4)
would break on x86_64 while __attribute__((aligned(4))) does not
as it still allows for 8 bytes alignment.

Cherry-picked and adapted patches from Firefox upstream:
- 21dd417b4f192e1377ff0f7affdf035f7b5828c1
  Bug 1325771 - Add m68k as target architecture to mozbuild
- a31a2d92cf9a2f4e9ad2d12cb74f96579f54fa5e
  Bug 1325771 - layout:style: Make sure nsCSSValue has at least 4 bytes alignment
- b65c6cf80f7038f47c7f5d223a6528d4aa4538cf
  Bug 1325771 - js:src: Make sure shadow::Shape has at least 4 bytes alignment
- cbbe025c5034cfa28aa2a8a4e557f9a066ddd013
  Bug 1325771 - js:src: Make sure Cell has at least 4 bytes alignment
- 6441fad686d30230a6842a6432bc134ca20c4125
  Bug 1325771 - js:jit: Use 'Feeling Lucky' atomic operations on m68k
- ec66da836071ec0f05a3517947c8e1a68620c399
  Bug 1325771 - mfbt:tests: Handle targets with less strict alignment in TestPair
- 48f3a6331cad497b933dc6e197f7a006b9189290
  Bug 1325771 - ipc:chromium: Add platform defines for m68k
- 26cd64f37741d85bc13c19bc55e3c6e26da59052
  Bug 1325771 - media:webrtc: Add platform defines for m68k
- bd19fe85678f948f60caa864a2af28c3c39059c7
  Bug 1325771 - mfbt:tests: Define RETURN_INSTR for m68k in TestPoisonArea
- a3e704b48760e3d45d20fc6bb13282d3285ba6bb
  Bug 1325771 - xpcom: Fix type of result in NS_InvokeByIndex on Linux/m68k
- 174cfc890291778d12241c9a4cfc25ea85fdd3a0
  Bug 1325771 - xpcom: Fix syntax error in PrepareAndDispatch on Linux/m68k
Additional changes:
- Add defines for m68k to double-conversion library
- Make sure Cell, shadow::Shape and nsCSSValue have least 4 bytes alignment

Index: icedove-52.1.1/mozilla/build/moz.configure/init.configure
===
--- icedove-52.1.1.orig/mozilla/build/moz.configure/init.configure
+++ icedove-52.1.1/mozilla/build/moz.configure/init.configure
@@ -380,6 +380,9 @@ def split_triplet(triplet):
 elif cpu.startswith('aarch64'):
 canonical_cpu = 'aarch64'
 endianness = 'little'
+elif cpu in ('m68k'):
+canonical_cpu = 'm68k'
+endianness = 'big'
 else:
 die('Unknown CPU type: %s' % cpu)
 
Index: icedove-52.1.1/mozilla/python/mozbuild/mozbuild/configure/constants.py
===
--- icedove-52.1.1.orig/mozilla/python/mozbuild/mozbuild/configure/constants.py
+++ icedove-52.1.1/mozilla/python/mozbuild/mozbuild/configure/constants.py
@@ -44,6 +44,7 @@ CPU_bitness = {
 'arm': 32,
 'hppa': 32,
 'ia64': 64,
+'m68k': 32,
 'mips32': 32,
 'mips64': 64,
 'ppc': 32,
@@ -85,6 +86,7 @@ CPU_preprocessor_checks = OrderedDict((
 ('sparc', '__sparc__'),
 ('mips64', '__mips64'),
 ('mips32', '__mips__'),
+('m68k', '__m68k__'),
 ))
 
 assert sorted(CPU_preprocessor_checks.keys()) == sorted(CPU.POSSIBLE_VALUES)
Index: icedove-52.1.1/mozilla/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
===
--- icedove-52.1.1.orig/mozilla/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+++ icedove-52.1.1/mozilla/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
@@ -1037,6 +1037,9 @@ class LinuxCrossCompileToolchainTest(Bas
 'mips-unknown-linux-gnu': 

Bug#859271: closed by Carsten Schoenert <c.schoen...@t-online.de> (Bug#859271: fixed in icedove 1:52.1.1-1)

2017-06-06 Thread John Paul Adrian Glaubitz
On 06/06/2017 09:33 PM, John Paul Adrian Glaubitz wrote:
> The necessary patch is this one [1]. I will send an updated patch for
> Thunderbird shortly.

Updated patch attached. The sh4 needs another update, too.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
From: John Paul Adrian Glaubitz 
Date: Tue, 6 Jun 2017 22:30:27 +0200
Subject: Add m68k support to Thunderbird

Origin: not yet exist
Bug-Debian: https://bugs.debian.org/859271
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1325771
Applied-Upstream: TBD

All patches have been reviewed by positively by upstream with the
exception of the alignment fixes where upstream wants to use a
C++11 solution instead of the other suggestions I made. This patch
currently uses __attribute__((aligned(4))) to ensure the alignment
is at least 4 bytes. This method is safe and works on gcc and clang
and unlike the suggested alignas() from C++11 does not break on
architectures which require stricter alignment (e.g. alignas(4)
would break on x86_64 while __attribute__((aligned(4))) does not
as it still allows for 8 bytes alignment.

Cherry-picked and adapted patches from Firefox upstream:
- 21dd417b4f192e1377ff0f7affdf035f7b5828c1
  Bug 1325771 - Add m68k as target architecture to mozbuild
- a31a2d92cf9a2f4e9ad2d12cb74f96579f54fa5e
  Bug 1325771 - layout:style: Make sure nsCSSValue has at least 4 bytes alignment
- b65c6cf80f7038f47c7f5d223a6528d4aa4538cf
  Bug 1325771 - js:src: Make sure shadow::Shape has at least 4 bytes alignment
- cbbe025c5034cfa28aa2a8a4e557f9a066ddd013
  Bug 1325771 - js:src: Make sure Cell has at least 4 bytes alignment
- 6441fad686d30230a6842a6432bc134ca20c4125
  Bug 1325771 - js:jit: Use 'Feeling Lucky' atomic operations on m68k
- ec66da836071ec0f05a3517947c8e1a68620c399
  Bug 1325771 - mfbt:tests: Handle targets with less strict alignment in TestPair
- 48f3a6331cad497b933dc6e197f7a006b9189290
  Bug 1325771 - ipc:chromium: Add platform defines for m68k
- 26cd64f37741d85bc13c19bc55e3c6e26da59052
  Bug 1325771 - media:webrtc: Add platform defines for m68k
- bd19fe85678f948f60caa864a2af28c3c39059c7
  Bug 1325771 - mfbt:tests: Define RETURN_INSTR for m68k in TestPoisonArea
- a3e704b48760e3d45d20fc6bb13282d3285ba6bb
  Bug 1325771 - xpcom: Fix type of result in NS_InvokeByIndex on Linux/m68k
- 174cfc890291778d12241c9a4cfc25ea85fdd3a0
  Bug 1325771 - xpcom: Fix syntax error in PrepareAndDispatch on Linux/m68k
Additional changes:
- Add defines for m68k to double-conversion library
- Make sure both "struct Class" and "struct JSClass" have at
  least 4 bytes alignment

Index: icedove-52.1.1/mozilla/build/moz.configure/init.configure
===
--- icedove-52.1.1.orig/mozilla/build/moz.configure/init.configure
+++ icedove-52.1.1/mozilla/build/moz.configure/init.configure
@@ -380,6 +380,9 @@ def split_triplet(triplet):
 elif cpu.startswith('aarch64'):
 canonical_cpu = 'aarch64'
 endianness = 'little'
+elif cpu in ('m68k'):
+canonical_cpu = 'm68k'
+endianness = 'big'
 else:
 die('Unknown CPU type: %s' % cpu)
 
Index: icedove-52.1.1/mozilla/python/mozbuild/mozbuild/configure/constants.py
===
--- icedove-52.1.1.orig/mozilla/python/mozbuild/mozbuild/configure/constants.py
+++ icedove-52.1.1/mozilla/python/mozbuild/mozbuild/configure/constants.py
@@ -44,6 +44,7 @@ CPU_bitness = {
 'arm': 32,
 'hppa': 32,
 'ia64': 64,
+'m68k': 32,
 'mips32': 32,
 'mips64': 64,
 'ppc': 32,
@@ -85,6 +86,7 @@ CPU_preprocessor_checks = OrderedDict((
 ('sparc', '__sparc__'),
 ('mips64', '__mips64'),
 ('mips32', '__mips__'),
+('m68k', '__m68k__'),
 ))
 
 assert sorted(CPU_preprocessor_checks.keys()) == sorted(CPU.POSSIBLE_VALUES)
Index: icedove-52.1.1/mozilla/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
===
--- icedove-52.1.1.orig/mozilla/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+++ icedove-52.1.1/mozilla/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
@@ -1037,6 +1037,9 @@ class LinuxCrossCompileToolchainTest(Bas
 'mips-unknown-linux-gnu': big_endian + {
 '__mips__': 1,
 },
+'m68k-unknown-linux-gnu': big_endian + {
+'__m68k__': 1,
+},
 }
 
 PLATFORMS['powerpc64le-unknown-linux-gnu'] = \
Index: icedove-52.1.1/mozilla/ipc/chromium/src/build/build_config.h
===
--- icedove-52.1.1.orig/mozilla/ipc/chromium/src/build/build_config.h
+++ icedove-52.1.1/mozilla/ipc/chromium/src/build/build_config.h
@@ -78,6 +78,9 @@
 

Bug#859271: closed by Carsten Schoenert <c.schoen...@t-online.de> (Bug#859271: fixed in icedove 1:52.1.1-1)

2017-06-06 Thread John Paul Adrian Glaubitz
Control: reopen -1

Unfortunately, the current patch for m68k is incomplete for Thunderbird 52,
so the patch does not fully add m68k support.

The mozilla52 platform used in Thunderbird 52 makes more extensive use of
the Python build system and currently, m68k is unknown to the build system:

checking for a shell... /bin/sh
checking for host system type...
ERROR: Unknown CPU type: m68k
*** Fix above errors and then restart with\
   "/usr/bin/make -f client.mk build"
client.mk:360: recipe for target 'configure' failed
make[2]: *** [configure] Error 1

The necessary patch is this one [1]. I will send an updated patch for
Thunderbird shortly.

Adrian

> [1] 
> https://github.com/glaubitz/gecko-dev/commit/21dd417b4f192e1377ff0f7affdf035f7b5828c1

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913