cross compile gcc

ken_i_m ken_i_m at
Sun Jan 7 15:56:32 PST 2001


Any folks with experience cross compiling gcc on a i686 targeting a i486?

Configure seems to run fine. These are the options I use:

--target=i486-pc-linux-gnu --prefix=/usr 
--with-gxx-include-dir=/usr/include/g++ \
--enable-languages=c,c++ --disable-nls

The Makefile looks like what I want however when I run:

make -e LDFLAGS=-static cross

I eventually get:

.../../gcc-2.95.2/gcc/libgcc2.c:41: stdlib.h: No such file or directory
.../../gcc-2.95.2/gcc/libgcc2.c:42: unistd.h: No such file or directory
make[1]: *** {libgcc2.a] Error 1
make[1]: Leaving directory `/lfs/usr/src/gcc-build/gcc'
make: *** [cross] Error 2

Looking at the offending lines 41 and 42 in libgcc2.c they are:

#include <stdlib.h>
#include <unistd.h>

and no those header files are not there. um . . . what do I do now?

I think, therefore, ken_i_m

Unsubscribe: send email to lfs-discuss-request at
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list