mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Fix redefinition of CONF_ARCH_STRING
for ARM architectures
The macro `__ARM_ARCH` is defined both for 32-bit and 64-bit ARM so it cannot be used to identify ARM64. Now `__ARM_ARCH_ISA_A64` is used instead, which should only be defined for ARM64. This caused a warning due to the macro `CONF_ARCH_STRING` being redefined when compiling for Android. Furthermore, support for detecting big-endian ARM64 with the `__ARM_BIG_ENDIAN` macro is added. See https://developer.arm.com/documentation/dui0774/g/chr1383660321827
This commit is contained in:
parent
11fd82077a
commit
8e45d0a71a
|
@ -163,19 +163,19 @@
|
|||
#define CONF_ARCH_ARM 1
|
||||
#define CONF_ARCH_STRING "arm"
|
||||
#define CONF_ARCH_ENDIAN_BIG 1
|
||||
#endif
|
||||
|
||||
#if defined(__ARMEL__)
|
||||
#elif defined(__ARMEL__)
|
||||
#define CONF_ARCH_ARM 1
|
||||
#define CONF_ARCH_STRING "arm"
|
||||
#define CONF_ARCH_ENDIAN_LITTLE 1
|
||||
#endif
|
||||
|
||||
#if defined(__aarch64__) || defined(__arm64__) || defined(__ARM_ARCH)
|
||||
#elif defined(__aarch64__) || defined(__arm64__) || defined(__ARM_ARCH_ISA_A64)
|
||||
#define CONF_ARCH_ARM64 1
|
||||
#define CONF_ARCH_STRING "arm64"
|
||||
#if defined(__ARM_BIG_ENDIAN)
|
||||
#define CONF_ARCH_ENDIAN_BIG 1
|
||||
#else
|
||||
#define CONF_ARCH_ENDIAN_LITTLE 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CONF_FAMILY_STRING
|
||||
#define CONF_FAMILY_STRING "unknown"
|
||||
|
|
Loading…
Reference in a new issue