Cross-compiling with ./configure
Don Quixote de la Mancha
quixote@dulcineatech.com
Fri Mar 12 13:38:00 GMT 2010
This must be a very common problem, but I have not yet been able to
Google up a solution.
Many Open Source programs come with a "configure" script that creates
all the Makefiles and possibly a config.h header file. My problem is
how to use configure when I want to cross-compile. In my particular
case the host is Ubuntu 8.10 i386 and the target is Google Android
ARM. Presently I'm trying to build glib, but I have lots of other
sources that I'll need to cross-compile the same way.
The glib documentation says that when cross-compiling, one needs to
set up a cache file that is used by the configure script. My
android.cache has:
glib_cv_long_long_format=ll
glib_cv_stack_grows=no
These indicate that Android's printf format for 64-bit integers is
%ll, and that the runtime stack grows downward.
The first item in my $PATH is the bin directory that contains
Android's arm-eabi-4.4.0 build of the GNU toolchain. The LDFLAGS
parameter given to configure supplies the directory where my Android
system build places all the shared libraries:
$ ./configure --cache-file=android.cache --host=arm-linux
LDFLAGS=-L/path/to/android/out/target/product/foofone/system/lib
...
configure: error: C compiler cannot create executables
See `config.log' for more details.
Unfortunately, config.log doesn't give me a clue as to what actually failed.
I thought at first that the problem was that the built executable,
being an ARM binary, wouldn't run on i386. But now I think the
problem is actually that the executable that configure was trying to
build could not be built at all.
Have you a clue for me?
Thanks!
Don Quixote
--
Don Quixote de la Mancha
quixote@dulcineatech.com
http://www.dulcineatech.com
Dulcinea Technologies Corporation: Software of Elegance and Beauty.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list