Cross-compile error

Brandon Falk bfalk@gamozolabs.com
Sun Jan 6 00:22:00 GMT 2013


On Sat, Jan 5, 2013 at 6:44 PM, Ian Lance Taylor <iant@google.com> wrote:
> 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

Is there any way to build gcc partially so it stops (successfully)
after building the compilers, so I can run off and build glibc then
come back? Or do I need to have my makefile/scripts detect the failure
and build glibc and then continue.

Right now I'm just using Android as a test target to verify that I can
build a cross compiler, later down the road I'll work on actually
making the correct environment (Bionic) to run on Android.

-Brandon



More information about the Gcc-help mailing list