Errors when compiling cross gcc

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.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值