uClibc_arch_features.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 doesn't like .global */
  23. #undef __UCLIBC_ASM_GLOBAL_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. /* needed probably only for ppc64 */
  29. #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
  30. /* define if target supports CFI pseudo ops */
  31. #undef __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__
  32. /* define if target supports IEEE signed zero floats */
  33. #define __UCLIBC_HAVE_SIGNED_ZERO__
  34. /* only weird assemblers generally need this */
  35. #undef __UCLIBC_ASM_LINE_SEP__
  36. /* The __ARM_ARCH define is provided by gcc 4.8. Construct it otherwise. */
  37. #ifndef __ARM_ARCH
  38. # ifdef __ARM_ARCH_2__
  39. # define __ARM_ARCH 2
  40. # elif defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__)
  41. # define __ARM_ARCH 3
  42. # elif defined (__ARM_ARCH_4__) || defined (__ARM_ARCH_4T__)
  43. # define __ARM_ARCH 4
  44. # elif defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5E__) \
  45. || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) \
  46. || defined(__ARM_ARCH_5TEJ__)
  47. # define __ARM_ARCH 5
  48. # elif defined (__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
  49. || defined (__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \
  50. || defined (__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__)
  51. # define __ARM_ARCH 6
  52. # elif defined (__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
  53. || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
  54. || defined(__ARM_ARCH_7EM__)
  55. # define __ARM_ARCH 7
  56. # else
  57. # error unknown arm architecture
  58. # endif
  59. #endif
  60. #ifdef __GNUC__
  61. # define __need_uClibc_config_h
  62. # include <bits/uClibc_config.h>
  63. # undef __need_uClibc_config_h
  64. # if defined __CONFIG_ARM_EABI__ && !defined __ARM_EABI__
  65. # error Your toolchain does not support EABI
  66. # elif !defined __CONFIG_ARM_EABI__ && defined __ARM_EABI__
  67. # error Your toolchain was built for EABI, but you have chosen OABI
  68. # endif
  69. #endif
  70. #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */