On Fri, Oct 17, 2008 at 07:18:16PM +0100, Eduardo Brito wrote: > Thanks for the quick reply. Now I am getting this messages: > > Checking multilib configuration for libgcc... > Configuring in mipsel-x86-linux/libgcc > configure: loading cache ./config.cache > checking for --enable-version-specific-runtime-libs... no > checking for a BSD-compatible install... /usr/bin/install -c > checking for gawk... gawk > checking build system type... i686-pc-linux-gnu > checking host system type... mipsel-x86-linux-gnu > checking for mipsel-x86-linux-ar... mipsel-x86-linux-ar > checking for mipsel-x86-linux-lipo... mipsel-x86-linux-lipo > checking for mipsel-x86-linux-nm... /home/eduardo/BIC/./gcc/nm > checking for mipsel-x86-linux-ranlib... mipsel-x86-linux-ranlib > checking for mipsel-x86-linux-strip... mipsel-x86-linux-strip > checking whether ln -s works... yes > checking for mipsel-x86-linux-gcc... /home/eduardo/BIC/./gcc/xgcc > -B/home/eduardo/BIC/./gcc/ -B/usr/local//mipsel-x86-linux/bin/ > -B/usr/local//mipsel-x86-linux/lib/ -isystem > /usr/local//mipsel-x86-linux/include -isystem > /usr/local//mipsel-x86-linux/sys-include > checking for suffix of object files... configure: error: cannot compute > suffix of object files: cannot compile > See `config.log' for more details. > make[1]: *** [configure-target-libgcc] Error 1 > make[1]: Leaving directory `/home/eduardo/BIC' > make: *** [all] Error 2 > > The problem is the "checking for suffix of object files... configure: > error: cannot compute suffix of object files: cannot compile" > I looked at config.log but I don't know what I should be looking at... > Also, I think I should use newlib with the cross compiler... How can I > do that? Two problems that usually show up when you are trying to build libgcc with a cross compiler: 1) You need to have the directory where the cross tools are stored in your PATH. Just using configure options --with-as= and --with-ld= is not good enough, because libgcc needs some of the other binutils tools. 2) You need to have a pre-built newlib directory, and use the --with-sysroot= configure option option so that the compiler can find the appropriate include files and libraries. Of course if you are doing a port for the first time, it becomes tricky, in that you typically let the build fail in libgcc. The way I've done it in the past is: a) Configure binutils with --prefix=<bindir>. b) Build and install bintuils. c) Configure gcc with --prefix=<gccdir> --with-as=<bindir>/bin/<target>-as --with-ld=<bindir>/bin/<target>-ld. Build, and compiler fails in libgcc. Go into the gcc directory and do make install. d) Put <gccdir>/bin and <bindir>/bin on your PATH. e) Configure newlib with --prefix=<newlibdir>. Build and install. f) Go back to the binutils build directory, reconfigure adding --with-sysroot=<newlibdir>. Build and install. g) Go back to the gcc build directory, reconfigure adding --with-sysroot=<newlibdir>. Hopefully at this time, the build and install should succeed. -- Michael Meissner, IBM 4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA meissner@xxxxxxxxxxxxxxxxxx