diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2012-09-19 16:37:08 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-10-16 01:55:26 +0400 |
commit | 1205734e69df2cecce88d67aa9e6b32a843d1633 (patch) | |
tree | ee298e3a4aef4d29ee7a33747049235b1f67b056 /configure | |
parent | 28b0cc08b8c9a461c1560da52c3bc30c4e7a996b (diff) |
configure: turn on VFPv3 on ARMv7
Fixes a V8 build error caused by missing arm_fpu and arm_neon settings.
This is a back-port of commit bbf6b4e from the master branch.
Fixes #4142.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/configure b/configure index 8a2b3d645f5..cfd11aa5aec 100755 --- a/configure +++ b/configure @@ -322,6 +322,23 @@ def compiler_version(): return (version, is_clang) +def configure_arm(o): + # V8 on ARM requires that armv7 is set. CPU Model detected by + # the presence of __ARM_ARCH_7__ and the like defines in compiler + if options.arm_float_abi: + 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 + o['variables']['armv7'] = int(armv7) + + def configure_node(o): # TODO add gdb o['variables']['v8_no_strict_aliasing'] = 1 # work around compiler bugs @@ -335,15 +352,8 @@ def configure_node(o): o['variables']['host_arch'] = host_arch o['variables']['target_arch'] = target_arch - # V8 on ARM requires that armv7 is set. CPU Model detected by - # the presence of __ARM_ARCH_7__ and the like defines in compiler if target_arch == 'arm': - if options.arm_float_abi: - hard_float = options.arm_float_abi == 'hard' - else: - hard_float = arm_hard_float_abi() - o['variables']['v8_use_arm_eabi_hardfloat'] = b(hard_float) - o['variables']['armv7'] = 1 if is_arch_armv7() else 0 + configure_arm(o) cc_version, is_clang = compiler_version() o['variables']['clang'] = 1 if is_clang else 0 |