Closed slyt closed 8 years ago
This is how I've done it for linaro:
CC=${CMAKE_C_COMPILER} ./autogen.sh &&
CC=${CMAKE_C_COMPILER} ./configure
ac_cv_func_malloc_0_nonnull=yes # fix for undefined reference to `rpl_malloc'
--host=arm
--enable-static
--without-documentation
where CMAKE_C_COMPILER is full path to linaro gcc.
The issue isn't related to libmodbus, The libmodbus mailing list is a better place to discuss it.
I'm attempting to configure and make the libmodbus library statically using
arm-linux-gnueabi-gcc
cross-compiler from Linaro. My target has an ARMv7 Processor rev 7 (v7l).When I execute the following:
$ sudo ./configure --host arm-linux-gnueabi-gcc --enable-static
I get the following error:
... checking build system type... x86_64-unknown-linux-gnu checking host system type... Invalid configuration 'arm-linux-gnueabi-gcc': machine 'arm-linux-gnueabi' not recognized configure: error: /bin/bash ./config.sub arm-linux-gnueabi-gcc failed
Is this how I properly specify the host (by specifying my cross-compiler)?
I'm fairly new to cross-compiling especially linking in external libraries so any hints are much appreciated. I've used this as my example to get this far.