Opened 6 years ago
Last modified 5 years ago
#12946 new Bugs
Definition of BOOST_ARCH_ARM does not check __aarch64__
Reported by: | Owned by: | René Rivera | |
---|---|---|---|
Milestone: | To Be Determined | Component: | predef USE GITHUB |
Version: | Boost 1.63.0 | Severity: | Problem |
Keywords: | arm arm64 | Cc: |
Description
Hi
In this header file http://www.boost.org/doc/libs/1_63_0/boost/predef/architecture/arm.h macros aarch64 should be checked along with arm64 Without that we get problems when building with Android NDK for arm 64, because BOOST_ARCH_ARM is not defined.
Thanks Sergey
Change History (2)
comment:1 by , 6 years ago
comment:2 by , 5 years ago
Something like this should help - I was going to submit a pull request on github however it looks like there's quite a bit more that needs to be done here including detecting the difference between 32-bit and 64-bit (unless the architecture/) is doing that; and also the major and minor version of ARM should be updated to include 8.1A, 8.2A, 8.3A in all the ways the different compilers express it.
diff --git a/include/boost/predef/architecture/arm.h b/include/boost/predef/architecture/arm.h index 76f9f94..e785304 100644 --- a/include/boost/predef/architecture/arm.h +++ b/include/boost/predef/architecture/arm.h @@ -21,6 +21,7 @@ http://www.boost.org/LICENSE_1_0.txt) [table [[__predef_symbol__] [__predef_version__]] + [[`__aarch64__`] [__predef_detection__]] [[`__arm__`] [__predef_detection__]] [[`__arm64`] [__predef_detection__]] [[`__thumb__`] [__predef_detection__]] @@ -39,11 +40,11 @@ http://www.boost.org/LICENSE_1_0.txt) #define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE -#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \ +#if defined(__aarch64__) || defined(__arm__) || defined(__arm64) || defined(__thumb__) || \ defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \ defined(_M_ARM) || defined(_M_ARM64) # undef BOOST_ARCH_ARM -# if !defined(BOOST_ARCH_ARM) && defined(__arm64) +# if !defined(BOOST_ARCH_ARM) && (defined(__arm64) || defined(__aarch64__)) # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0) # endif # if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM)
I'd recommend moving this issue to github so it gets more exposure.
__aarch64__ should be checked along with __arm64