configure: turn on VFPv3 on ARMv7

Fixes a V8 build error caused by missing arm_fpu and arm_neon settings.
pull/24504/head
Ben Noordhuis 2012-09-19 14:37:08 +02:00
parent c4aedf8a2a
commit bbf6b4ecbb
1 changed files with 18 additions and 8 deletions

26
configure vendored
View File

@ -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
@ -334,15 +351,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