Cross-compile error

Ian Lance Taylor iant@google.com
Sat Jan 5 23:49:00 GMT 2013


On Sat, Jan 5, 2013 at 3:39 PM, Brandon Falk <bfalk@gamozolabs.com> wrote:

> ./gthr-default.h:41:21: fatal error: pthread.h: No such file or directory
>
> If it can't find pthread.h, then I'm assuming there is some issue with
> glibc... but how could I possibly build glibc without gcc in the first
> place?

If you are building for Android you may want Bionic rather than glibc.

If you don't already have the C library, the usual procedure is to
partly build GCC, use the partial GCC to build glibc, and then use the
new glibc to build GCC again.  Note that your GCC build failed when
building the GCC support library--the compiler was built successfully.
 If you need the support library for your C library--I don't know if
you do--then your first partial build of GCC may need to use
--target=arm-eabi or something like that.

In general this is an awkward process.  There may be some scripts
around you can use.  There are for crosses to GNU/Linux--see
crosstool-ng.org--but I don't know about Android.

Ian



More information about the Gcc-help mailing list