Quantcast

AC_FUNC_{M,RE}ALLOC are not cross-compiling aware

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AC_FUNC_{M,RE}ALLOC are not cross-compiling aware

Kang-Che Sung
Found this bug on Autoconf 2.69

The AC_FUNC_MALLOC and AC_FUNC_REALLOC macros check for runtime
behaviors of `malloc` and `realloc` respectively. However, both checks
silently evaluate to "no" when cross-compiling.

This is a bug, because:
1. They do not emit a warning on cross-compiling mode. Something like
   "WARNING: result no guessed because of cross compilation"
2. They do not try to make a good guess (if possible) on whether the
   "--host" machine is using glibc or not. For example this
   StackOverflow question <http://stackoverflow.com/questions/9705660/>.
   Trying to see the presence of gnu_get_libc_version() or just
   grepping the string "GNU C Library" in host's libc.so is enough to
   make a good guess.
3. The silent result as the macros currently behave is not documented
   in manual. (If documented, then configure.ac writers will know this
   behavior is expected and will workaround on cross-compiling on our
   side.)

Loading...