You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

  1. --- a/config.h.in
  2. +++ b/config.h.in
  3. @@ -45,6 +45,9 @@
  4. /* Define to 1 if you have the `arc4random_uniform' function. */
  5. #undef HAVE_ARC4RANDOM_UNIFORM
  6. +/* Define if the ARM yield instruction is available */
  7. +#undef HAVE_ARM_YIELD
  8. +
  9. /* Define to 1 if the compiler supports __builtin_clz. */
  10. #undef HAVE_BUILTIN_CLZ
  11. --- a/configure.ac
  12. +++ b/configure.ac
  13. @@ -421,8 +421,8 @@ AS_CASE([$host],
  14. [[]],
  15. [[__asm__ __volatile__ ("yield")]]
  16. )],
  17. - [AC_MSG_RESULT([yes])],
  18. - [AC_MSG_ERROR([no, try adding -march=native or -march=armv7-a to CFLAGS (see PLATFORMS.md for more information)])])])
  19. + [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_ARM_YIELD],[1],[Define if the ARM yield instruction is available])],
  20. + [AC_MSG_RESULT([no])])])
  21. AC_CHECK_FUNCS([sysctlbyname])
  22. --- a/lib/isc/rwlock.c
  23. +++ b/lib/isc/rwlock.c
  24. @@ -54,7 +54,7 @@
  25. # define isc_rwlock_pause() __asm__ __volatile__ ("rep; nop")
  26. #elif defined(__ia64__)
  27. # define isc_rwlock_pause() __asm__ __volatile__ ("hint @pause")
  28. -#elif defined(__arm__)
  29. +#elif defined(__arm__) && HAVE_ARM_YIELD
  30. # define isc_rwlock_pause() __asm__ __volatile__ ("yield")
  31. #elif defined(sun) && (defined(__sparc) || defined(__sparc__))
  32. # define isc_rwlock_pause() smt_pause()