JZ2440 编译Uboot1.1.6 undefined reference to ‘raise’

Posted 不明白就去明白

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JZ2440 编译Uboot1.1.6 undefined reference to ‘raise’相关的知识,希望对你有一定的参考价值。

系统:Ubuntu 12.04.2 LTS 64bit

交叉编译环境:export PATH=$PATH:/usr/local/arm/4.3.2/bin

arm-linux-ld: ERROR: Source object /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_udivdi3.o) has EABI version 5, but target u-boot has EABI version 0
arm-linux-ld: failed to merge target specific data of file /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_udivdi3.o)
arm-linux-ld: ERROR: Source object /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_udivsi3.o) has EABI version 5, but target u-boot has EABI version 0
arm-linux-ld: failed to merge target specific data of file /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_udivsi3.o)
arm-linux-ld: ERROR: Source object /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_dvmd_lnx.o) has EABI version 5, but target u-boot has EABI version 0
arm-linux-ld: failed to merge target specific data of file /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_dvmd_lnx.o)
arm-linux-ld: ERROR: Source object /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_clz.o) has EABI version 5, but target u-boot has EABI version 0
arm-linux-ld: failed to merge target specific data of file /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_clz.o)
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t/libgcc.a(_dvmd_lnx.o): In function `__aeabi_ldiv0:
(.text+0x8): undefined reference to `raisemake: * [u-boot] Error 1

 

解决方法:

1.修改Makefile文件

将:PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc

修改成:

PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc -lc -L/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/lib


2.修改 cpu /arm920t/config.mk 文件

将:

PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)   

PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))

修改成:

PLATFORM_CPPFLAGS +=$(call cc-option,)

PLATFORM_RELFLAGS +=$(call cc-option,$(call cc-option,))

然后

make 100ask24x0_config

    make 

就可以编译通过啦~!

以上是关于JZ2440 编译Uboot1.1.6 undefined reference to ‘raise’的主要内容,如果未能解决你的问题,请参考以下文章

jz2440上内核和文件系统移植

移植u-boot-2012.04.01到JZ2440

[Mini2440 - 011] 配置编译 linux-2.6 内核

JZ2440 linux-3.4.2内核启动报错:Verifying Checksum ... Bad Data CRC

JZ2440_V3_内核驱动程序_点亮一个LED灯

一,Linux-3.19内核移植DM9000驱动(JZ2440)