about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-09-15 17:12:02 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-09-15 17:12:02 +0000
commit5bcdb315295f3bb73c082fc944d9e10a304adb0a (patch)
treeae0842b6e7d2d81e2e18415a62bd7382f66057c2 /math
parent01f2881245eabf6daeeb8505242047ece4027c5a (diff)
downloadglibc-5bcdb315295f3bb73c082fc944d9e10a304adb0a.tar.gz
glibc-5bcdb315295f3bb73c082fc944d9e10a304adb0a.tar.xz
glibc-5bcdb315295f3bb73c082fc944d9e10a304adb0a.zip
Use libm_alias_float in math/.
This patch converts libm function implementations in math/ from using
weak_alias to using libm_alias_float to define public function names,
in cases where it would be appropriate to define _Float32 aliases for
those functions as well.  expf and exp2f are omitted from this patch,
given the in-progress patches that would change their symbol
versioning arrangements (at a later stage it will be necessary to add
macros that can be used for functions with such symbol versioning
arrangements - which will apply to lgammaf as well - but for the
initial patches in this area I'm just dealing with easy cases, and any
symbol versioning changes to these functions while the work is in
progress can effectively just undo the libm_alias_* changes as regards
those functions).

Tested for x86_64.  Also tested with build-many-glibcs.py that
installed stripped shared libraries are unchanged by the patch.

	* math/s_fmaf.c: Include <libm-alias-float.h>.
	(fmaf): Define using libm_alias_float.
	* math/w_acosf_compat.c: Include <libm-alias-float.h>.
	(acosf): Define using libm_alias_float.
	* math/w_acoshf_compat.c: Include <libm-alias-float.h>.
	(acoshf): Define using libm_alias_float.
	* math/w_asinf_compat.c: Include <libm-alias-float.h>.
	(asinf): Define using libm_alias_float.
	* math/w_atan2f_compat.c: Include <libm-alias-float.h>.
	(atan2f): Define using libm_alias_float.
	* math/w_atanhf_compat.c: Include <libm-alias-float.h>.
	(atanhf): Define using libm_alias_float.
	* math/w_coshf_compat.c: Include <libm-alias-float.h>.
	(coshf): Define using libm_alias_float.
	* math/w_exp10f_compat.c: Include <libm-alias-float.h>.
	(exp10f): Define using libm_alias_float.
	* math/w_fmodf_compat.c: Include <libm-alias-float.h>.
	(fmodf): Define using libm_alias_float.
	* math/w_hypotf_compat.c: Include <libm-alias-float.h>.
	(hypotf): Define using libm_alias_float.
	* math/w_j0f_compat.c: Include <libm-alias-float.h>.
	(j0f): Define using libm_alias_float.
	(y0f): Likewise.
	* math/w_j1f_compat.c: Include <libm-alias-float.h>.
	(j1f): Define using libm_alias_float.
	(y1f): Likewise.
	* math/w_jnf_compat.c: Include <libm-alias-float.h>.
	(jnf): Define using libm_alias_float.
	(ynf): Likewise.
	* math/w_log10f_compat.c: Include <libm-alias-float.h>.
	(log10f): Define using libm_alias_float.
	* math/w_log2f_compat.c: Include <libm-alias-float.h>.
	(log2f): Define using libm_alias_float.
	* math/w_logf_compat.c: Include <libm-alias-float.h>.
	(logf): Define using libm_alias_float.
	* math/w_powf_compat.c: Include <libm-alias-float.h>.
	(powf): Define using libm_alias_float.
	* math/w_remainderf_compat.c: Include <libm-alias-float.h>.
	(remainderf): Define using libm_alias_float.
	* math/w_sinhf_compat.c: Include <libm-alias-float.h>.
	(sinhf): Define using libm_alias_float.
	* math/w_sqrtf_compat.c: Include <libm-alias-float.h>.
	(sqrtf): Define using libm_alias_float.
	* math/w_tgammaf_compat.c: Include <libm-alias-float.h>.
	(tgammaf): Define using libm_alias_float.
Diffstat (limited to 'math')
-rw-r--r--math/s_fmaf.c3
-rw-r--r--math/w_acosf_compat.c3
-rw-r--r--math/w_acoshf_compat.c3
-rw-r--r--math/w_asinf_compat.c3
-rw-r--r--math/w_atan2f_compat.c3
-rw-r--r--math/w_atanhf_compat.c3
-rw-r--r--math/w_coshf_compat.c3
-rw-r--r--math/w_exp10f_compat.c3
-rw-r--r--math/w_fmodf_compat.c3
-rw-r--r--math/w_hypotf_compat.c3
-rw-r--r--math/w_j0f_compat.c5
-rw-r--r--math/w_j1f_compat.c5
-rw-r--r--math/w_jnf_compat.c5
-rw-r--r--math/w_log10f_compat.c3
-rw-r--r--math/w_log2f_compat.c3
-rw-r--r--math/w_logf_compat.c3
-rw-r--r--math/w_powf_compat.c3
-rw-r--r--math/w_remainderf_compat.c3
-rw-r--r--math/w_sinhf_compat.c3
-rw-r--r--math/w_sqrtf_compat.c3
-rw-r--r--math/w_tgammaf_compat.c3
21 files changed, 45 insertions, 24 deletions
diff --git a/math/s_fmaf.c b/math/s_fmaf.c
index 06f1380b87..310eb2be3e 100644
--- a/math/s_fmaf.c
+++ b/math/s_fmaf.c
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <libm-alias-float.h>
 
 float
 __fmaf (float x, float y, float z)
@@ -25,5 +26,5 @@ __fmaf (float x, float y, float z)
   return (x * y) + z;
 }
 #ifndef __fmaf
-weak_alias (__fmaf, fmaf)
+libm_alias_float (__fma, fma)
 #endif
diff --git a/math/w_acosf_compat.c b/math/w_acosf_compat.c
index 97cac13cd6..1bdb60e177 100644
--- a/math/w_acosf_compat.c
+++ b/math/w_acosf_compat.c
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -37,5 +38,5 @@ __acosf (float x)
 
   return __ieee754_acosf (x);
 }
-weak_alias (__acosf, acosf)
+libm_alias_float (__acos, acos)
 #endif
diff --git a/math/w_acoshf_compat.c b/math/w_acoshf_compat.c
index 7a8c87bf4f..1921156b6b 100644
--- a/math/w_acoshf_compat.c
+++ b/math/w_acoshf_compat.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -32,5 +33,5 @@ __acoshf (float x)
 
   return __ieee754_acoshf (x);
 }
-weak_alias (__acoshf, acoshf)
+libm_alias_float (__acosh, acosh)
 #endif
diff --git a/math/w_asinf_compat.c b/math/w_asinf_compat.c
index 10ee32328e..c622894674 100644
--- a/math/w_asinf_compat.c
+++ b/math/w_asinf_compat.c
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -37,5 +38,5 @@ __asinf (float x)
 
   return __ieee754_asinf (x);
 }
-weak_alias (__asinf, asinf)
+libm_alias_float (__asin, asin)
 #endif
diff --git a/math/w_atan2f_compat.c b/math/w_atan2f_compat.c
index 8d7ad71b70..271a65c683 100644
--- a/math/w_atan2f_compat.c
+++ b/math/w_atan2f_compat.c
@@ -24,6 +24,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -40,5 +41,5 @@ __atan2f (float y, float x)
     __set_errno (ERANGE);
   return z;
 }
-weak_alias (__atan2f, atan2f)
+libm_alias_float (__atan2, atan2)
 #endif
diff --git a/math/w_atanhf_compat.c b/math/w_atanhf_compat.c
index 6045188bd8..fa9ce4339f 100644
--- a/math/w_atanhf_compat.c
+++ b/math/w_atanhf_compat.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -35,5 +36,5 @@ __atanhf (float x)
 
   return __ieee754_atanhf (x);
 }
-weak_alias (__atanhf, atanhf)
+libm_alias_float (__atanh, atanh)
 #endif
diff --git a/math/w_coshf_compat.c b/math/w_coshf_compat.c
index b5d53168f2..e19f338f7a 100644
--- a/math/w_coshf_compat.c
+++ b/math/w_coshf_compat.c
@@ -21,6 +21,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 #if LIBM_SVID_COMPAT
 float
@@ -33,5 +34,5 @@ __coshf (float x)
 
 	return z;
 }
-weak_alias (__coshf, coshf)
+libm_alias_float (__cosh, cosh)
 #endif
diff --git a/math/w_exp10f_compat.c b/math/w_exp10f_compat.c
index bacf2eb9d2..8ae7fe3266 100644
--- a/math/w_exp10f_compat.c
+++ b/math/w_exp10f_compat.c
@@ -24,6 +24,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 #if LIBM_SVID_COMPAT
 float
@@ -37,7 +38,7 @@ __exp10f (float x)
 
   return z;
 }
-weak_alias (__exp10f, exp10f)
+libm_alias_float (__exp10, exp10)
 # if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
 strong_alias (__exp10f, __pow10f)
 compat_symbol (libm, __pow10f, pow10f, GLIBC_2_1);
diff --git a/math/w_fmodf_compat.c b/math/w_fmodf_compat.c
index a2739d856a..57a726ea5c 100644
--- a/math/w_fmodf_compat.c
+++ b/math/w_fmodf_compat.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 #if LIBM_SVID_COMPAT
 /* wrapper fmodf */
@@ -32,5 +33,5 @@ __fmodf (float x, float y)
 
   return __ieee754_fmodf (x, y);
 }
-weak_alias (__fmodf, fmodf)
+libm_alias_float (__fmod, fmod)
 #endif
diff --git a/math/w_hypotf_compat.c b/math/w_hypotf_compat.c
index 8e6d2343eb..82870ce551 100644
--- a/math/w_hypotf_compat.c
+++ b/math/w_hypotf_compat.c
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -34,5 +35,5 @@ __hypotf(float x, float y)
 
 	return z;
 }
-weak_alias (__hypotf, hypotf)
+libm_alias_float (__hypot, hypot)
 #endif
diff --git a/math/w_j0f_compat.c b/math/w_j0f_compat.c
index 0ef4179bfa..3c0cdaea27 100644
--- a/math/w_j0f_compat.c
+++ b/math/w_j0f_compat.c
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -34,7 +35,7 @@ __j0f (float x)
 
   return __ieee754_j0f (x);
 }
-weak_alias (__j0f, j0f)
+libm_alias_float (__j0, j0)
 
 
 /* wrapper y0f */
@@ -64,5 +65,5 @@ __y0f (float x)
 
   return __ieee754_y0f (x);
 }
-weak_alias (__y0f, y0f)
+libm_alias_float (__y0, y0)
 #endif
diff --git a/math/w_j1f_compat.c b/math/w_j1f_compat.c
index d44fb12437..badac364a9 100644
--- a/math/w_j1f_compat.c
+++ b/math/w_j1f_compat.c
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -34,7 +35,7 @@ __j1f (float x)
 
   return __ieee754_j1f (x);
 }
-weak_alias (__j1f, j1f)
+libm_alias_float (__j1, j1)
 
 
 /* wrapper y1f */
@@ -64,5 +65,5 @@ __y1f (float x)
 
   return __ieee754_y1f (x);
 }
-weak_alias (__y1f, y1f)
+libm_alias_float (__y1, y1)
 #endif
diff --git a/math/w_jnf_compat.c b/math/w_jnf_compat.c
index b2b416182b..c4ffde9017 100644
--- a/math/w_jnf_compat.c
+++ b/math/w_jnf_compat.c
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -34,7 +35,7 @@ __jnf (int n, float x)
 
   return __ieee754_jnf (n, x);
 }
-weak_alias (__jnf, jnf)
+libm_alias_float (__jn, jn)
 
 
 /* wrapper ynf */
@@ -64,5 +65,5 @@ __ynf (int n, float x)
 
   return __ieee754_ynf (n, x);
 }
-weak_alias (__ynf, ynf)
+libm_alias_float (__yn, yn)
 #endif
diff --git a/math/w_log10f_compat.c b/math/w_log10f_compat.c
index 151c94b4dc..7b3f78376d 100644
--- a/math/w_log10f_compat.c
+++ b/math/w_log10f_compat.c
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -43,5 +44,5 @@ __log10f (float x)
 
   return  __ieee754_log10f (x);
 }
-weak_alias (__log10f, log10f)
+libm_alias_float (__log10, log10)
 #endif
diff --git a/math/w_log2f_compat.c b/math/w_log2f_compat.c
index 82085d5222..295c1620f7 100644
--- a/math/w_log2f_compat.c
+++ b/math/w_log2f_compat.c
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -43,5 +44,5 @@ __log2f (float x)
 
   return  __ieee754_log2f (x);
 }
-weak_alias (__log2f, log2f)
+libm_alias_float (__log2, log2)
 #endif
diff --git a/math/w_logf_compat.c b/math/w_logf_compat.c
index 4423bd527a..7cdacdf921 100644
--- a/math/w_logf_compat.c
+++ b/math/w_logf_compat.c
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -43,5 +44,5 @@ __logf (float x)
 
   return  __ieee754_logf (x);
 }
-weak_alias (__logf, logf)
+libm_alias_float (__log, log)
 #endif
diff --git a/math/w_powf_compat.c b/math/w_powf_compat.c
index ce1235baee..39e818af7e 100644
--- a/math/w_powf_compat.c
+++ b/math/w_powf_compat.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -59,5 +60,5 @@ __powf (float x, float y)
 
   return z;
 }
-weak_alias (__powf, powf)
+libm_alias_float (__pow, pow)
 #endif
diff --git a/math/w_remainderf_compat.c b/math/w_remainderf_compat.c
index 39ff3b4468..bd2719c4b6 100644
--- a/math/w_remainderf_compat.c
+++ b/math/w_remainderf_compat.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -33,6 +34,6 @@ __remainderf (float x, float y)
 
   return __ieee754_remainderf (x, y);
 }
-weak_alias (__remainderf, remainderf)
+libm_alias_float (__remainder, remainder)
 weak_alias (__remainderf, dremf)
 #endif
diff --git a/math/w_sinhf_compat.c b/math/w_sinhf_compat.c
index 1310ccf93b..ac336e8b9b 100644
--- a/math/w_sinhf_compat.c
+++ b/math/w_sinhf_compat.c
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 #if LIBM_SVID_COMPAT
 float
@@ -32,5 +33,5 @@ __sinhf (float x)
 
 	return z;
 }
-weak_alias (__sinhf, sinhf)
+libm_alias_float (__sinh, sinh)
 #endif
diff --git a/math/w_sqrtf_compat.c b/math/w_sqrtf_compat.c
index bd3d5048fc..6c8c7e3857 100644
--- a/math/w_sqrtf_compat.c
+++ b/math/w_sqrtf_compat.c
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 
 #if LIBM_SVID_COMPAT
@@ -31,5 +32,5 @@ __sqrtf (float x)
 
   return __ieee754_sqrtf (x);
 }
-weak_alias (__sqrtf, sqrtf)
+libm_alias_float (__sqrt, sqrt)
 #endif
diff --git a/math/w_tgammaf_compat.c b/math/w_tgammaf_compat.c
index 796850b4d9..e9ffddb796 100644
--- a/math/w_tgammaf_compat.c
+++ b/math/w_tgammaf_compat.c
@@ -17,6 +17,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <math-svid-compat.h>
+#include <libm-alias-float.h>
 
 #if LIBM_SVID_COMPAT
 float
@@ -43,5 +44,5 @@ __tgammaf(float x)
 	}
 	return local_signgam < 0 ? - y : y;
 }
-weak_alias (__tgammaf, tgammaf)
+libm_alias_float (__tgamma, tgamma)
 #endif