Trouble in building cross gcc
Brendan John Simon
Brendan.Simon@ctam.com.au
Sat Apr 1 00:00:00 GMT 2000
"Eddie CHEUNG [ESD]" wrote:
> I have tried to build a cross complier which hosted in PC 586 Linux and target for the powerpc embedded, I follow the steps listed in the FAQ section. I have make the Binutils, but I make the gcc, I got the following message.
>
> ../../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[3]: *** [libgcc2.a] Error 1
> make[3]: Leaving directory `/root/crossgcc-src/build-gcc/gcc'
> make[2]: *** [stmp-multilib-sub] Error 2
> make[2]: Leaving directory `/root/crossgcc-src/build-gcc/gcc'
> make[1]: *** [stmp-multilib] Error 1
> make[1]: Leaving directory `/root/crossgcc-src/build-gcc/gcc'
> make: *** [all-gcc] Error 2
>
> Can someone help me to fix it, or tell me what is wrong?
You probably need to pre-install the header files for the C library that is to be used. glibc if targeting powerpc-linux or newlib if targeting powerpc-eabi. What is your target ? The header files should go in
$prefix/$target/include.
If your target is powerpc-eabi, then you can run configure with the "--with-headers=<path-to-newlib>/newlib/include". Alternatively you can make a symbolic link from the gcc source directory to the newlib source directory and use
the --with-newlib configure option. eg. "cd gcc-2.95.2; ln -s ../newlib-1.8.2 newlib". These methods will copy the header files to the right locatin ($prefix/$target/include).
Brendan Simon.
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list