ubuntu10.04 上编译armv4t交叉编译工具链

主机OS:ubuntu10.04

目标机:arm

目的:支持armv4指令集的交叉编译工具链

参考网址:

http://blog.csdn.net/chen_zhongming/article/details/6680596

http://blog.csdn.net/eric_tao/article/details/8171680

然后,使用crosstool-ng1.9.3建立交叉工具链。之所以用crosstool-ng是因为crosstool-ng是新的用来建立交叉工具链的工具,它是crosstool的替换者。crosstool的gcc版本只能到4.1.1,无法编译版本高于2.6.29的linux内核。而crosstool-ng一直保持着更新,现在最新能够建立 gcc 4.3.2版本,可用来编译最新内核。


【出现错误】:

[INFO ]  Installing binutils: done in 63.49s (at 02:53)
[INFO ]  =================================================================
[INFO ]  Installing static core C compiler
[EXTRA]    Configuring static core C compiler
[ERROR]    checking for C compiler default output file name... configure: error: C compiler cannot create executables
[ERROR]    Build failed in step 'Installing static core C compiler'
[ERROR]    Error happened in '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/cc/gcc.sh' at line # 203 in function 'do_cc_core'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/cc/gcc.sh' at line # 52 in function 'do_cc_core_pass_1'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 597 in function 'main'
[ERROR]    Look at '/opt/crosstool-ng/arm-unknown-linux-gnueabi/build.log' for more info on this error.
[ERROR]  (elapsed: 2:52.53)
[02:53] / make[1]: *** [build] Error 77
make: *** [build.4] Error 2
root@iefswang-desktop:/home/crosstool-ng/build# vim /opt/crosstool-ng/arm-unknown-linux-gnueabi/build.log

【解决方法】:

ubuntu10.04默认使用 gcc4.1,将gcc升级为gcc4.4就可以编译通过。

apt-get install gcc-4.4

rm /usr/bin/gcc

ln -s /usr/bin/gcc-4.4 /usr/bin/gcc


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值