CMakeCompilerABI.h 1.2 KB

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