Placement of signgam in libc instead of libm
Corinna Vinschen
vinschen@redhat.com
Mon Apr 24 08:52:02 GMT 2023
On Apr 20 16:20, Joel Sherrill wrote:
> Hi
>
> While double some checking that all references used by the long double math
> routines Jennifer are resolved when linking, we have found a small oddity.
>
> The file libc/reent/signgam.c is implemented as follows:
>
> int *
> __signgam (void)
> {
> return &_REENT_SIGNGAM(_REENT);
> }
>
> When TLS is enabled, the macro _REENT_SIGNGAM resolves to
> _tls_gamma_signgam which is in the file libm/math/w_lgamma.c. This creates
> the first reference from libc to libm that I have ever seen and requires
> explicitly linking with -lm -lc when using lgamma().
>
> Would anyone be opposed to moving this method to libm/math?
Not me, but Jeff added this to libc for a reason, I guess...?
Corinna
More information about the Newlib
mailing list