Skip to content

Commit fbbf691

Browse files
author
Shigeki Ohtsu
committed
build: fix configure for armv8
This is a patch from @rvagg in nodejs#723 (comment)
1 parent e9b5f84 commit fbbf691

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

configure

+10-1
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,11 @@ def cc_macros():
403403
k[key] = val
404404
return k
405405

406+
def is_arch_arm64():
407+
"""Check for ARMv8-64 instructions"""
408+
cc_macros_cache = cc_macros()
409+
return ('__aarch64__' in cc_macros_cache)
410+
406411

407412
def is_arch_armv7():
408413
"""Check for ARMv7 instructions"""
@@ -439,6 +444,7 @@ def host_arch_cc():
439444
'__x86_64__' : 'x64',
440445
'__i386__' : 'ia32',
441446
'__arm__' : 'arm',
447+
'__aarch64__' : 'arm',
442448
'__mips__' : 'mips',
443449
}
444450

@@ -476,7 +482,10 @@ def configure_arm(o):
476482
else:
477483
arm_float_abi = 'default'
478484

479-
if is_arch_armv7():
485+
if is_arch_arm64():
486+
o['variables']['arm_fpu'] = 'vfpv4'
487+
o['variables']['arm_version'] = '8'
488+
elif is_arch_armv7():
480489
o['variables']['arm_fpu'] = 'vfpv3'
481490
o['variables']['arm_version'] = '7'
482491
else:

0 commit comments

Comments
 (0)