patch-configure_ac 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --- valgrind-3.9.0.orig/configure.ac 2013-11-01 00:28:16.000000000 +0100
  2. +++ valgrind-3.9.0/configure.ac 2014-05-19 19:33:23.000000000 +0200
  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. @@ -273,7 +286,7 @@ case "${host_os}" in
  34. # Ok, this is linux. Check the kernel version
  35. AC_MSG_CHECKING([for the kernel version])
  36. - kernel=`uname -r`
  37. + kernel=3.13
  38. case "${kernel}" in
  39. 2.6.*|3.*)
  40. @@ -792,6 +805,15 @@ AC_EGREP_CPP([BIONIC_LIBC], [
  41. ],
  42. GLIBC_VERSION="bionic")
  43. +# not really a version check
  44. +AC_EGREP_CPP([MUSL_LIBC], [
  45. +#if defined(__MUSL__)
  46. + MUSL_LIBC
  47. +#endif
  48. +],
  49. +GLIBC_VERSION="musl")
  50. +
  51. +
  52. AC_MSG_CHECKING([the GLIBC_VERSION version])
  53. @@ -918,6 +940,13 @@ case "${GLIBC_VERSION}" in
  54. DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
  55. DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
  56. ;;
  57. + 2.19)
  58. + AC_MSG_RESULT(2.19 family)
  59. + AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
  60. + DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
  61. + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
  62. + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
  63. + ;;
  64. darwin)
  65. AC_MSG_RESULT(Darwin)
  66. AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
  67. @@ -928,10 +957,13 @@ case "${GLIBC_VERSION}" in
  68. AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic])
  69. DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}"
  70. ;;
  71. -
  72. + musl)
  73. + AC_MSG_RESULT(musl)
  74. + AC_DEFINE([MUSL_LIBC], 1, [Define to 1 if you're using musl])
  75. + ;;
  76. *)
  77. AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
  78. - AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.17])
  79. + AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.18])
  80. AC_MSG_ERROR([or Darwin libc])
  81. ;;
  82. esac