JZ2440 编译U-boot1.1.6 undefined reference to ‘raise’

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 `raise'
make: *** [u-boot] Error 1

解决方法:

1.修改Makefile文件中的PLATFORM_LIBS

将:

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 

就可以编译通过啦~!

你可能感兴趣的:(U-Boot)