Fedora20-64bit cross-compiling arm-linux-gcc

 0按照友善之臂的手册建立交叉编译环境时,添加用户变量,最好是去更改 profile 文件

因为 profile 是所有用户都可以使用的,类似于 windows 中的系统变量

而 .bashrc 只有该所属用户可使用,类似于windows 中的用户变量

su root
vi /etc/profile
1添加如下路径在profile文件最后
export PATH=$PATH:/opt/FriendlyARM/toolschain/5.4.3/bin
2 使修改的profile文件立即生效,不用重启
source /etc/profile
 3测试 arm-linux-gcc -v,以下是安装正确的情况:
[hy@localhost ~]$ arm-linux-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /opt/FriendlyARM/mini2440/build-toolschain/working/src/gcc-4.4.3/configure --build=i386-build_redhat-linux-gnu --host=i386-build_redhat-linux-gnu --target=arm-none-linux-gnueabi --prefix=/opt/FriendlyARM/toolschain/4.4.3 --with-sysroot=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sys-root --enable-languages=c,c++ --disable-multilib --with-arch=armv4t --with-cpu=arm920t --with-tune=arm920t --with-float=soft --with-pkgversion=ctng-1.6.1 --disable-sjlj-exceptions --enable-__cxa_atexit --with-gmp=/opt/FriendlyARM/toolschain/4.4.3 --with-mpfr=/opt/FriendlyARM/toolschain/4.4.3 --with-ppl=/opt/FriendlyARM/toolschain/4.4.3 --with-cloog=/opt/FriendlyARM/toolschain/4.4.3 --with-mpc=/opt/FriendlyARM/toolschain/4.4.3 --with-local-prefix=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.4.3 (ctng-1.6.1) 
 4但是由于使用的是 Fedora20-64bit,出现了些要安装64位的库的错误。
4.1以下来安装所需要的文件 glibc.i686:
[hy@localhost ~]$ yum install glibc.i686
 4.2安装所需要的文件 libstdc++:
[hy@localhost ~]$ yum install libstdc++.so
 4.3以上安装完毕后,在进行make 时,还是会提示缺少文件,再安装以下文件 zlib.i686:

 >>这时,交叉编译可通过。

 

参考:

http://blog.chinaunix.net/uid-29532371-id-4616525.html

转载于:https://www.cnblogs.com/hythink/p/5299712.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值