link error with uclibc

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Oct 9 10:44:35 UTC 2009


On Fri, Oct 09, 2009 at 02:19:23AM -0400, Mike Frysinger wrote:
>On Friday 09 October 2009 00:15:10 loody wrote:
>> 2009/10/5 Mike Frysinger <vapier at gentoo.org>:
>> > On Sunday 04 October 2009 12:16:16 loody wrote:
>> >> I cross-compile a standalone test program with toolchain build with
>> >> uclibc. and there are some errors as what I attach at the end of letter.
>> >> I search the uclibc source and I find the  there is no variable,
>> >> __nedf2, in _fpmaxtostr.c.
>> >> but why linker tell me he cannot find it?
>> >> should I link some other libraries before -lc for variable, __nedf2?
>> >
>> > those symbols are from gcc, not uClibc.  if you link statically, it's
>> > your problem to make sure you link everything needed.  especially when
>> > invoking the linker directly.
>> 
>> Why will uClibc need gcc header files while linking?
>> In my opinion, the header files which the static or dynamic lib of
>> uClibc need should already be compiled when building uClibc.
>> Are my assumptions wrong?

just as a sidenote, the linker does not use headers but objects and
libraries, as opposed to the preprocessor..
>
>i didnt say gcc header files as i wasnt referring to them, but in reality, yes 
>gcc provides headers, objects, and libraries that always get used.  you really 
>shouldnt be invoking ld directly let alone making your own linker script.  i 
>cant really imagine any valid use case of doing either of things when creating 
>Linux applications.
>
>you can use the -v flag with gcc to see how it links things and then you can 
>use that to figure out what you're doing wrong.

loody,
your libgcc does lack the functions you mentioned in your first mail.
Note that this is completely unrelated to uClibc, you should ask
questions about gcc on gcc-help at gcc.gnu.org

PS:
Ultimately you will end up doing something like:
http://repo.or.cz/w/buildroot.git?a=blob_plain;f=toolchain/gcc/4.3.3/810-arm-softfloat-libgcc.patch;hb=HEAD


More information about the uClibc mailing list