When I use below commands to compile cross GCC, errors occurs...
Commands:
../gcc-4.7.2/configure --prefix=$CROSS_GCC_TMP --target=$TARGET \
--with-sysroot=$SYSROOT --with-newlib --enable-languague=c \
--with-mpfr-include=/vita/build/gcc-4.7.2/mpfr/src \
--with-mpfr-lib=/vita/build/gcc-build/mpfr/src/.libs \
--disable-shared --disable-threads \
--disable-decimal-float --disable-libquadmath \
--disable-libmudflap --disable-libgomp \
--disable-nls --disable-libssp
make
Errors:
checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/vita/build/gcc-build'
make: *** [all] Error 2
There is something about c++ in the error, but it shouldn't have anything relates to c++ during the compilation because the cross gcc isn't dependent on c++ and the freestanding gcc shouldn't/can't compile anything relates to c++ since when compiling cross gcc we don't have c library. Finally I found there is a missing "s" for "enable-languages" argument. This correct form should be:
--enable-languages=c
misspelling argument would make compiler ignores it, but compiler doesn't tell you anything about it until the error. It costs many minutes to reach there, also the error is not easy to be located with such little information, that's a very bad feeling for new users even for experts.