<DIV>
<P class=MsoPlainText><FONT color=#4040ff><SPAN style="mso-fareast-font-family: 'MS Mincho'">Dear All,<BR><BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>When I am trying to use floating point values in hello_world.c (U-Boot/examples), I am getting the&nbsp;following linker errors:<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>? ( 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&nbsp;this libgcc.a)<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>powerpc-elf-ld -g -Ttext 0xF00000 -o hello_world -e hello_world hello_world.o </SPAN><SPAN style="mso-fareast-font-family: 'MS Mincho'">libsyscall.a <FONT color=#ff00ff>libgcc.a<SPAN style="mso-tab-count: 1"> </SPAN></FONT></SPAN></FONT></P>
<P class=MsoPlainText><FONT color=#4040ff><SPAN style="mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>powerpc-elf-ld: fp-bit.o: compiled normally and linked with modules compiled with - </SPAN></FONT><FONT color=#4040ff><SPAN style="mso-fareast-font-family: 'MS Mincho'">mrelocatable</SPAN></FONT></P>
<P class=MsoPlainText><FONT color=#4040ff><SPAN style="mso-fareast-font-family: 'MS Mincho'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-fareast-font-family: 'MS Mincho'"></FONT><FONT color=#4040ff>Bad value: failed to merge target specific data of file libgcc.a(fp-bit.o)<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>powerpc-elf-ld: dp-bit.o: compiled normally and linked with modules compiled with -</FONT></SPAN><FONT color=#4040ff><SPAN style="mso-fareast-font-family: 'MS Mincho'">&nbsp;</SPAN><SPAN style="mso-fareast-font-family: 'MS Mincho'">&nbsp; mrelocatable</SPAN></FONT></P>
<P class=MsoPlainText><SPAN style="mso-fareast-font-family: 'MS Mincho'"></SPAN><FONT color=#4040ff><SPAN style="mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Bad value: failed to merge target specific data of file libgcc.a(dp-bit.o)<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>powerpc-elf-ld: _lshrdi3.o: compiled normally and linked with modules compiled with - mrelocatable<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Bad value: failed to merge target specific data of file libgcc.a(_lshrdi3.o)<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>make[1]: *** [hello_world.srec] Error 1<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>make[1]: Leaving directory `/usr/nagraj/ppctools/uboot/VT/examples'<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>make: *** [subdirs] Error 1<BR><SPAN style="mso-tab-count:
 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>And does U-boot supports mon_printf("%f") (floating point values printing) ?<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Before this I have compiled hello_world.c with the following command without any errors<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>powerpc-elf-gcc -g<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>-Os<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>-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<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>-DCONFIG_PPC -D__powerpc__ -DCONFIG_4xx -ffixed-r2
 -ffixed-r29 -mstring -Wa,-m405 -mcpu=405 <FONT color=#ff4040>-msoft-float </FONT>-Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c<BR><SPAN style="mso-tab-count: 1"></SPAN></SPAN></FONT></P>
<P class=MsoPlainText><FONT color=#4040ff><SPAN style="mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-tab-count: 1">&nbsp; </SPAN>I have configured U-boot for Walnut405 board and it is working fine. Since PowerPC405 doesn't support<SPAN style="mso-spacerun: yes"> </SPAN>hardware floting-point I am trying to use soft float routines.<BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><BR><SPAN style="mso-spacerun: yes"> </SPAN>First I have build cross compiler(On X86 RedHat Linux-9.0 Host<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>for PPC405 target) tools with following commands<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ mkdir build-binutils<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ mkdir build-gcc<BR><SPAN style="mso-tab-count:
 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ mkdir build-newlib<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ mkdir install<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ export TARGET=powerpc-elf<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ export PREFIX=`pwd`/install<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ export PATH=$PATH:$PREFIX/bin<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ set | grep PREFIX<BR><SPAN style="mso-tab-count:
 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ tar xzvf <FONT color=#ff00ff>binutils-2.11.2.tar.gz<BR></FONT><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ tar xzvf <FONT color=#ff00ff>gcc-2.95.3.tar.gz</FONT><BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ tar xzvf <FONT color=#ff00ff>newlib-1.9.0.tar.gz<BR></FONT><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="mso-tab-count: 1">&nbsp; </SPAN>$ cd build-binutils<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ ../binutils-2.11.2/configure --target=$TARGET --prefix=$PREFIX<BR><SPAN
 style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ make all install 2&gt;&amp;1 | tee make.log<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ cd ..<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ cd build-gcc<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ ../gcc-2.95.3/configure --target=$TARGET --prefix=$PREFIX \ <FONT color=#ff00ff>--nfp<BR></FONT><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>--with-newlib --without-headers --with-gnu-as \<BR><SPAN style="mso-tab-count:
 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>--with-gnu-ld --disable-shared --enable-languages=c<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ make all-gcc install-gcc 2&gt;&amp;1 | tee make.log<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ cd ..<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ cd build-newlib<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ ../newlib-1.9.0/configure --target=$TARGET --prefix=$PREFIX<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count:
 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ make all install 2&gt;&amp;1 | tee make.log<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ cd ..<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ cd build-gcc &amp;&amp; rm -rf *<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ ../gcc-2.95.3/configure --target=$TARGET --prefix=$PREFIX \ <FONT color=#ff00ff>--nfp<BR></FONT><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>--with-gnu-as --with-gnu-ld --enable-languages=c<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </SPAN>$ make all install 2&gt;&amp;1 | tee make.log<BR><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$ cd ..<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN></FONT></P>
<P class=MsoPlainText><FONT color=#4040ff><SPAN style="mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; Any help would be appreciated. And advanced thanks.</SPAN></SPAN></FONT></P>
<P class=MsoPlainText><FONT color=#4040ff><SPAN style="mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-spacerun: yes">With Best Regards,</SPAN></SPAN></FONT></P>
<P class=MsoPlainText><FONT color=#4040ff><SPAN style="mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-spacerun: yes">Nag</SPAN></SPAN></FONT></P>
<P class=MsoPlainText><SPAN style="mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-spacerun: yes"></SPAN></SPAN>&nbsp;</P>
<P class=MsoPlainText><SPAN style="mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></SPAN></P>
<P class=MsoPlainText><SPAN style="mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-spacerun: yes"></SPAN></SPAN>&nbsp;</P>
<P class=MsoPlainText><SPAN style="mso-fareast-font-family: 'MS Mincho'"><SPAN style="mso-spacerun: yes"></SPAN><BR>&nbsp;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P></DIV><p><font face=arial size=-1>Do you Yahoo!?<br>
<a href="http://taxes.yahoo.com/filing.html"><b>Yahoo! Finance Tax Center</a></b> - File online. File on time.