This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] link libgcc_s.so against a lib containing copysignl on powerpc-*-linux-uclibc


On Tue, 7 Oct 2008, Bernhard Reutner-Fischer wrote:

> Hi,
> 
> The attached patch against trunk links libgcc_s.so against the library
> containing copysignl().
> 
> On glibc the libc.so carries a copy of the math function copysignl() but
> on uClibc math functions like copysignl() live in libm. Since libgcc_s
> contains unresolved symbols, any attempt to link against libgcc_s
> without explicitely specifying -lm fails, resulting in a broken
> bootstrap of the compiler.

The bug here is that libgcc_s contains a reference to a libm function, not 
that it does not link to libm.  Linking libgcc against libm is a bad idea 
and various code in libgcc specifically tries to avoid any dependence on 
libm function.  You should fix the bug of the reference to copysignl 
rather than making libgcc link with libm.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]