CMakeCompilerABI.h 1.08 KB
Newer Older
1 2 3

/* Size of a pointer-to-data in bytes.  */
#define SIZEOF_DPTR (sizeof(void*))
4 5 6 7
const char info_sizeof_dptr[] = {
  'I', 'N', 'F', 'O', ':', 's', 'i', 'z', 'e', 'o', 'f', '_', 'd', 'p', 't',
  'r', '[', ('0' + ((SIZEOF_DPTR / 10) % 10)), ('0' + (SIZEOF_DPTR % 10)), ']',
  '\0'
8 9
  /* clang-format needs this comment to break after the opening brace */
};
10 11 12

/* Application Binary Interface.  */
#if defined(__sgi) && defined(_ABIO32)
13
#define ABI_ID "ELF O32"
14
#elif defined(__sgi) && defined(_ABIN32)
15
#define ABI_ID "ELF N32"
16
#elif defined(__sgi) && defined(_ABI64)
17
#define ABI_ID "ELF 64"
18 19 20 21

/* Check for (some) ARM ABIs.
 * See e.g. http://wiki.debian.org/ArmEabiPort for some information on this. */
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARM_EABI__)
22
#define ABI_ID "ELF ARMEABI"
23
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEB__)
24
#define ABI_ID "ELF ARM"
25
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEL__)
26
#define ABI_ID "ELF ARM"
27

28
#elif defined(__ELF__)
29
#define ABI_ID "ELF"
30 31 32 33 34
#endif

#if defined(ABI_ID)
static char const info_abi[] = "INFO:abi[" ABI_ID "]";
#endif