Skip to content

Commit 88c17f8

Browse files
committed
configure: use __ARM_ARCH to determine arm version
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
1 parent d1b51bd commit 88c17f8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

configure

+2-7
Original file line numberDiff line numberDiff line change
@@ -543,18 +543,13 @@ def cc_macros(cc=None):
543543
def is_arch_armv7():
544544
"""Check for ARMv7 instructions"""
545545
cc_macros_cache = cc_macros()
546-
return ('__ARM_ARCH_7__' in cc_macros_cache or
547-
'__ARM_ARCH_7A__' in cc_macros_cache or
548-
'__ARM_ARCH_7R__' in cc_macros_cache or
549-
'__ARM_ARCH_7M__' in cc_macros_cache or
550-
'__ARM_ARCH_7S__' in cc_macros_cache)
546+
return cc_macros_cache.get('__ARM_ARCH') == '7'
551547

552548

553549
def is_arch_armv6():
554550
"""Check for ARMv6 instructions"""
555551
cc_macros_cache = cc_macros()
556-
return ('__ARM_ARCH_6__' in cc_macros_cache or
557-
'__ARM_ARCH_6M__' in cc_macros_cache)
552+
return cc_macros_cache.get('__ARM_ARCH') == '6'
558553

559554

560555
def is_arm_hard_float_abi():

0 commit comments

Comments
 (0)