I've searched all over internet how to solve libgcc error when building cross compiler.
But none of them didn't help to solve my problem.
The os that I'm using is ubuntu 14.04.
The versions that I use to create cross compiler are:
gcc 4.9.0
binutils 2.9.1
gmp 6.0.0
mpfr 3.1.2
mpc 1.0.2
Errors that I get.
$> make all-target-libgcc
$> make install-target-libgccchecking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-elf
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... mawk
checking for i686-elf-ar... i686-elf-ar
checking for i686-elf-lipo... i686-elf-lipo
checking for i686-elf-nm... /home/test/src/build-gcc/./gcc/nm
checking for i686-elf-ranlib... i686-elf-ranlib
checking for i686-elf-strip... i686-elf-strip
checking whether ln -s works... yes
checking for i686-elf-gcc... /home/test/src/build-gcc/./gcc/xgcc -B/home/test/src/build-gcc/./gcc/ -B/home/test/opt/cross/i686-elf/bin/ -B/home/test/opt/cross/i686-elf/lib/ -isystem /home/test/opt/cross/i686-elf/include -isystem /home/test/opt/cross/i686-elf/sys-include
checking for suffix of object files... configure: error: in `/home/test/src/build-gcc/i686-elf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make: *** [configure-target-libgcc] Error 1
I don know if this has somthing to do with the error, but binutils gave also an error./bin/bash ../gcc-4.9.0/mkinstalldirs /home/test/opt/cross /home/test/opt/cross
make[1]: Entering directory `/home/test/src/build-gcc/i686-elf/libgcc'
make[1]: *** No rule to make target `install'. Stop.
make[1]: Leaving directory `/home/test/src/build-gcc/i686-elf/libgcc'
make: *** [install-target-libgcc] Error 2
$> make install
usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sbin" ldconfig -n /home/test/opt/cross/lib
------------------------------------------------------------------------------
Libraries have been installed in:
/home/test/opt/cross/lib
To link against installed libraries in a given directory, LIBDIR,
you must use the `-LLIBDIR' flag during linking.
You will also need to do one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
------------------------------------------------------------------------------
make[1]: Leaving directory `/home/test/src/build-binutils/opcodes'
make[1]: Entering directory `/home/test/src/build-binutils/binutils'
make[1]: *** No rule to make target `../libiberty/libiberty.a', needed by `size'. Stop.
make[1]: Leaving directory `/home/test/src/build-binutils/binutils'
make: *** [install-binutils] Error 2