Bug 1260636 - Add endianness to host and target information. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 30 Mar 2016 14:27:40 +0900
changeset 291157 9f566ae2f1c5fc9c16969429cf9793c8465fd76d
parent 291156 dc8b68b4f67a2f2418b5e55f912a5ac5de796ac0
child 291158 2e966a1f371c9d2e4bd376202e79ea70b13d800c
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1260636
milestone48.0a1
Bug 1260636 - Add endianness to host and target information. r=ted While in the vicinity, add support for sparc64.
build/moz.configure/init.configure
old-configure.in
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -402,44 +402,63 @@ def split_triplet(triplet):
         canonical_os = canonical_kernel = 'OpenBSD'
     else:
         die('Unknown OS: %s' % os)
 
     # The CPU granularity is probably not enough. Moving more things from
     # old-configure will tell us if we need more
     if cpu.endswith('86') or (cpu.startswith('i') and '86' in cpu):
         canonical_cpu = 'x86'
-    elif cpu in ('s390', 's390x', 'x86_64', 'ia64'):
+        endianness = 'little'
+    elif cpu in ('x86_64', 'ia64'):
         canonical_cpu = cpu
+        endianness = 'little'
+    elif cpu in ('s390', 's390x'):
+        canonical_cpu = cpu
+        endianness = 'big'
     elif cpu in ('powerpc64', 'ppc64', 'powerpc64le', 'ppc64le'):
         canonical_cpu = 'ppc64'
+        endianness = 'little' if 'le' in cpu else 'big'
     elif cpu in ('powerpc', 'ppc', 'rs6000') or cpu.startswith('powerpc'):
         canonical_cpu = 'ppc'
+        endianness = 'big'
     elif cpu in ('Alpha', 'alpha', 'ALPHA'):
         canonical_cpu = 'Alpha'
+        endianness = 'little'
     elif cpu.startswith('hppa') or cpu == 'parisc':
         canonical_cpu = 'hppa'
+        endianness = 'big'
+    elif cpu.startswith('sparc64'):
+        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 ('mips', 'mipsel'):
         canonical_cpu = 'mips32'
+        endianness = 'little' if 'le' in cpu else 'big'
     elif cpu in ('mips64', 'mips64el'):
         canonical_cpu = 'mips64'
+        endianness = 'little' if 'le' in cpu else 'big'
     elif cpu.startswith('aarch64'):
         canonical_cpu = 'aarch64'
+        endianness = 'little'
     else:
         canonical_cpu = cpu
+        endianness = 'unknown'
 
     return namespace(
         alias=triplet,
         cpu=canonical_cpu,
         kernel=canonical_kernel,
         os=canonical_os,
+        endianness=endianness,
         raw_cpu=cpu,
         raw_os=os,
     )
 
 
 @imports('subprocess')
 def config_sub(shell, triplet):
     config_sub = os.path.join(os.path.dirname(__file__), '..',
--- a/old-configure.in
+++ b/old-configure.in
@@ -6912,17 +6912,17 @@ dnl ====================================
 if test "$MOZ_ENABLE_SKIA"; then
   SKIA_INCLUDES="/gfx/skia /gfx/skia/skia/include/config /gfx/skia/skia/include/core"
   AC_DEFINE(MOZ_ENABLE_SKIA)
   AC_DEFINE(USE_SKIA)
   if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then
     AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK)
   fi
 
-  if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then
+  if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a "${CPU_ARCH}" != "sparc64" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then
     SKIA_INCLUDES="$SKIA_INCLUDES /gfx/skia/skia/include/gpu /gfx/skia/skia/include/utils"
     MOZ_ENABLE_SKIA_GPU=1
     AC_DEFINE(USE_SKIA_GPU)
     AC_SUBST(MOZ_ENABLE_SKIA_GPU)
   fi
 fi
 AC_SUBST(MOZ_ENABLE_SKIA)
 AC_SUBST_LIST(SKIA_INCLUDES)