Ubuntu安装gcc-arm-linux-gnueabi

[原文地址:http://www.cnx-software.com/2011/03/28/installing-linaro-arm-cross-toolchain-on-ubuntu/]

1. You can easily install Linaro arm cross-compiler on Ubuntu 10.04 (Lucid), 10.10 (Maverick) and 11.04 (Natty) as follows:


    "sudo apt-get install gcc-arm-linux-gnueabi"


    This will install Linaro cross-toolchain version 4.4 on Ubuntu 10.04 and 10.10, and version 4.5 on Ubuntu 11.04.

    通过如下命令,来检查安装的arm-linux-gnueabi-gcc version

    jaufranc@CNX-TOWER:~$ arm-linux-gnueabi-gcc -v
           Using built-in specs.
           Target: arm-linux-gnueabi
           Configured with: ../src/configure -v –with-pkgversion=’Ubuntu/Linaro 4.4.4-14ubuntu4′ –with-bugurl=file:///usr/share/doc/gcc-           4.4/README.Bugs –enable-languages=c,c++,fortran,objc,obj-c++ –prefix=/usr –program-suffix=-4.4 –enable-shared –enable-           multiarch –enable-linker-build-id –with-system-zlib –libexecdir=/usr/lib –without-included-gettext –enable-threads=posix –with-           gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.4.5 –libdir=/usr/lib –enable-nls –enable-clocale=gnu –enable-libstdcxx-           debug –enable-objc-gc –disable-sjlj-exceptions –with-arch=armv7-a –with-float=softfp –with-fpu=vfpv3-d16 –with-   

     mode=thumb –disable-werror –enable-checking=release –program-prefix=arm-linux-gnueabi- –includedir=/usr/arm-linux-     

     gnueabi/include –build=i686-linux-gnu –host=i686-linux-gnu –target=arm-linux-gnueabi –with-headers=/usr/arm-linux- 

      gnueabi/include –with-libs=/usr/arm-linux-gnueabi/lib
             Thread model: posix
            gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu4)


2. You can also install the latest version 4.5 (recommended) on Lucid and Maverick:

     sudo add-apt-repository ppa:linaro-maintainers/toolchain
            sudo apt-get update
            sudo apt-get install gcc-4.5-arm-linux-gnueabi


If you are using an ARM platform running Ubuntu 10.10 or higher, you could also use the native GCC compiler.


sudo apt-get install gcc-4.5


Read more: http://www.cnx-software.com/2011/03/28/installing-linaro-arm-cross-toolchain-on-ubuntu/#ixzz23P6Zck8C

       3. 也可以从Linaro website直接下载对应GCC版本的binary 文件,解压缩即可.

            如果编译过程中,出现:

             /usr/lib/gcc/arm-linux-gnueabi/4.6/include/stdarg.h not found. etc

            可以"apt-get install gcc-4.6-arm-linux-gnueabi "即可。

你可能感兴趣的:(Ubuntu安装gcc-arm-linux-gnueabi)