[U-Boot] u-boot-1.2.0 Compilation error with codesourcecry\sourcecry_g++_lite\2007q1-21
Bhavna YADAV
bhavna.yadav at st.com
Thu Apr 16 06:24:51 CEST 2009
Hello friends,
I am trying to compile the u-boot-1.2.0 with arm-none-linux-gnueabi-gcc i.e codesourcery tool chain but I get compilation error
Which seems because of EABI problem. Error messages what I get is given below:
a - cmd_mac.o
a - cmd_custom.o
make[1]: Leaving directory `/data/csd_sw/spear/integration/bhavna/Customer/SNOM/spear-voip/spear-snom/codesourcery/src/drivers/u-boot-1.2.0/common'
UNDEF_SYM=`arm-none-linux-gnueabi-objdump -x lib_generic/libgeneric.a board/spearbasic/libspearbasic.a cpu/arm926ejs/libarm926ejs.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
cd /data/csd_sw/spear/integration/bhavna/Customer/SNOM/spear-voip/spear-snom/codesourcery/src/drivers/u-boot-1.2.0 && arm-none-linux-gnueabi-ld -Bstatic -T /data/csd_sw/spear/integration/bhavna/Customer/SNOM/spear-voip/spear-snom/codesourcery/src/drivers/u-boot-1.2.0/board/spearbasic/u-boot.lds -Ttext 0x00700000 $UNDEF_SYM cpu/arm926ejs/start.o \
--start-group lib_generic/libgeneric.a board/spearbasic/libspearbasic.a cpu/arm926ejs/libarm926ejs.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a --end-group -L /sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t -lgcc \
-Map u-boot.map -o u-boot
/sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t/libgcc.a(_udivsi3.o): In function `__aeabi_uidiv':
/scratch/paul/lite/src/gcc-4.2/gcc/config/arm/lib1funcs.asm:(.text+0x0): multiple definition of `__udivsi3'
lib_arm/libarm.a(_udivsi3.o):/data/csd_sw/spear/integration/bhavna/Customer/SNOM/spear-voip/spear-snom/codesourcery/src/drivers/u-boot-1.2.0/lib_arm/_udivsi3.S:17: first defined here
arm-none-linux-gnueabi-ld: ERROR: Source object /sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t/libgcc.a(_udivdi3.o) has EABI version 4, but target u-boot has EABI version 0
arm-none-linux-gnueabi-ld: failed to merge target specific data of file /sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t/libgcc.a(_udivdi3.o)
arm-none-linux-gnueabi-ld: ERROR: Source object /sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t/libgcc.a(_udivsi3.o) has EABI version 4, but target u-boot has EABI version 0
arm-none-linux-gnueabi-ld: failed to merge target specific data of file /sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t/libgcc.a(_udivsi3.o)
arm-none-linux-gnueabi-ld: ERROR: Source object /sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t/libgcc.a(_clz.o) has EABI version 4, but target u-boot has EABI version 0
arm-none-linux-gnueabi-ld: failed to merge target specific data of file /sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t/libgcc.a(_clz.o)
/sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
make: *** [u-boot] Error 1
To resolve the compilation Issue of u-boot with codesourcery(EABI toolchain) I changed the config.mk file available in board specific folder
PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
-msoft-float
PLATFORM_CPPFLAGS += -march=armv4t
# =========================================================================
#
# Supply options according to compiler version # # =========================================================================
#PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu,-mthumb-interwork)
PLATFORM_CPPFLAGS +=$(call cc-option,-mthumb-interwork) PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
PLATFORM_LDFLAGS += --defsym raise=hang
After the Above change the problem saying "multiple definition of `__udivsi3'" and "undefined reference to raise" is eliminated But one problem is still left related to "undefined reference to `__aeabi_unwind_cpp_pr0"
make[1]: Leaving directory `/data/csd_sw/spear/integration/bhavna/Customer/SNOM/spear-voip/spear-snom/codesourcery/src/drivers/u-boot-1.2.0/common'
UNDEF_SYM=`arm-none-linux-gnueabi-objdump -x lib_generic/libgeneric.a board/spearbasic/libspearbasic.a cpu/arm926ejs/libarm926ejs.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
cd /data/csd_sw/spear/integration/bhavna/Customer/SNOM/spear-voip/spear-snom/codesourcery/src/drivers/u-boot-1.2.0 && arm-none-linux-gnueabi-ld -Bstatic -T /data/csd_sw/spear/integration/bhavna/Customer/SNOM/spear-voip/spear-snom/codesourcery/src/drivers/u-boot-1.2.0/board/spearbasic/u-boot.lds -Ttext 0x00700000 --defsym raise=hang $UNDEF_SYM cpu/arm926ejs/start.o \
--start-group lib_generic/libgeneric.a board/spearbasic/libspearbasic.a cpu/arm926ejs/libarm926ejs.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a --end-group -L /sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t -lgcc \
-Map u-boot.map -o u-boot
/sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t/libgcc.a(_divdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
/sw/freeware/pkgs/codesourcecry/sourcecry_g++_lite/2007q1-21/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0
Can somebody please help me to resolve this issue.
Thanks & Regards
Bhavna Yadav
More information about the U-Boot
mailing list