uClibc_arch_features.h 2.6 KB

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