<div class="gmail_quote">On Wed, Mar 30, 2011 at 5:28 AM, Angel Ivan Castell Rovira <span dir="ltr"><<a href="mailto:al004140@gmail.com">al004140@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
but the uClibc compilation with 'make' fails at some linking stage. <br><br>* Target architecture:<br>$ cat /proc/cpuinfo <br>Processor    : ARM920T rev 0 (v4l)<br>BogoMIPS    : 199.47<br>Features    : swp half thumb <br>

CPU implementer    : 0x41<br>CPU architecture: 4T<br>CPU variant    : 0x1<br>CPU part    : 0x920<br>CPU revision    : 0<br><br>* Environ variables for the 'clfs' user:<br>
<br>$ env | grep CLFS<br>CLFS_HOST=i486-cross-linux-gnu<br>CLFS_TARGET=armv4-linux-uclibc<br>CLFS_ARM_ARCH=armv4t<br>CLFS_ARM_MODE=arm<br>CLFS=/opt/GNU-CPT/<br>CLFS_ARCH=arm<br>CLFS_ABI=apcs-gnu<br>CLFS_ENDIAN=little<br>
CLFS_FLOAT=soft<br>
<br><br>* Package or section in which the problem was encountered: section 6.11. uClibc-0.9.31<br><br>* Steps to reproduce the problem (following all the steps in the previous book section):<br><br>$ wget <a href="http://www.uclibc.org/downloads/uClibc-0.9.31.tar.bz2" target="_blank">http://www.uclibc.org/downloads/uClibc-0.9.31.tar.bz2</a><br>

$ wget <a href="http://patches.cross-lfs.org/embedded-dev/uClibc-0.9.31-configs-2.patch" target="_blank">http://patches.cross-lfs.org/embedded-dev/uClibc-0.9.31-configs-2.patch</a><br>$ tar xvfj uClibc-0.9.31.tar.bz2<br>
$ cd uClibc-0.9.31<br>
$ patch -Np1 -i ../uClibc-0.9.31-configs-2.patch<br>$ cp -v clfs/config.${CLFS_ARCH}.${CLFS_ENDIAN} .config<br>$ if [ "${CLFS_ABI}" == "aapcs" ] || [ "${CLFS_ABI}" == "aapcs-linux" ]; then<br>

      sed -i s/CONFIG_ARM_OABI/CONFIG_ARM_EABI/g .config;<br>fi<br>$ make oldconfig<br>$ make<br><br>[...]<br>In file included from ./ldso/include/dl-string.h:11:0,<br>                 from ./ldso/include/ldso.h:40,<br>                 from libc/misc/elf/dl-iterate-phdr.c:16:<br>

./ldso/ldso/arm/dl-sysdep.h: In function 'elf_machine_load_address':<br>./ldso/ldso/arm/dl-sysdep.h:119:37: warning: taking address of expression of type 'void'<br>  CC libc/misc/internals/__uClibc_main.os<br>

  CC libc/inet/rpc/rpc_thread.os<br>  CC libc/stdlib/atexit.os<br>  AR cr lib/libc.a<br>  STRIP -x -R .note -R .comment lib/libc.a<br>  AR cr lib/uclibc_nonshared.a<br>  STRIP -x -R .note -R .comment lib/uclibc_nonshared.a<br>

  AR cr libc/libc_so.a<br>  STRIP -x -R .note -R .comment libc/libc_so.a<br>  LD <a href="http://libuClibc-0.9.31.so" target="_blank">libuClibc-0.9.31.so</a><br>libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':<br>
_fpmaxtostr.c:(.text+0xbc): undefined reference to `__nedf2'<br>
_fpmaxtostr.c:(.text+0xe0): undefined reference to `__eqdf2'<br>_fpmaxtostr.c:(.text+0xfc): undefined reference to `__divdf3'<br>_fpmaxtostr.c:(.text+0x108): undefined reference to `__ltdf2'<br>_fpmaxtostr.c:(.text+0x17c): undefined reference to `__muldf3'<br>

_fpmaxtostr.c:(.text+0x348): undefined reference to `__gedf2'<br>_fpmaxtostr.c:(.text+0x40c): undefined reference to `__fixunsdfsi'<br>libc/libc_so.a(__psfs_do_numeric.os): In function `__psfs_do_numeric':<br>

__psfs_do_numeric.c:(.text+0x53c): undefined reference to `__truncdfsf2'<br>collect2: ld returned 1 exit status<br>make: *** [lib/libc.so] Error 1<br><br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
But that  does not fix the problem for me (still the same problem).<br></blockquote><div><br></div><div>Ivan,</div><div><br></div><div>That's the best problem report I've ever seen!  Thank you for taking the time to include all the information asked for in the book. :)</div>
<div><br></div><div>When you built GCC-Static, at the bottom of the page, did you do both the:</div><div> make all-gcc all-target-libgcc</div><div>and</div><div><div> make install-gcc install-target-libgcc</div></div><div>
?</div><div><br></div><div>If so, can you delete your uClibc directories and untar it again, start from the beginning of the uClibc instructions.  But when you get to the "make oldconfig" step, instead run "make menuconfig" and go to "Target Architecture Features and Options" section and deselect "Target CPU has a floating point unit (FPU)".  Then continue with the "make" step to build uClibc.  I believe this will force uClibc to perform soft floating point for you rather than rely on the kernel or a hard FPU.  This might prevent attempting to link against the f2 and f3 parts of libgcc.</div>
<div><br></div><div>The default config for uClibc in the book right now somewhat assumes that an FPU is present.  I hadn't realized this.  This might be your issue.  I believe the undefined references to things ending in f2 or f3 are floating point items in libgcc (according to: <a href="http://embdev.net/topic/129076">http://embdev.net/topic/129076</a>).</div>
<div><br></div><div>-Andrew</div></div>