Skip to content

Commit

Permalink
configure: use __ARM_ARCH to determine arm version
Browse files Browse the repository at this point in the history
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 <[email protected]>
PR-URL: #4123
  • Loading branch information
joaocgreis committed Dec 9, 2015
1 parent 0e3912b commit a7f5dfd
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -557,18 +557,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():
Expand Down

0 comments on commit a7f5dfd

Please sign in to comment.