cross compile gcc

Jeffrey B. Ferland autocracy at linuxfreemail.com
Sun Jan 7 18:01:10 PST 2001


ken_i_m wrote:
> 
> Hey,
> 
> 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

I don't think that's considered cross-compiling. As for the error, do a 'locate
-u && locate stdlib.h > ~/stdlib.search && locate unistd.h > ~/unistd.search'
Then look in those two output files, find one of the copies on your hardisk, and
copy it to the source folder.

-Jeff
SIG: HUP

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




More information about the lfs-dev mailing list