Bug 1556880 - Support GCC ARM preprocessor defines to detect the ARM target. r=chmanchester a=jcristau
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 05 Jun 2019 02:53:01 +0000
changeset 536680 aa3b94c7550a02cb7b9b23244cb62eb31af224e8
parent 536679 b3edc708cfc70665ca2bb6aea77749124e0e08ee
child 536681 aa64aae1b32d2f2a1cc1829c67da7e18c6899bd1
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester, jcristau
bugs1556880
milestone68.0
Bug 1556880 - Support GCC ARM preprocessor defines to detect the ARM target. r=chmanchester a=jcristau Also set `fpu` to None for when we don't find it. Differential Revision: https://phabricator.services.mozilla.com/D33720
build/moz.configure/arm.configure
--- a/build/moz.configure/arm.configure
+++ b/build/moz.configure/arm.configure
@@ -158,35 +158,35 @@ def arm_target(compiler, all_flags):
         %FLOAT_ABI hard
         #else
         %FLOAT_ABI softfp
         #endif
         // There is more subtlety to it than this preprocessor test, but MOZ_FPU doesn't
         // need to be too fine-grained.
         #if __ARM_NEON
         %FPU neon
-        #elif __ARM_VFPV2__
+        #elif __ARM_VFPV2__ || __ARM_FP == 12
         %FPU vfpv2
         #elif __ARM_VFPV3__
         %FPU vfpv3
-        #elif __ARM_VFPV4__
+        #elif __ARM_VFPV4__ || __ARM_FP == 14
         %FPU vfpv4
         #elif __ARM_FPV5__
         %FPU fp-armv8
         #endif
     ''')
     result = try_invoke_compiler(
         compiler.wrapper + [compiler.compiler] + compiler.flags,
         compiler.language,
         source,
         ['-E'] + all_flags,
     )
     # Metadata emitted by preprocessors such as GCC with LANG=ja_JP.utf-8 may
     # have non-ASCII characters. Treat the output as bytearray.
-    data = {}
+    data = {'fpu': None}  # fpu may not get a value from the preprocessor.
     for line in result.splitlines():
         if line.startswith(b'%'):
             k, _, v = line.partition(' ')
             k = k.lstrip('%').lower()
             if k == 'arm_arch':
                 data[k] = int(v)
             else:
                 data[k] = {