Bug 1325771 - build: Add m68k as target architecture to mozbuild r=glandium
☠☠ backed out by c593e06b6cf4 ☠ ☠
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Tue, 02 Jun 2020 07:00:48 +0000
changeset 597813 393a6ff847ce341fbe0e86f1bccfbea5ed8c3157
parent 597812 02f8daecd98e4aaeb0eb2101725b49bd515764f9
child 597814 24e6299e112dac7dc5891a1d61abc3e4dbbbb689
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1325771
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1325771 - build: Add m68k as target architecture to mozbuild r=glandium Adds the basic definitions for m68k to mozbuild, allowing to build Spidermonkey. Differential Revision: https://phabricator.services.mozilla.com/D77285
build/moz.configure/init.configure
python/mozbuild/mozbuild/configure/constants.py
python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -727,16 +727,19 @@ def split_triplet(triplet, allow_msvc=Fa
         canonical_cpu = 'sparc64'
         endianness = 'big'
     elif cpu.startswith('sparc') or cpu == 'sun4u':
         canonical_cpu = 'sparc'
         endianness = 'big'
     elif cpu.startswith('arm'):
         canonical_cpu = 'arm'
         endianness = 'big' if cpu.startswith(('armeb', 'armbe')) else 'little'
+    elif cpu in ('m68k'):
+        canonical_cpu = 'm68k'
+        endianness = 'big'
     elif cpu in ('mips', 'mipsel'):
         canonical_cpu = 'mips32'
         endianness = 'little' if 'el' in cpu else 'big'
     elif cpu in ('mips64', 'mips64el'):
         canonical_cpu = 'mips64'
         endianness = 'little' if 'el' in cpu else 'big'
     elif cpu.startswith('aarch64'):
         canonical_cpu = 'aarch64'
--- a/python/mozbuild/mozbuild/configure/constants.py
+++ b/python/mozbuild/mozbuild/configure/constants.py
@@ -40,16 +40,17 @@ Kernel = EnumString.subclass(
 )
 
 CPU_bitness = {
     'aarch64': 64,
     'Alpha': 64,
     'arm': 32,
     'hppa': 32,
     'ia64': 64,
+    'm68k': 32,
     'mips32': 32,
     'mips64': 64,
     'ppc': 32,
     'ppc64': 64,
     's390': 32,
     's390x': 64,
     'sh4': 32,
     'sparc': 32,
@@ -80,16 +81,17 @@ CPU_preprocessor_checks = OrderedDict((
     ('s390x', '__s390x__'),
     ('s390', '__s390__'),
     ('ppc64', '__powerpc64__'),
     ('ppc', '__powerpc__'),
     ('Alpha', '__alpha__'),
     ('hppa', '__hppa__'),
     ('sparc64', '__sparc__ && __arch64__'),
     ('sparc', '__sparc__'),
+    ('m68k', '__m68k__'),
     ('mips64', '__mips64'),
     ('mips32', '__mips__'),
     ('sh4', '__sh__'),
 ))
 
 assert sorted(CPU_preprocessor_checks.keys()) == sorted(CPU.POSSIBLE_VALUES)
 
 kernel_preprocessor_checks = {
--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
@@ -1196,16 +1196,19 @@ class LinuxCrossCompileToolchainTest(Bas
         'sparc-unknown-linux-gnu': big_endian + {
             None: {
                 '__sparc__': 1,
             },
             '-m64': {
                 '__arch64__': 1,
             },
         },
+        'm68k-unknown-linux-gnu': big_endian + {
+            '__m68k__': 1,
+        },
         'mips64-unknown-linux-gnuabi64': big_endian + {
             '__mips64': 1,
             '__mips__': 1,
         },
         'mips-unknown-linux-gnu': big_endian + {
             '__mips__': 1,
         },
         'sh4-unknown-linux-gnu': little_endian + {