Help building cross-compiler gcc with newlib, target powerpc
angus.gratton at anu.edu.au
Wed Jul 14 07:14:45 UTC 2010
I know I'm doing something stupid here, but I can't find what it is.
I'm trying to build an RTEMS toolchain for powerpc, and I'm up to
gcc-4.4.4 with newlib.
I've applied patches from the RTEMS-4.10 CVS tag, specifically
binutils is built and installed to my prefix.
I've symlinked the newlib-1.18 source directory to the gcc source
directory as 'newlib'.
gcc is configured as recommended in the current-doc RTEMS Getting
Started (although that doc is for an earlier gcc version)
../gcc-4.4.4/configure --target=powerpc-rtems4.10 --with-gnu-as
--with-gnu-ld --with-newlib --verbose --enable-threads
I've had two errors, one early on: "no include path in which to search
for limits.h" which I worked around by putting in an empty
sys-include/limits.h as suggested here
That seemed to work because the build ran for a while longer then failed
while building newlib:
configure: error: in
configure: error: C compiler cannot create executables
-isystem /opt/rtems/source/tools/build/powerpc-rtems4.10/newlib/targ-include -isystem /opt/rtems/source/tools/gcc-4.4.4/newlib/libc/include -B/opt/rtems/rtems-4.10/powerpc-rtems4.10/bin/ -B/opt/rtems/rtems-4.10/powerpc-rtems4.10/lib/ -isystem /opt/rtems/rtems-4.10/powerpc-rtems4.10/include -isystem /opt/rtems/rtems-4.10/powerpc-rtems4.10/sys-include -g -O2 conftest.c >&5
/opt/rtems/rtems-4.10/powerpc-rtems4.10/bin/ld: crt0.o: No such file: No
such file or directory
collect2: ld returned 1 exit status
... which is correct: crt0.o has not yet been built for the target
Finally, these are the full configure arguments to newlib as per
--cache-file=./config.cache --with-newlib --enable-multilib
gnu-as --with-gnu-ld --with-newlib --verbose --enable-threads
I can't really work out what I'm doing wrong to prevent make from
building crt0 first. Can anyone help me out? :)
My machine is Ubuntu Lucid x64. Host gcc is 4.4.3.
Thanks heaps in advance,
More information about the users