Building cross compiler for x86_64

Brian Dessent brian@dessent.net
Sun Feb 17 02:52:00 GMT 2008


"Frank W. Miller" wrote:

> /home/fwmiller/Desktop/gcc-4.2.3/host-i686-pc-linux-gnu/gcc/xgcc
> -B/home/fwmiller/Desktop/gcc-4.2.3/host-i686-pc-linux-gnu/gcc/
> -B/usr/local/x86_64-pc-linux/bin/ -B/usr/local/x86_64-pc-linux/lib/
> -isystem /usr/local/x86_64-pc-linux/include
> -isystem /usr/local/x86_64-pc-linux/sys-include -O2  -O2 -g -O2
> -DIN_GCC -DCROSS_COMPILE -DNATIVE_CROSS   -W -Wall -Wwrite-strings
> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
> -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
> -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../.././gcc
> -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include
> -I../.././gcc/../libdecnumber -I../libdecnumber -fexceptions
> -fvisibility=hidden -DHIDE_EXPORTS -c ../.././gcc/unwind-dw2.c -o
> libgcc/./unwind-dw2.o

This is the stage 3 compiler being used to build libgcc, and:

> ../.././gcc/gthr-posix.h:43:21: error: pthread.h: No such file or
> directory
> ../.././gcc/gthr-posix.h:44:20: error: unistd.h: No such file or
> directory

... like I said, you can't build libgcc without target libc headers.  I
don't know why the all-gcc rule still tries to build parts of libgcc. 
But you already have the bare compiler built at this point so for
freestanding work that should be enough.  You can try something like
"make -k install-gcc" and see what happens, or do it manually.

Brian



More information about the Gcc-help mailing list