patch-configure_ac 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --- valgrind-3.9.0.orig/configure.ac 2013-11-01 00:28:16.000000000 +0100
  2. +++ valgrind-3.9.0/configure.ac 2013-11-07 17:26:16.000000000 +0100
  3. @@ -155,6 +155,7 @@ esac
  4. # configure-time, and distinguishes them from the VGA_*/VGO_*/VGP_*
  5. # variables used when compiling C files.
  6. +VGCONF_PLATFORM_ARM_ARCH=
  7. AC_CANONICAL_HOST
  8. AC_MSG_CHECKING([for a supported CPU])
  9. @@ -191,8 +192,18 @@ case "${host_cpu}" in
  10. ;;
  11. armv7*)
  12. + # This means we use a armv7 toolchain - at least Cortex-A8
  13. AC_MSG_RESULT([ok (${host_cpu})])
  14. ARCH_MAX="arm"
  15. + VGCONF_PLATFORM_ARM_ARCH="-march=armv7 -mcpu=cortex-a8"
  16. + ;;
  17. +
  18. + arm*)
  19. + # Generic arm toolchain - we will target armv6
  20. + AC_MSG_RESULT([(${host_cpu}) - no armv7 toolchain specified, will enforce armv6 when compiling])
  21. + ARCH_MAX="arm"
  22. + VGCONF_PLATFORM_ARM_ARCH="-march=armv6"
  23. + AC_DEFINE(ARM_ARCH_V6,1,"Defined for v6 architectures")
  24. ;;
  25. mips)
  26. @@ -225,6 +236,8 @@ case "${host_cpu}" in
  27. ;;
  28. esac
  29. +AC_SUBST(VGCONF_PLATFORM_ARM_ARCH)
  30. +
  31. #----------------------------------------------------------------------------
  32. # Sometimes it's convenient to subvert the bi-arch build system and
  33. @@ -792,6 +805,15 @@ AC_EGREP_CPP([BIONIC_LIBC], [
  34. ],
  35. GLIBC_VERSION="bionic")
  36. +# not really a version check
  37. +AC_EGREP_CPP([MUSL_LIBC], [
  38. +#if defined(__MUSL__)
  39. + MUSL_LIBC
  40. +#endif
  41. +],
  42. +GLIBC_VERSION="musl")
  43. +
  44. +
  45. AC_MSG_CHECKING([the GLIBC_VERSION version])
  46. @@ -928,10 +950,13 @@ case "${GLIBC_VERSION}" in
  47. AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic])
  48. DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}"
  49. ;;
  50. -
  51. + musl)
  52. + AC_MSG_RESULT(musl)
  53. + AC_DEFINE([MUSL_LIBC], 1, [Define to 1 if you're using musl])
  54. + ;;
  55. *)
  56. AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
  57. - AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.17])
  58. + AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.18])
  59. AC_MSG_ERROR([or Darwin libc])
  60. ;;
  61. esac