[U-Boot-Users] PPC405 float point linker error
Nag
seesairaju at yahoo.com
Mon Mar 22 14:09:50 CET 2004
Dear All,
When I am trying to use floating point values in hello_world.c (U-Boot/examples), I am getting the following linker errors: ? ( I have copied libgcc.a from /install/lib/gcc-lib/ppc-elf/2.93.3 into Uboot/examples directory and linked hello_world.o with this libgcc.a)
powerpc-elf-ld -g -Ttext 0xF00000 -o hello_world -e hello_world hello_world.o libsyscall.a libgcc.a
powerpc-elf-ld: fp-bit.o: compiled normally and linked with modules compiled with - mrelocatable
Bad value: failed to merge target specific data of file libgcc.a(fp-bit.o)
powerpc-elf-ld: dp-bit.o: compiled normally and linked with modules compiled with - mrelocatable
Bad value: failed to merge target specific data of file libgcc.a(dp-bit.o)
powerpc-elf-ld: _lshrdi3.o: compiled normally and linked with modules compiled with - mrelocatable
Bad value: failed to merge target specific data of file libgcc.a(_lshrdi3.o)
make[1]: *** [hello_world.srec] Error 1
make[1]: Leaving directory `/usr/nagraj/ppctools/uboot/VT/examples'
make: *** [subdirs] Error 1
And does U-boot supports mon_printf("%f") (floating point values printing) ?
Before this I have compiled hello_world.c with the following command without any errors
powerpc-elf-gcc -g -Os -mrelocatable -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFFF80000 -I/usr/nagraj/ppctools/uboot/VT/include -fno-builtin -nostdinc -isystem /usr/nagraj/gcc/install/lib/gcc-lib/powerpc-elf/2.95.3/ include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_4xx -ffixed-r2 -ffixed-r29 -mstring -Wa,-m405 -mcpu=405 -msoft-float -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c
I have configured U-boot for Walnut405 board and it is working fine. Since PowerPC405 doesn't support hardware floting-point I am trying to use soft float routines.
First I have build cross compiler(On X86 RedHat Linux-9.0 Host for PPC405 target) tools with following commands
$ mkdir build-binutils
$ mkdir build-gcc
$ mkdir build-newlib
$ mkdir install
$ export TARGET=powerpc-elf
$ export PREFIX=`pwd`/install
$ export PATH=$PATH:$PREFIX/bin
$ set | grep PREFIX
$ tar xzvf binutils-2.11.2.tar.gz
$ tar xzvf gcc-2.95.3.tar.gz
$ tar xzvf newlib-1.9.0.tar.gz
$ cd build-binutils
$ ../binutils-2.11.2/configure --target=$TARGET --prefix=$PREFIX
$ make all install 2>&1 | tee make.log
$ cd ..
$ cd build-gcc
$ ../gcc-2.95.3/configure --target=$TARGET --prefix=$PREFIX \ --nfp
--with-newlib --without-headers --with-gnu-as \
--with-gnu-ld --disable-shared --enable-languages=c
$ make all-gcc install-gcc 2>&1 | tee make.log
$ cd ..
$ cd build-newlib
$ ../newlib-1.9.0/configure --target=$TARGET --prefix=$PREFIX
$ make all install 2>&1 | tee make.log
$ cd ..
$ cd build-gcc && rm -rf *
$ ../gcc-2.95.3/configure --target=$TARGET --prefix=$PREFIX \ --nfp
--with-gnu-as --with-gnu-ld --enable-languages=c
$ make all install 2>&1 | tee make.log
$ cd ..
Any help would be appreciated. And advanced thanks.
With Best Regards,
Nag
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20040322/96a484db/attachment.htm
More information about the U-Boot
mailing list