configure: use __ARM_ARCH to determine arm version
authorJoão Reis <reis@janeasystems.com>
Wed, 2 Dec 2015 02:37:08 +0000 (02:37 +0000)
committerJames M Snell <jasnell@gmail.com>
Wed, 23 Dec 2015 16:38:33 +0000 (08:38 -0800)
Before this change, configure used processor specific macro defines
(like __ARM_ARCH_6M__) to detect the arm processor version. This
changes configure to use __ARM_ARCH, that should be defined to the
correct version.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/4123

configure

index bfdc269..6bb85a8 100755 (executable)
--- a/configure
+++ b/configure
@@ -543,18 +543,13 @@ def cc_macros(cc=None):
 def is_arch_armv7():
   """Check for ARMv7 instructions"""
   cc_macros_cache = cc_macros()
-  return ('__ARM_ARCH_7__' in cc_macros_cache or
-          '__ARM_ARCH_7A__' in cc_macros_cache or
-          '__ARM_ARCH_7R__' in cc_macros_cache or
-          '__ARM_ARCH_7M__' in cc_macros_cache or
-          '__ARM_ARCH_7S__' in cc_macros_cache)
+  return cc_macros_cache.get('__ARM_ARCH') == '7'
 
 
 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)
+  return cc_macros_cache.get('__ARM_ARCH') == '6'
 
 
 def is_arm_hard_float_abi():