# HG changeset patch # User Mike Hommey # Date 1559703181 0 # Node ID 7f00cff63f590fa922a3b54731c534f24895a7a8 # Parent 11427e893b96e3342f524b80e6bcbac7e4200499 Bug 1556880 - Support GCC ARM preprocessor defines to detect the ARM target. r=chmanchester Also set `fpu` to None for when we don't find it. Differential Revision: https://phabricator.services.mozilla.com/D33720 diff --git a/build/moz.configure/arm.configure b/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] = {