Re: Problems building 4.2.1 cross compiler for ppc-eabi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dirk Heinrichs wrote:
I'm trying to build a new cross compiler toolchain for ppc-eabi on Solaris 2.9 using binutils 2.17, newlib 1.15 and GCC 3.4.6 as the host compiler. While compiling binutils went just fine, I have a problem building the cross compiler:

/vob/apps/xgnu/gcc-SunOS/./gcc/xgcc -B/vob/apps/xgnu/gcc-SunOS/./gcc/ -B/vob/apps/xgnu/SunOS/ppc-eabi/bin/ -B/vob/apps/xgnu/SunOS/ppc-eabi/lib/ -isystem /vob/apps/xgnu/SunOS/ppc-eabi/include -isystem /vob/apps/xgnu/SunOS/ppc-eabi/sys-include -c -DHAVE_CONFIG_H -O2 -g -O2 -I. -I../../../gcc-4.2.1/libiberty/../include -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat ../../../gcc-4.2.1/libiberty/regex.c -o regex.o ../../../gcc-4.2.1/libiberty/regex.c:51:25: error: sys/types.h: No such file or directory ../../../gcc-4.2.1/libiberty/regex.c:158:25: error: strings.h: No such file or directory ../../../gcc-4.2.1/libiberty/regex.c:196:20: error: ctype.h: No such file or directory
[many more output skipped]
Of course you should have the base C target headers available when compiling libiberty and libstdc++-v3 ! But the earlier 'fixincludes' phase needed them too, so it failed silently :-(

So just copy the generic newlib headers where those '-isystem' options in the log say (make the 'sys-include' to be a symlink to the copied 'include'!) and then start the build again after doing a 'make clean'.... If you don't know where that 'include' is among the newlib sources then just learn to use a :

   find -type d -name include

or something equivalent in Solaris9 :-) In Linux that should tell the place... Let's make an experiment :

Dell:/data1/home/src/newlib-1.15.0 # find -type d -name include
./newlib/libc/include
./newlib/libc/machine/cris/include
./newlib/libc/sys/linux/include
./newlib/libc/sys/linux/machine/i386/include
./newlib/libc/sys/rtems/include
./newlib/testsuite/include

Which one of these could be the one for the generic newlib C headers is a homework decision for you....

Configuration is (which is the same as used for a working 3.3.2 version):

../gcc-4.2.1/configure --prefix=/vob/apps/xgnu/SunOS --target=ppc-eabi --enable-languages=c,c++,java --with-gnu-as --with-gnu-ld --with-newlib --disable-shared

Any ideas what I need to do to fix this?
The '--with-newlib' doesn't remove the need to have the target C library headers available during the GCC build, it only removes the need to have the target C library binaries during the GCC build! And my claim (to be proved) is that those copied generic headers should be enough, the GCC build doesn't require the final target specific (with AltiVec etc. additions in the PPC case) headers. Anyone who doesn't believe, can try to rebuild GCC after newlib is built and installed, the newlib build happening after the first GCC build with the just built GCC...


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux