mirror of
https://github.com/boostorg/predef.git
synced 2025-07-29 11:37:13 +02:00
Rework ARM detection to favor versioned predefs.
This reworks the order in which the compiler predefs are checked to use the ones that provide version info. Also add the arch predefs for older compilers that don't define the predefs with version info for arm4, arm5, arm6, and arm7. Continuation of #94
This commit is contained in:
@ -21,35 +21,68 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__arm__`] [__predef_detection__]]
|
||||
[[`__arm64`] [__predef_detection__]]
|
||||
[[`__thumb__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH`] [__predef_detection__]]
|
||||
[[`__TARGET_ARCH_ARM`] [__predef_detection__]]
|
||||
[[`__TARGET_ARCH_THUMB`] [__predef_detection__]]
|
||||
[[`_M_ARM`] [__predef_detection__]]
|
||||
[[`__arm__`] [__predef_detection__]]
|
||||
[[`__arm64`] [__predef_detection__]]
|
||||
[[`__thumb__`] [__predef_detection__]]
|
||||
[[`_M_ARM64`] [__predef_detection__]]
|
||||
[[`__aarch64__`] [__predef_detection__]]
|
||||
[[`__AARCH64EL__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_7__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_7A__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_7R__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_7M__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_6K__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_6Z__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_6KZ__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_6T2__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_5TE__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_5TEJ__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_4T__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_4__`] [__predef_detection__]]
|
||||
|
||||
[[`__arm64`] [8.0.0]]
|
||||
[[`__ARM_ARCH`] [V.0.0]]
|
||||
[[`__TARGET_ARCH_ARM`] [V.0.0]]
|
||||
[[`__TARGET_ARCH_THUMB`] [V.0.0]]
|
||||
[[`__ARM_ARCH`] [V.0.0]]
|
||||
[[`_M_ARM`] [V.0.0]]
|
||||
[[`__arm64`] [8.0.0]]
|
||||
[[`_M_ARM64`] [8.0.0]]
|
||||
[[`__aarch64__`] [8.0.0]]
|
||||
[[`__AARCH64EL__`] [8.0.0]]
|
||||
[[`__ARM_ARCH_7__`] [7.0.0]]
|
||||
[[`__ARM_ARCH_7A__`] [7.0.0]]
|
||||
[[`__ARM_ARCH_7R__`] [7.0.0]]
|
||||
[[`__ARM_ARCH_7M__`] [7.0.0]]
|
||||
[[`__ARM_ARCH_6K__`] [6.0.0]]
|
||||
[[`__ARM_ARCH_6Z__`] [6.0.0]]
|
||||
[[`__ARM_ARCH_6KZ__`] [6.0.0]]
|
||||
[[`__ARM_ARCH_6T2__`] [6.0.0]]
|
||||
[[`__ARM_ARCH_5TE__`] [5.0.0]]
|
||||
[[`__ARM_ARCH_5TEJ__`] [5.0.0]]
|
||||
[[`__ARM_ARCH_4T__`] [4.0.0]]
|
||||
[[`__ARM_ARCH_4__`] [4.0.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
|
||||
defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \
|
||||
defined(__ARM_ARCH) || \
|
||||
defined(_M_ARM) || defined(_M_ARM64) || \
|
||||
defined(__aarch64__)
|
||||
#if \
|
||||
defined(__ARM_ARCH) || defined(__TARGET_ARCH_ARM) || \
|
||||
defined(__TARGET_ARCH_THUMB) || defined(_M_ARM) || \
|
||||
defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
|
||||
defined(_M_ARM64) || defined(__aarch64__) || defined(__AARCH64EL__) || \
|
||||
defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
|
||||
defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \
|
||||
defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
|
||||
defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) || \
|
||||
defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__) || \
|
||||
defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_4__)
|
||||
# undef BOOST_ARCH_ARM
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__arm64)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__ARM_ARCH)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__ARM_ARCH,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0)
|
||||
@ -57,18 +90,32 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_THUMB)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__ARM_ARCH)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__ARM_ARCH,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM64)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(_M_ARM,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__aarch64__)
|
||||
# if !defined(BOOST_ARCH_ARM) && ( \
|
||||
defined(__arm64) || defined(_M_ARM64) || defined(__aarch64__) || \
|
||||
defined(__AARCH64EL__) )
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && ( \
|
||||
defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
|
||||
defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) )
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(7,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && ( \
|
||||
defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
|
||||
defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) )
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(6,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && ( \
|
||||
defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__) )
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(5,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && ( \
|
||||
defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_4__) )
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(4,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
|
Reference in New Issue
Block a user