mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 21:40:12 +00:00
Remove ENOSYS math/ function stubs.
The math/ directory has various stub implementations of functions (generally long double functions, plus sqrtf128) that set errno to ENOSYS and print a message. These are a relic of when the long double libm implementation in glibc was originally incomplete. They are only present for a limited set of libm functions, not all those that would need implementing for any hypothetical new long double format, and only for long double (plus sqrtf128), not for other floating-point types. I removed the corresponding ENOSYS tests in the testsuite in <https://sourceware.org/ml/libc-alpha/2013-05/msg00599.html>. I think these stubs are an inherently different case from stubs for functionality needing OS-specific implementations, since floating-point formats are generally standardized between modern processors (a new long double format does not seem likely - I'd expect new ports all to have long double = binary128 or long double = binary64 - though _Float16 functions *f16 are entirely possible in future) and libm functions are generally only expected to fail for domain / range / pole errors, not for other unknown system-specific conditions the way the functions needing OS-specific implementations may fail. This patch removes these stub implementations. The effect (which, as noted above, was actually mostly already the case, given the incompleteness of the set of stubs, and was certainly the case if you wanted your libm port to *work* rather than just build) is that any new long double format needs to provide a full set of functions for the build to succeed; any port using ldbl-128 needs to provide sqrtl (possibly using the soft-fp version from another port); any port using ldbl-96 needs to provide all those functions that all of x86_64/i386/ia64/m68k provide rather than getting from the ldbl-96 directory; any port with _Float128 as a type with a distinct format needs to provide sqrtf128. Tested for x86_64. Also tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * math/e_acoshl.c: Remove. * math/e_acosl.c: Likewise. * math/e_asinl.c: Likewise. * math/e_atan2l.c: Likewise. * math/e_atanhl.c: Likewise. * math/e_coshl.c: Likewise. * math/e_expl.c: Likewise. * math/e_fmodl.c: Likewise. * math/e_gammal_r.c: Likewise. * math/e_hypotl.c: Likewise. * math/e_j0l.c: Likewise. * math/e_j1l.c: Likewise. * math/e_jnl.c: Likewise. * math/e_lgammal_r.c: Likewise. * math/e_log10l.c: Likewise. * math/e_log2l.c: Likewise. * math/e_logl.c: Likewise. * math/e_powl.c: Likewise. * math/e_rem_pio2l.c: Likewise. * math/e_sinhl.c: Likewise. * math/e_sqrtf128.c: Likewise. * math/e_sqrtl.c: Likewise. * math/k_cosl.c: Likewise. * math/k_sinl.c: Likewise. * math/k_tanl.c: Likewise. * math/s_asinhl.c: Likewise. * math/s_atanl.c: Likewise. * math/s_cbrtl.c: Likewise. * math/s_erfl.c: Likewise. * math/s_expm1l.c: Likewise. * math/s_log1pl.c: Likewise. * math/s_tanhl.c: Likewise.
This commit is contained in:
parent
61c45f2505
commit
c67a2328c8
35
ChangeLog
35
ChangeLog
@ -1,3 +1,38 @@
|
||||
2017-09-15 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* math/e_acoshl.c: Remove.
|
||||
* math/e_acosl.c: Likewise.
|
||||
* math/e_asinl.c: Likewise.
|
||||
* math/e_atan2l.c: Likewise.
|
||||
* math/e_atanhl.c: Likewise.
|
||||
* math/e_coshl.c: Likewise.
|
||||
* math/e_expl.c: Likewise.
|
||||
* math/e_fmodl.c: Likewise.
|
||||
* math/e_gammal_r.c: Likewise.
|
||||
* math/e_hypotl.c: Likewise.
|
||||
* math/e_j0l.c: Likewise.
|
||||
* math/e_j1l.c: Likewise.
|
||||
* math/e_jnl.c: Likewise.
|
||||
* math/e_lgammal_r.c: Likewise.
|
||||
* math/e_log10l.c: Likewise.
|
||||
* math/e_log2l.c: Likewise.
|
||||
* math/e_logl.c: Likewise.
|
||||
* math/e_powl.c: Likewise.
|
||||
* math/e_rem_pio2l.c: Likewise.
|
||||
* math/e_sinhl.c: Likewise.
|
||||
* math/e_sqrtf128.c: Likewise.
|
||||
* math/e_sqrtl.c: Likewise.
|
||||
* math/k_cosl.c: Likewise.
|
||||
* math/k_sinl.c: Likewise.
|
||||
* math/k_tanl.c: Likewise.
|
||||
* math/s_asinhl.c: Likewise.
|
||||
* math/s_atanl.c: Likewise.
|
||||
* math/s_cbrtl.c: Likewise.
|
||||
* math/s_erfl.c: Likewise.
|
||||
* math/s_expm1l.c: Likewise.
|
||||
* math/s_log1pl.c: Likewise.
|
||||
* math/s_tanhl.c: Likewise.
|
||||
|
||||
2017-09-15 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
|
||||
|
||||
[BZ #21745]
|
||||
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_acoshl (long double x)
|
||||
{
|
||||
fputs ("__ieee754_acoshl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_acoshl, __acoshl_finite)
|
||||
|
||||
stub_warning (acoshl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_acosl (long double x)
|
||||
{
|
||||
fputs ("__ieee754_acosl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_acosl, __acosl_finite)
|
||||
|
||||
stub_warning (acosl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_asinl (long double x)
|
||||
{
|
||||
fputs ("__ieee754_asinl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_asinl, __asinl_finite)
|
||||
|
||||
stub_warning (asinl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_atan2l (long double x, long double y)
|
||||
{
|
||||
fputs ("__ieee754_atan2l not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_atan2l, __atan2l_finite)
|
||||
|
||||
stub_warning (atan2l)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_atanhl (long double x)
|
||||
{
|
||||
fputs ("__ieee754_atanhl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_atanhl, __atanhl_finite)
|
||||
|
||||
stub_warning (__ieee754_atanhl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_coshl (long double x)
|
||||
{
|
||||
fputs ("__ieee754_coshl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_coshl, __coshl_finite)
|
||||
|
||||
stub_warning (__ieee754_coshl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_expl (long double x)
|
||||
{
|
||||
fputs ("__ieee754_expl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_expl, __expl_finite)
|
||||
|
||||
stub_warning (expl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_fmodl (long double x, long double y)
|
||||
{
|
||||
fputs ("__ieee754_fmodl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_fmodl, __fmodl_finite)
|
||||
|
||||
stub_warning (fmodl)
|
@ -1,15 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_gammal_r (long double x, int *signgamp)
|
||||
{
|
||||
*signgamp = 0;
|
||||
fputs ("__ieee754_gammal_r not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_gammal_r, __gammal_r_finite)
|
||||
|
||||
stub_warning (__ieee754_gammal_r)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_hypotl (long double x, long double y)
|
||||
{
|
||||
fputs ("__ieee754_hypotl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_hypotl, __hypotl_finite)
|
||||
|
||||
stub_warning (__ieee754_hypotl)
|
26
math/e_j0l.c
26
math/e_j0l.c
@ -1,26 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <math_private.h>
|
||||
|
||||
long double
|
||||
__ieee754_j0l (long double x)
|
||||
{
|
||||
fputs ("__ieee754_j0l not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_j0l, __j0l_finite)
|
||||
|
||||
stub_warning (j0l)
|
||||
|
||||
long double
|
||||
__ieee754_y0l (long double x)
|
||||
{
|
||||
fputs ("__ieee754_y0l not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_y0l, __y0l_finite)
|
||||
|
||||
stub_warning (y0l)
|
26
math/e_j1l.c
26
math/e_j1l.c
@ -1,26 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <math_private.h>
|
||||
|
||||
long double
|
||||
__ieee754_j1l (long double x)
|
||||
{
|
||||
fputs ("__ieee754_j1l not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_j1l, __j1l_finite)
|
||||
|
||||
stub_warning (j1l)
|
||||
|
||||
long double
|
||||
__ieee754_y1l (long double x)
|
||||
{
|
||||
fputs ("__ieee754_y1l not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_y1l, __y1l_finite)
|
||||
|
||||
stub_warning (y1l)
|
26
math/e_jnl.c
26
math/e_jnl.c
@ -1,26 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <math_private.h>
|
||||
|
||||
long double
|
||||
__ieee754_jnl (int n, long double x)
|
||||
{
|
||||
fputs ("__ieee754_jnl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_jnl, __jnl_finite)
|
||||
|
||||
stub_warning (jnl)
|
||||
|
||||
long double
|
||||
__ieee754_ynl (int n, long double x)
|
||||
{
|
||||
fputs ("__ieee754_ynl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_ynl, __ynl_finite)
|
||||
|
||||
stub_warning (ynl)
|
@ -1,17 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <math_private.h>
|
||||
|
||||
long double
|
||||
__ieee754_lgammal_r (long double x, int *signgamp)
|
||||
{
|
||||
*signgamp = 0;
|
||||
fputs ("__ieee754_lgammal_r not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_lgammal_r, __lgammal_r_finite)
|
||||
|
||||
stub_warning (lgammal)
|
||||
stub_warning (lgammal_r)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_log10l (long double x)
|
||||
{
|
||||
fputs ("__ieee754_log10l not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_log10l, __log10l_finite)
|
||||
|
||||
stub_warning (log10l)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_log2l (long double x)
|
||||
{
|
||||
fputs ("__ieee754_log2l not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_log2l, __log2l_finite)
|
||||
|
||||
stub_warning (log2l)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_logl (long double x)
|
||||
{
|
||||
fputs ("__ieee754_logl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_logl, __logl_finite)
|
||||
|
||||
stub_warning (logl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_powl (long double x, long double y)
|
||||
{
|
||||
fputs ("__ieee754_powl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_powl, __powl_finite)
|
||||
|
||||
stub_warning (powl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <math_private.h>
|
||||
|
||||
int32_t
|
||||
__ieee754_rem_pio2l (long double x, long double *y)
|
||||
{
|
||||
fputs ("__ieee754_rem_pio2l not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
stub_warning (__ieee754_rem_pio2l)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_sinhl (long double x)
|
||||
{
|
||||
fputs ("__ieee754_sinhl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_sinhl, __sinhl_finite)
|
||||
|
||||
stub_warning (__ieee754_sinhl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
_Float128
|
||||
__ieee754_sqrtf128 (_Float128 x)
|
||||
{
|
||||
fputs ("__ieee754_sqrtf128 not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_sqrtf128, __sqrtf128_finite)
|
||||
|
||||
stub_warning (sqrtf128)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__ieee754_sqrtl (long double x)
|
||||
{
|
||||
fputs ("__ieee754_sqrtl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
strong_alias (__ieee754_sqrtl, __sqrtl_finite)
|
||||
|
||||
stub_warning (sqrtl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <math_private.h>
|
||||
|
||||
long double
|
||||
__kernel_cosl (long double x, long double y)
|
||||
{
|
||||
fputs ("__kernel_cosl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
stub_warning (__kernel_cosl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <math_private.h>
|
||||
|
||||
long double
|
||||
__kernel_sinl (long double x, long double y, int iy)
|
||||
{
|
||||
fputs ("__kernel_sinl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
stub_warning (__kernel_sinl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <math_private.h>
|
||||
|
||||
long double
|
||||
__kernel_tanl (long double x, long double y, int iy)
|
||||
{
|
||||
fputs ("__kernel_tanl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
stub_warning (__kernel_tanl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__asinhl(long double x)
|
||||
{
|
||||
fputs ("__asinhl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
weak_alias (__asinhl, asinhl)
|
||||
stub_warning (asinhl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__atanl (long double x)
|
||||
{
|
||||
fputs ("__atanl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
weak_alias (__atanl, atanl)
|
||||
|
||||
stub_warning (atanl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__cbrtl(long double x)
|
||||
{
|
||||
fputs ("__cbrtl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
weak_alias (__cbrtl, cbrtl)
|
||||
stub_warning (cbrtl)
|
@ -1,25 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__erfl (long double x)
|
||||
{
|
||||
fputs ("__erfl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
weak_alias (__erfl, erfl)
|
||||
|
||||
stub_warning (erfl)
|
||||
|
||||
long double
|
||||
__erfcl (long double x)
|
||||
{
|
||||
fputs ("__erfcl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
weak_alias (__erfcl, erfcl)
|
||||
|
||||
stub_warning (erfcl)
|
@ -1,15 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__expm1l (long double x)
|
||||
{
|
||||
fputs ("__expm1l not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
libm_hidden_def (__expm1l)
|
||||
weak_alias (__expm1l, expm1l)
|
||||
|
||||
stub_warning (expm1l)
|
@ -1,13 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__log1pl (long double x)
|
||||
{
|
||||
fputs ("__log1pl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
stub_warning (log1pl)
|
@ -1,14 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
long double
|
||||
__tanhl(long double x)
|
||||
{
|
||||
fputs ("__tanhl not implemented\n", stderr);
|
||||
__set_errno (ENOSYS);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
weak_alias (__tanhl, tanhl)
|
||||
stub_warning (tanhl)
|
Loading…
Reference in New Issue
Block a user