Permalink
Browse files

configure: on ARM, always define the "arm_fpu" and "arm_neon" variables

v8's common.gypi file expects them to be defined now.
See: #4534
  • Loading branch information...
1 parent a6756a2 commit 4f4c5a08be2456273f5e21feb340a22953f65b8a @TooTallNate committed Jan 10, 2013
Showing with 12 additions and 3 deletions.
  1. +12 −3 configure
View
@@ -336,6 +336,11 @@ def is_arch_armv7():
'__ARM_ARCH_7M__' in cc_macros_cache)
+def is_arm_neon():
+ """Check for ARM NEON support"""
+ return '__ARM_NEON__' in cc_macros()
+
+
def arm_hard_float_abi():
"""Check for hardfloat or softfloat eabi on ARM"""
# GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify
@@ -422,13 +427,17 @@ def configure_arm(o):
hard_float = options.arm_float_abi == 'hard'
else:
hard_float = arm_hard_float_abi()
- o['variables']['v8_use_arm_eabi_hardfloat'] = b(hard_float)
armv7 = is_arch_armv7()
if armv7:
# CHECKME VFPv3 implies ARMv7+ but is the reverse true as well?
- o['variables']['arm_fpu'] = 'vfpv3'
- o['variables']['arm_neon'] = 0
+ fpu = 'vfpv3'
+ else:
+ fpu = 'vfpv2'
bnoordhuis
bnoordhuis Jan 10, 2013

Oh, you could perhaps fold this into a single line ternary.

+
+ o['variables']['v8_use_arm_eabi_hardfloat'] = b(hard_float)
+ o['variables']['arm_neon'] = int(is_arm_neon())
+ o['variables']['arm_fpu'] = fpu
o['variables']['armv7'] = int(armv7)

2 comments on commit 4f4c5a0

LGTM. 1st line of the commit log should be 50 chars max, though.

Owner

Thanks for reviewing. Landed in b916774.

Please sign in to comment.