This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] link libgcc_s.so against a lib containing copysignl on powerpc-*-linux-uclibc
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Oct 2008 02:26:32 +0000 (UTC)
- Subject: Re: [PATCH] link libgcc_s.so against a lib containing copysignl on powerpc-*-linux-uclibc
- References: <20081007141721.GG9250@mx.loc>
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