[v5,24/25] configure: drop AC_FUNC_MALLOC test

Message ID 1503396009-8350-25-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • [v5,1/25] configure: move configure header to include dir
Related show

Commit Message

Github ODP bot Aug. 22, 2017, 10 a.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


AC_FUNC_MALLOC interacts badly with cross-compilation. Instead of
hacking around our cross-compilation setup just replace this macro with
plain AC_CHECK_FUNCS test.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 127 (lumag:improve-build)
 ** https://github.com/Linaro/odp/pull/127
 ** Patch: https://github.com/Linaro/odp/pull/127.patch
 ** Base sha: aecb3c7a442b426761f1e6f43308a1e9ea709ef3
 ** Merge commit sha: 86e036501e05c61e5570d0908af382a61c2d4e89
 **/
 configure.ac | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/configure.ac b/configure.ac
index 1c748fdc..e6014835 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,9 +63,10 @@  AC_SUBST([LIBTOOL_DEPS])
 AM_PROG_LIBTOOL
 
 # Checks for library functions.
-AC_FUNC_MALLOC
+dnl breaks cross-compilation and malloc(0) behaviour is not that important
+dnl AC_FUNC_MALLOC
 AC_FUNC_MMAP
-AC_CHECK_FUNCS([bzero clock_gettime gethostbyname getpagesize gettimeofday memset munmap socket strchr strerror strrchr strstr strtoull])
+AC_CHECK_FUNCS([bzero clock_gettime gethostbyname getpagesize gettimeofday malloc memset munmap socket strchr strerror strrchr strstr strtoull])
 
 # Checks for header files.
 AC_HEADER_RESOLV