I'm working on writing a C program for the Moxa UC-7110 which runs uCLinux. I have installed the arm-elf-gcc tool chain provided by Moxa, and I'm able to build applications fine so far.
The problem is, I'm somewhat of a novice at C programming and the CMake system. I want to be able to make HTTP GET & POST requests, but the system I'm building for doesn't have libcurl or any similar library. I don't want to write my own, so I'd like to build libcurl or some equivalent for the Moxa, but I don't understand how to get libcurl configured for the cross compiler.
I've downloaded the libcurl source and run:
./configure CC=arm-elf-gcc
but it just fails with:
configure: error: C compiler cannot create executables
Are the basics for cross compiling that I should be aware of? Is there a way to run configure
with it knowing I'm cross compiling?
EDIT
I've started running
LDFLAGS="-Wl,-elf2flt" ./configure --build=x86_64-linux-gnu --host=arm-elf
Which should cross compile properly according to the autoconf docs, but it doesn't go into cross compilation mode, and keeps trying to execute the binaries it builds.
checking for arm-elf-gcc... arm-elf-gcc
checking whether the C compiler works... no
configure: error: in `/home/mcantrell/curl-7.37.0':
configure: error: C compiler cannot create executables