diff options
author | Joseph Myers <joseph@codesourcery.com> | 2017-09-15 20:05:09 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2017-09-15 20:05:09 +0000 |
commit | c67a2328c88fec0e91c646ad4a9d9edfb7140f0a (patch) | |
tree | 8e1fcc20769ecb8602bc9655a1f8c5187b5862a9 /math | |
parent | 61c45f250528dae431391823a9766053e61ccde1 (diff) | |
download | glibc-c67a2328c88fec0e91c646ad4a9d9edfb7140f0a.tar.gz glibc-c67a2328c88fec0e91c646ad4a9d9edfb7140f0a.tar.xz glibc-c67a2328c88fec0e91c646ad4a9d9edfb7140f0a.zip |
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.
Diffstat (limited to 'math')
-rw-r--r-- | math/e_acoshl.c | 14 | ||||
-rw-r--r-- | math/e_acosl.c | 14 | ||||
-rw-r--r-- | math/e_asinl.c | 14 | ||||
-rw-r--r-- | math/e_atan2l.c | 14 | ||||
-rw-r--r-- | math/e_atanhl.c | 14 | ||||
-rw-r--r-- | math/e_coshl.c | 14 | ||||
-rw-r--r-- | math/e_expl.c | 14 | ||||
-rw-r--r-- | math/e_fmodl.c | 14 | ||||
-rw-r--r-- | math/e_gammal_r.c | 15 | ||||
-rw-r--r-- | math/e_hypotl.c | 14 | ||||
-rw-r--r-- | math/e_j0l.c | 26 | ||||
-rw-r--r-- | math/e_j1l.c | 26 | ||||
-rw-r--r-- | math/e_jnl.c | 26 | ||||
-rw-r--r-- | math/e_lgammal_r.c | 17 | ||||
-rw-r--r-- | math/e_log10l.c | 14 | ||||
-rw-r--r-- | math/e_log2l.c | 14 | ||||
-rw-r--r-- | math/e_logl.c | 14 | ||||
-rw-r--r-- | math/e_powl.c | 14 | ||||
-rw-r--r-- | math/e_rem_pio2l.c | 14 | ||||
-rw-r--r-- | math/e_sinhl.c | 14 | ||||
-rw-r--r-- | math/e_sqrtf128.c | 14 | ||||
-rw-r--r-- | math/e_sqrtl.c | 14 | ||||
-rw-r--r-- | math/k_cosl.c | 14 | ||||
-rw-r--r-- | math/k_sinl.c | 14 | ||||
-rw-r--r-- | math/k_tanl.c | 14 | ||||
-rw-r--r-- | math/s_asinhl.c | 14 | ||||
-rw-r--r-- | math/s_atanl.c | 14 | ||||
-rw-r--r-- | math/s_cbrtl.c | 14 | ||||
-rw-r--r-- | math/s_erfl.c | 25 | ||||
-rw-r--r-- | math/s_expm1l.c | 15 | ||||
-rw-r--r-- | math/s_log1pl.c | 13 | ||||
-rw-r--r-- | math/s_tanhl.c | 14 |
32 files changed, 0 insertions, 499 deletions
diff --git a/math/e_acoshl.c b/math/e_acoshl.c deleted file mode 100644 index cd426ed4f5..0000000000 --- a/math/e_acoshl.c +++ /dev/null @@ -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) diff --git a/math/e_acosl.c b/math/e_acosl.c deleted file mode 100644 index e5b6971197..0000000000 --- a/math/e_acosl.c +++ /dev/null @@ -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) diff --git a/math/e_asinl.c b/math/e_asinl.c deleted file mode 100644 index d6a6d14bd1..0000000000 --- a/math/e_asinl.c +++ /dev/null @@ -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) diff --git a/math/e_atan2l.c b/math/e_atan2l.c deleted file mode 100644 index 2602c98f39..0000000000 --- a/math/e_atan2l.c +++ /dev/null @@ -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) diff --git a/math/e_atanhl.c b/math/e_atanhl.c deleted file mode 100644 index a6cb507246..0000000000 --- a/math/e_atanhl.c +++ /dev/null @@ -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) diff --git a/math/e_coshl.c b/math/e_coshl.c deleted file mode 100644 index 8bf7b20644..0000000000 --- a/math/e_coshl.c +++ /dev/null @@ -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) diff --git a/math/e_expl.c b/math/e_expl.c deleted file mode 100644 index 407d8188a2..0000000000 --- a/math/e_expl.c +++ /dev/null @@ -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) diff --git a/math/e_fmodl.c b/math/e_fmodl.c deleted file mode 100644 index 61587e9f41..0000000000 --- a/math/e_fmodl.c +++ /dev/null @@ -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) diff --git a/math/e_gammal_r.c b/math/e_gammal_r.c deleted file mode 100644 index 9dbce67efb..0000000000 --- a/math/e_gammal_r.c +++ /dev/null @@ -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) diff --git a/math/e_hypotl.c b/math/e_hypotl.c deleted file mode 100644 index 6f3eb5f476..0000000000 --- a/math/e_hypotl.c +++ /dev/null @@ -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) diff --git a/math/e_j0l.c b/math/e_j0l.c deleted file mode 100644 index 1451efd2a2..0000000000 --- a/math/e_j0l.c +++ /dev/null @@ -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) diff --git a/math/e_j1l.c b/math/e_j1l.c deleted file mode 100644 index 6bb3017543..0000000000 --- a/math/e_j1l.c +++ /dev/null @@ -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) diff --git a/math/e_jnl.c b/math/e_jnl.c deleted file mode 100644 index d9fddd059e..0000000000 --- a/math/e_jnl.c +++ /dev/null @@ -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) diff --git a/math/e_lgammal_r.c b/math/e_lgammal_r.c deleted file mode 100644 index 3babf7f668..0000000000 --- a/math/e_lgammal_r.c +++ /dev/null @@ -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) diff --git a/math/e_log10l.c b/math/e_log10l.c deleted file mode 100644 index c0b7dfdd40..0000000000 --- a/math/e_log10l.c +++ /dev/null @@ -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) diff --git a/math/e_log2l.c b/math/e_log2l.c deleted file mode 100644 index af7d039c9a..0000000000 --- a/math/e_log2l.c +++ /dev/null @@ -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) diff --git a/math/e_logl.c b/math/e_logl.c deleted file mode 100644 index 7a4ea1b07f..0000000000 --- a/math/e_logl.c +++ /dev/null @@ -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) diff --git a/math/e_powl.c b/math/e_powl.c deleted file mode 100644 index 1013e2aa97..0000000000 --- a/math/e_powl.c +++ /dev/null @@ -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) diff --git a/math/e_rem_pio2l.c b/math/e_rem_pio2l.c deleted file mode 100644 index 2ea873bbab..0000000000 --- a/math/e_rem_pio2l.c +++ /dev/null @@ -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) diff --git a/math/e_sinhl.c b/math/e_sinhl.c deleted file mode 100644 index 4bc4ac9080..0000000000 --- a/math/e_sinhl.c +++ /dev/null @@ -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) diff --git a/math/e_sqrtf128.c b/math/e_sqrtf128.c deleted file mode 100644 index acf8ba45e3..0000000000 --- a/math/e_sqrtf128.c +++ /dev/null @@ -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) diff --git a/math/e_sqrtl.c b/math/e_sqrtl.c deleted file mode 100644 index acbe74f05a..0000000000 --- a/math/e_sqrtl.c +++ /dev/null @@ -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) diff --git a/math/k_cosl.c b/math/k_cosl.c deleted file mode 100644 index 6dc72b408e..0000000000 --- a/math/k_cosl.c +++ /dev/null @@ -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) diff --git a/math/k_sinl.c b/math/k_sinl.c deleted file mode 100644 index 004794275e..0000000000 --- a/math/k_sinl.c +++ /dev/null @@ -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) diff --git a/math/k_tanl.c b/math/k_tanl.c deleted file mode 100644 index 8831f62889..0000000000 --- a/math/k_tanl.c +++ /dev/null @@ -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) diff --git a/math/s_asinhl.c b/math/s_asinhl.c deleted file mode 100644 index 8232fcd38d..0000000000 --- a/math/s_asinhl.c +++ /dev/null @@ -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) diff --git a/math/s_atanl.c b/math/s_atanl.c deleted file mode 100644 index 2957d702d5..0000000000 --- a/math/s_atanl.c +++ /dev/null @@ -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) diff --git a/math/s_cbrtl.c b/math/s_cbrtl.c deleted file mode 100644 index 803010b344..0000000000 --- a/math/s_cbrtl.c +++ /dev/null @@ -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) diff --git a/math/s_erfl.c b/math/s_erfl.c deleted file mode 100644 index 7ae25d6252..0000000000 --- a/math/s_erfl.c +++ /dev/null @@ -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) diff --git a/math/s_expm1l.c b/math/s_expm1l.c deleted file mode 100644 index 070d06825f..0000000000 --- a/math/s_expm1l.c +++ /dev/null @@ -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) diff --git a/math/s_log1pl.c b/math/s_log1pl.c deleted file mode 100644 index a216fb3cef..0000000000 --- a/math/s_log1pl.c +++ /dev/null @@ -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) diff --git a/math/s_tanhl.c b/math/s_tanhl.c deleted file mode 100644 index ece9a4c5b3..0000000000 --- a/math/s_tanhl.c +++ /dev/null @@ -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) |