uboot1.1.6——undefined reference to ‘raise’

来源:互联网 发布:白夜追凶国外知乎 编辑:程序博客网 时间:2024/06/06 05:46

友善mini2440移植的uboot1.1.6,arm-linux-gcc版本4.3.2

编译报错:

...
arm-linux-ld: failed to merge target specific data of file drivers/nand/libnand.a(nand_util.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] 错误 1

解决办法:

http://blog.csdn.net/wwd574000815/article/details/6208379

将cpu /arm920t/config.mk 改为

PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno-common -ffixed-r8 /
    -msoft-float

PLATFORM_CPPFLAGS +=

# =========================================================================
#
# Supply options according to compiler version
#
# =========================================================================
PLATFORM_CPPFLAGS +=$(call cc-option,)
PLATFORM_RELFLAGS +=$(call cc-option,$(call cc-option,))


在uboot的根目录Makefile中把PLATFORM_LIBS 修该为如下值
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
然后重新 make distclean  make   应就能通过了