安装4.3.1-eabi-armv6编译器
4.3.1-eabi-armv6是三星官方为其armv6架构处理器维护的一套编译器,不过我装起来遇到不少麻烦
1、执行arm-linux-gcc报错
[kyon@SEP4020 bin]$ arm-linux-gcc
arm-linux-gcc: no input files
[kyon@SEP4020 bin]$
解决方法:必须将该编译器解压到/usr/local/arm/目录,因为里面有很多地方指明了绝对路径
2、make提示mpfr库找不到
[kyon@SEP4020 m8-android-kernel]$ make
CHK include/linux/version.h
make[1]: “include/asm-arm/mach-types.h”是最新的。
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
/usr/local/arm/4.3.1-eabi-armv6/usr/bin-ccache/../libexec/gcc/arm-samsung-linux-gnueabi/4.3.1/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
make[1]: *** [kernel/bounds.s] 错误 1
make: *** [prepare0] 错误 2
解决方法:其实是有这个库的,就在/usr/local/arm/4.3.1-eabi-armv6/mpfr/lib
在.bashrc中添加一个环境变量
export LD_LIBRARY_PATH=/usr/local/arm/4.3.1-eabi-armv6/mpfr/lib
然后在source .bashrc即可
最后来看这个编译器有啥好处:
[kyon@SEP4020 ~]$ arm-linux-gcc -v
Using built-in specs.
Target: arm-samsung-linux-gnueabi
Configured with: /home/scsuh/workplace/final/toolchain-script/toolchain_build_arm/gcc-4.3.1/configure --prefix=/usr --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu --target=arm-samsung-linux-gnueabi --enable-languages=c,c++ --with-sysroot=/usr/local/arm/4.3.1-eabi-armv6 --with-build-time-tools=/usr/local/arm/4.3.1-eabi-armv6/usr/arm-samsung-linux-gnueabi/bin --enable-__cxa_atexit --enable-target-optspace --with-gnu-ld --with-pkgversion='for S3C64XX Samsung Electronics AP Development Team' --enable-shared --with-gmp=/usr/local/arm/4.3.1-eabi-armv6/gmp --with-mpfr=/usr/local/arm/4.3.1-eabi-armv6/mpfr --disable-nls --enable-threads --disable-multilib --disable-decimal-float --with-arch=armv6 --with-float=softfp --with-fpu=vfp --enable-symvers=gnu
Thread model: posix
gcc version 4.3.1 (for S3C64XX Samsung Electronics AP Development Team)
1)编译时默认使用硬件浮点单元--with-float=softfp --with-fpu=vfp
2)默认架构armv6 --with-arch=armv6
3)有自己的mpfr库
等等
阅读(1453) | 评论(0) | 转发(0) |