美文网首页
Ubuntu 安装arm-linux-gcc

Ubuntu 安装arm-linux-gcc

作者: 码掺和_夏尼 | 来源:发表于2018-12-12 14:28 被阅读20次

    【arm-linux-gcc 4.4.3下载链接】

    解压:tar -xjvf arm_linux_gcc.tar.bz2或者其它的arm-linux-gcc包
    e.g. 解压出来文件夹为:arm_linux_gcc

    复制到自己的目录,比如:/usr/local/arm_linux_gcc_443
    sudo cp -r ./arm-linux-gcc /usr/local/arm_linux_gcc_443

    配置路径,方便使用:sudo vim ~/.bashrc,在最后一行加上PATH=/usr/local/gcc_arm_linux_443/opt/FriendlyARM/toolschain/4.4.3/bin:$PATH保存退出(路径依照自己实际配置即可)。
    让路径配置生效,终端输入:source ~/.bashrc,然后终端输入arm-按两下tab就会列出所有候选选项。

    64位的Ubuntu输入arm-linux-gcc -v会提示错误“不是文件夹或找不到目录”这类的错误,这时我们要安装一下32位的库:
    终端输入命令:sudo apt-get install libc6:i386 libstdc++6:i386 libncurses5:i386 zlib1g:i386
    安装完毕后,再次输入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)

    相关文章

      网友评论

          本文标题:Ubuntu 安装arm-linux-gcc

          本文链接:https://www.haomeiwen.com/subject/yuwuhqtx.html