Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
configure: turn on VFPv3 on ARMv7
Fixes a V8 build error caused by missing arm_fpu and arm_neon settings.
  • Loading branch information
bnoordhuis committed Sep 19, 2012
1 parent c4aedf8 commit bbf6b4e
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions configure
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit bbf6b4e

Please sign in to comment.