Skip to content

Commit a7f5dfd

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 0e3912b commit a7f5dfd

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
@@ -557,18 +557,13 @@ def cc_macros(cc=None):
557557
def is_arch_armv7():
558558
"""Check for ARMv7 instructions"""
559559
cc_macros_cache = cc_macros()
560-
return ('__ARM_ARCH_7__' in cc_macros_cache or
561-
'__ARM_ARCH_7A__' in cc_macros_cache or
562-
'__ARM_ARCH_7R__' in cc_macros_cache or
563-
'__ARM_ARCH_7M__' in cc_macros_cache or
564-
'__ARM_ARCH_7S__' in cc_macros_cache)
560+
return cc_macros_cache.get('__ARM_ARCH') == '7'
565561

566562

567563
def is_arch_armv6():
568564
"""Check for ARMv6 instructions"""
569565
cc_macros_cache = cc_macros()
570-
return ('__ARM_ARCH_6__' in cc_macros_cache or
571-
'__ARM_ARCH_6M__' in cc_macros_cache)
566+
return cc_macros_cache.get('__ARM_ARCH') == '6'
572567

573568

574569
def is_arm_hard_float_abi():

0 commit comments

Comments
 (0)