summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMaciej MaƂecki <me@mmalecki.com>2014-07-23 15:24:07 +0200
committerFedor Indutny <fedor@indutny.com>2014-07-23 23:42:22 +0400
commit300dd3499c2b939e3bc3501d9b060a7b364dd5e2 (patch)
tree0f6b847cec0bf4f44a85bd499e9797b71a0b9eb1 /configure
parentea89fdfec4f7a6ff180149a5eacc3c7d84b87e39 (diff)
downloadnode-300dd3499c2b939e3bc3501d9b060a7b364dd5e2.tar.gz
gyp: fix ARM build
According to V8 changelog, `armv7` config variable was replaced by `arm_version`, with value either '7', '6' or 'default'. Detect ARMv7 and ARMv6 CPUs and default to 'default'. Signed-off-by: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 15 insertions, 1 deletions
diff --git a/configure b/configure
index c0a4ace2d..772e4e14b 100755
--- a/configure
+++ b/configure
@@ -342,6 +342,13 @@ def is_arch_armv7():
'__ARM_ARCH_7M__' in cc_macros_cache)
+def is_arch_armv6():
+ """Check for ARMv6 instructions"""
+ cc_macros_cache = cc_macros()
+ return ('__ARM_ARCH_6__' in cc_macros_cache or
+ '__ARM_ARCH_6M__' in cc_macros_cache)
+
+
def is_arm_neon():
"""Check for ARM NEON support"""
return '__ARM_NEON__' in cc_macros()
@@ -438,7 +445,14 @@ def configure_arm(o):
arm_float_abi = 'hard'
else:
arm_float_abi = 'default'
- o['variables']['armv7'] = int(is_arch_armv7())
+
+ if is_arch_armv7():
+ o['variables']['arm_version'] = '7'
+ elif is_arch_armv6():
+ o['variables']['arm_version'] = '6'
+ else:
+ o['variables']['arm_version'] = 'default'
+
o['variables']['arm_fpu'] = 'vfpv3' # V8 3.18 no longer supports VFP2.
o['variables']['arm_neon'] = int(is_arm_neon())
o['variables']['arm_thumb'] = 0 # -marm