Skip to content

Commit bbf6b4e

Browse files
committed
configure: turn on VFPv3 on ARMv7
Fixes a V8 build error caused by missing arm_fpu and arm_neon settings.
1 parent c4aedf8 commit bbf6b4e

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

configure

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,23 @@ def compiler_version():
322322
return (version, is_clang)
323323

324324

325+
def configure_arm(o):
326+
# V8 on ARM requires that armv7 is set. CPU Model detected by
327+
# the presence of __ARM_ARCH_7__ and the like defines in compiler
328+
if options.arm_float_abi:
329+
hard_float = options.arm_float_abi == 'hard'
330+
else:
331+
hard_float = arm_hard_float_abi()
332+
o['variables']['v8_use_arm_eabi_hardfloat'] = b(hard_float)
333+
334+
armv7 = is_arch_armv7()
335+
if armv7:
336+
# CHECKME VFPv3 implies ARMv7+ but is the reverse true as well?
337+
o['variables']['arm_fpu'] = 'vfpv3'
338+
o['variables']['arm_neon'] = 0
339+
o['variables']['armv7'] = int(armv7)
340+
341+
325342
def configure_node(o):
326343
# TODO add gdb
327344
o['variables']['v8_no_strict_aliasing'] = 1 # work around compiler bugs
@@ -334,15 +351,8 @@ def configure_node(o):
334351
o['variables']['host_arch'] = host_arch
335352
o['variables']['target_arch'] = target_arch
336353

337-
# V8 on ARM requires that armv7 is set. CPU Model detected by
338-
# the presence of __ARM_ARCH_7__ and the like defines in compiler
339354
if target_arch == 'arm':
340-
if options.arm_float_abi:
341-
hard_float = options.arm_float_abi == 'hard'
342-
else:
343-
hard_float = arm_hard_float_abi()
344-
o['variables']['v8_use_arm_eabi_hardfloat'] = b(hard_float)
345-
o['variables']['armv7'] = 1 if is_arch_armv7() else 0
355+
configure_arm(o)
346356

347357
cc_version, is_clang = compiler_version()
348358
o['variables']['clang'] = 1 if is_clang else 0

0 commit comments

Comments
 (0)