configure.ac AC_FUNC_MALLOC breaks cross compilation

99 views
Skip to first unread message

oldfaber

unread,
Oct 12, 2017, 8:08:18 AM10/12/17
to libmodbus
Hi,

configure.ac under "Checks for library functions" has
AC_FUNC_FORK
AC_FUNC_MALLOC

Using a cross toolchain under linux AC_FUNC_MALLOC is tested on the build architecture,
fails, and adds a replacement rpl_malloc which is not in the library, producing a broken libmodbus.so.
AC_FUNC_FORK tests for fork() and vfork(), never used in libmodbus.

Please delete these tests from configure.ac, they are wrong and actively harmful.

Also the AC_CHECH_FUNCS([ ... memset ...]) is not really used, the library never uses HAS_MEMSET,
and memset must be available for gcc even in freestanding environments.

If accepted I can submit a github pull request to libmodbus.

Best regards.

Fabio


Stéphane Raimbault

unread,
Nov 14, 2017, 4:41:17 PM11/14/17
to libm...@googlegroups.com
Fabio,

You're right so I've removed: AC_FUNC_FORK, AC_FUNC_MALLOC.
I wasn't sure about memset but I removed it too!

Thank you.

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "libmodbus".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse libmodbus+unsubscribe@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages