Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuring for ARM cross-compiler #297

Closed
slyt opened this issue Nov 11, 2015 · 2 comments
Closed

configuring for ARM cross-compiler #297

slyt opened this issue Nov 11, 2015 · 2 comments

Comments

@slyt
Copy link

slyt commented Nov 11, 2015

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.

@murzz
Copy link

murzz commented Nov 11, 2015

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.

@stephane
Copy link
Owner

The issue isn't related to libmodbus, The libmodbus mailing list is a better place to discuss it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants