【UBoot】Uboot与EABI

【UBoot】Uboot与EABI

在使用arm-unknown-linux-gnueabi工具链编绎u-boot时,发生了以下错误

arm-linux-ld: ERROR: Source object /opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_udivsi3.o) has EABI version 4, but target u-boot has EABI version 0
arm-linux-ld: failed to merge target specific data of file /opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_udivsi3.o)
arm-linux-ld: ERROR: Source object /opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_divsi3.o) has EABI version 4, but target u-boot has EABI version 0
arm-linux-ld: failed to merge target specific data of file /opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_divsi3.o)
arm-linux-ld: ERROR: Source object /opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_umodsi3.o) has EABI version 4, but target u-boot has EABI version 0
arm-linux-ld: failed to merge target specific data of file /opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_umodsi3.o)
arm-linux-ld: ERROR: Source object /opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_modsi3.o) has EABI version 4, but target u-boot has EABI version 0
arm-linux-ld: failed to merge target specific data of file /opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_modsi3.o)
arm-linux-ld: ERROR: Source object /opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_dvmd_lnx.o) has EABI version 4, but target u-boot has EABI version 0
arm-linux-ld: failed to merge target specific data of file /opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_dvmd_lnx.o)
/opt/arm/4.3.2/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/libgcc.a(_dvmd_lnx.o): In function `__div0':
/opt/build_toolchain/targets/src/gcc-4.3.2/libgcc/../gcc/config/arm/lib1funcs.asm:1079: undefined reference to `raise'
make: *** [u-boot] 错误 1

网上有三种解决方法:

1. patch
    
http://docs.openmoko.org/trac/ticket/180
    
    测试了下,对我的工具链没有什么效果

2. 实现 __div0的空返回函数
    
http://www.codesourcery.com/archives/arm-gnu/msg02332.html
    
    这个貌似一样需要重新编译工具链,不考虑...

3. 换一个非EABI的工具链来编译
    比如我使用的:
arm-unknown-linux-gnu
虽然这个也很耗时,不过可以用croostool-ng很方便的建立..
    可以参考我的另一篇文章 
【交叉工具链】用crosstool-ng建立arm-linux 4.3.2 交叉工具链

你可能感兴趣的:(【UBoot】Uboot与EABI)