CMakeCompilerABI.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /* Size of a pointer-to-data in bytes. */
  2. #define SIZEOF_DPTR (sizeof(void*))
  3. const char info_sizeof_dptr[] = {
  4. /* clang-format off */
  5. 'I', 'N', 'F', 'O', ':', 's', 'i', 'z', 'e', 'o', 'f', '_', 'd', 'p', 't',
  6. 'r', '[', ('0' + ((SIZEOF_DPTR / 10) % 10)), ('0' + (SIZEOF_DPTR % 10)), ']',
  7. '\0'
  8. /* clang-format on */
  9. };
  10. /* Application Binary Interface. */
  11. /* Check for (some) ARM ABIs.
  12. * See e.g. http://wiki.debian.org/ArmEabiPort for some information on this. */
  13. #if defined(__GNU__) && defined(__ELF__) && defined(__ARM_EABI__)
  14. # define ABI_ID "ELF ARMEABI"
  15. #elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEB__)
  16. # define ABI_ID "ELF ARM"
  17. #elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEL__)
  18. # define ABI_ID "ELF ARM"
  19. #elif defined(__linux__) && defined(__ELF__) && defined(__amd64__) && \
  20. defined(__ILP32__)
  21. # define ABI_ID "ELF X32"
  22. #elif defined(__ELF__)
  23. # define ABI_ID "ELF"
  24. #endif
  25. #if defined(ABI_ID)
  26. static char const info_abi[] = "INFO:abi[" ABI_ID "]";
  27. #endif