[libgpiod] AC_FUNC_MALLOC cross-compile failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When libgpiod is cross-compiled it will use rpl_malloc instead malloc which then causes linking failure at later stage.

This happens because AC_FUNC_MALLOC wants to execute malloc() in a live system and thus cannot be run at cross-compilation time. libgpiod should just do AC_CHECK_FUNC instead.

diff --git a/configure.ac b/configure.ac
index ddb9dc2..5f41c4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,7 +82,7 @@ AC_DEFUN([HEADER_NOT_FOUND_CXX],
# This is always checked (library needs this)
 AC_HEADER_STDC
-AC_FUNC_MALLOC
+AC_CHECK_FUNC([malloc], [], [FUNC_NOT_FOUND_LIB([malloc])])
 AC_CHECK_FUNC([ioctl], [], [FUNC_NOT_FOUND_LIB([ioctl])])
 AC_CHECK_FUNC([asprintf], [], [FUNC_NOT_FOUND_LIB([asprintf])])
 AC_CHECK_FUNC([scandir], [], [FUNC_NOT_FOUND_LIB([scandir])])



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux