uClibc_arch_features.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Track misc arch-specific features that aren't config options
  3. */
  4. #ifndef _BITS_UCLIBC_ARCH_FEATURES_H
  5. #define _BITS_UCLIBC_ARCH_FEATURES_H
  6. /* instruction used when calling abort() to kill yourself */
  7. #define __UCLIBC_ABORT_INSTRUCTION__ "bl abort"
  8. /* can your target use syscall6() for mmap ? */
  9. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  10. /* does your target use statx */
  11. #undef __UCLIBC_HAVE_STATX__
  12. /* does your target align 64bit values in register pairs ? (32bit arches only) */
  13. #ifdef __ARM_EABI__
  14. #define __UCLIBC_SYSCALL_ALIGN_64BIT__
  15. #else
  16. #undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  17. #endif
  18. /* does your target have a broken create_module() ? */
  19. #define __UCLIBC_BROKEN_CREATE_MODULE__
  20. /* does your target have to worry about older [gs]etrlimit() ? */
  21. #undef __UCLIBC_HANDLE_OLDER_RLIMIT__
  22. /* does your target have an asm .set ? */
  23. #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
  24. /* define if target supports .weak */
  25. #define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
  26. /* define if target supports .weakext */
  27. #undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
  28. /* define if target supports CFI pseudo ops */
  29. #undef __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__
  30. /* define if target supports IEEE signed zero floats */
  31. #define __UCLIBC_HAVE_SIGNED_ZERO__
  32. /* only weird assemblers generally need this */
  33. #undef __UCLIBC_ASM_LINE_SEP__
  34. /* The __ARM_ARCH define is provided by gcc 4.8. Construct it otherwise. */
  35. #ifndef __ARM_ARCH
  36. # ifdef __ARM_ARCH_2__
  37. # define __ARM_ARCH 2
  38. # elif defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__)
  39. # define __ARM_ARCH 3
  40. # elif defined (__ARM_ARCH_4__) || defined (__ARM_ARCH_4T__)
  41. # define __ARM_ARCH 4
  42. # elif defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5E__) \
  43. || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) \
  44. || defined(__ARM_ARCH_5TEJ__)
  45. # define __ARM_ARCH 5
  46. # elif defined (__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
  47. || defined (__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \
  48. || defined (__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__)
  49. # define __ARM_ARCH 6
  50. # elif defined (__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
  51. || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
  52. || defined(__ARM_ARCH_7EM__)
  53. # define __ARM_ARCH 7
  54. # else
  55. # error unknown arm architecture
  56. # endif
  57. #endif
  58. #ifdef __GNUC__
  59. # define __need_uClibc_config_h
  60. # include <bits/uClibc_config.h>
  61. # undef __need_uClibc_config_h
  62. # if defined __CONFIG_ARM_EABI__ && !defined __ARM_EABI__
  63. # error Your toolchain does not support EABI
  64. # elif !defined __CONFIG_ARM_EABI__ && defined __ARM_EABI__
  65. # error Your toolchain was built for EABI, but you have chosen OABI
  66. # endif
  67. #endif
  68. #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */