From fbbf691bb35af9341249a09f68f8a620b99660b1 Mon Sep 17 00:00:00 2001 From: Shigeki Ohtsu Date: Mon, 2 Mar 2015 05:12:59 +0000 Subject: [PATCH] build: fix configure for armv8 This is a patch from @rvagg in https://github.com/iojs/io.js/pull/723#issuecomment-76656259 --- configure | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure b/configure index d63232626c7d1e..604e8afe2b6222 100755 --- a/configure +++ b/configure @@ -403,6 +403,11 @@ def cc_macros(): k[key] = val return k +def is_arch_arm64(): + """Check for ARMv8-64 instructions""" + cc_macros_cache = cc_macros() + return ('__aarch64__' in cc_macros_cache) + def is_arch_armv7(): """Check for ARMv7 instructions""" @@ -439,6 +444,7 @@ def host_arch_cc(): '__x86_64__' : 'x64', '__i386__' : 'ia32', '__arm__' : 'arm', + '__aarch64__' : 'arm', '__mips__' : 'mips', } @@ -476,7 +482,10 @@ def configure_arm(o): else: arm_float_abi = 'default' - if is_arch_armv7(): + if is_arch_arm64(): + o['variables']['arm_fpu'] = 'vfpv4' + o['variables']['arm_version'] = '8' + elif is_arch_armv7(): o['variables']['arm_fpu'] = 'vfpv3' o['variables']['arm_version'] = '7' else: