patch-configure_ac 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --- valgrind-3.9.0.orig/configure.ac 2013-11-01 00:28:16.000000000 +0100
  2. +++ valgrind-3.9.0/configure.ac 2014-03-17 14:18:45.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. @@ -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. @@ -928,10 +950,13 @@ case "${GLIBC_VERSION}" in
  54. AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic])
  55. DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}"
  56. ;;
  57. -
  58. + musl)
  59. + AC_MSG_RESULT(musl)
  60. + AC_DEFINE([MUSL_LIBC], 1, [Define to 1 if you're using musl])
  61. + ;;
  62. *)
  63. AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
  64. - AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.17])
  65. + AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.18])
  66. AC_MSG_ERROR([or Darwin libc])
  67. ;;
  68. esac