summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-11-29 23:40:07 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-11-29 23:40:07 +0000
commit875cd54855034ff0f328ce8bf797843a1ca33667 (patch)
tree5836c61ac5a115be45c10f1f04a1766d598115e0
parentcf4ebc27fe3a66637c5fc8824d9591191786b5fd (diff)
downloadglibc-875cd54855034ff0f328ce8bf797843a1ca33667.tar.gz
Use libm_alias_double for sparc.
Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch makes sparc libm function implementations use libm_alias_double to define function aliases (with consequent simplification where compat symbol handling is now done by those macros rather than locally in architecture-specific code). Tested with build-many-glibcs.py for all its sparc configurations that installed stripped shared libraries are unchanged by the patch. * sysdeps/sparc/sparc32/fpu/s_copysign.S: Include <libm-alias-double.h>. (copysign): Define using libm_alias_double. * sysdeps/sparc/sparc32/fpu/s_fabs.S: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S: Include <libm-alias-double.h>. (copysign): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c: Include <libm-alias-double.h>. (fdim): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c: Include <libm-alias-double.h>. (fma): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: Include <libm-alias-double.h>. (llrint): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S: Include <libm-alias-double.h>. (llrint): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c: Include <libm-alias-double.h>. (ceil): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c: Include <libm-alias-double.h>. (floor): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c: Include <libm-alias-double.h>. (fma): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.c: Include <libm-alias-double.h>. (lrint): Define using libm_alias_double. (llrint): Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.c: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c: Include <libm-alias-double.h>. (trunc): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/s_copysign.S: Include <libm-alias-double.h>. (copysign): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/s_fabs.c: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/s_lrint.S: Include <libm-alias-double.h>. (lrint): Define using libm_alias_double. (llrint): Likewise. * sysdeps/sparc/sparc64/fpu/s_nearbyint.S: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/s_rint.S: Include <libm-alias-double.h>. (rint): Define using libm_alias_double.
-rw-r--r--ChangeLog78
-rw-r--r--sysdeps/sparc/sparc32/fpu/s_copysign.S6
-rw-r--r--sysdeps/sparc/sparc32/fpu/s_fabs.S6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S7
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S7
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S7
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S6
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S7
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S7
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S7
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c3
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c3
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c3
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.c5
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.c3
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c3
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c3
-rw-r--r--sysdeps/sparc/sparc64/fpu/s_copysign.S3
-rw-r--r--sysdeps/sparc/sparc64/fpu/s_fabs.c4
-rw-r--r--sysdeps/sparc/sparc64/fpu/s_lrint.S5
-rw-r--r--sysdeps/sparc/sparc64/fpu/s_nearbyint.S3
-rw-r--r--sysdeps/sparc/sparc64/fpu/s_rint.S3
26 files changed, 131 insertions, 72 deletions
diff --git a/ChangeLog b/ChangeLog
index a6c2a33307..48ca7b4636 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,83 @@
2017-11-29 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/sparc/sparc32/fpu/s_copysign.S: Include
+ <libm-alias-double.h>.
+ (copysign): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/fpu/s_fabs.S: Include
+ <libm-alias-double.h>.
+ (fabs): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S:
+ Include <libm-alias-double.h>.
+ (copysign): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: Include
+ <libm-alias-double.h>.
+ (fabs): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c: Include
+ <libm-alias-double.h>.
+ (fdim): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c: Include
+ <libm-alias-double.h>.
+ (fma): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: Include
+ <libm-alias-double.h>.
+ (llrint): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S:
+ Include <libm-alias-double.h>.
+ (nearbyint): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: Include
+ <libm-alias-double.h>.
+ (rint): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S: Include
+ <libm-alias-double.h>.
+ (fabs): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S: Include
+ <libm-alias-double.h>.
+ (llrint): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S: Include
+ <libm-alias-double.h>.
+ (nearbyint): Define using libm_alias_double.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S: Include
+ <libm-alias-double.h>.
+ (rint): Define using libm_alias_double.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c: Include
+ <libm-alias-double.h>.
+ (ceil): Define using libm_alias_double.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c: Include
+ <libm-alias-double.h>.
+ (floor): Define using libm_alias_double.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c: Include
+ <libm-alias-double.h>.
+ (fma): Define using libm_alias_double.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.c: Include
+ <libm-alias-double.h>.
+ (lrint): Define using libm_alias_double.
+ (llrint): Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.c: Include
+ <libm-alias-double.h>.
+ (nearbyint): Define using libm_alias_double.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c: Include
+ <libm-alias-double.h>.
+ (rint): Define using libm_alias_double.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c: Include
+ <libm-alias-double.h>.
+ (trunc): Define using libm_alias_double.
+ * sysdeps/sparc/sparc64/fpu/s_copysign.S: Include
+ <libm-alias-double.h>.
+ (copysign): Define using libm_alias_double.
+ * sysdeps/sparc/sparc64/fpu/s_fabs.c: Include
+ <libm-alias-double.h>.
+ (fabs): Define using libm_alias_double.
+ * sysdeps/sparc/sparc64/fpu/s_lrint.S: Include
+ <libm-alias-double.h>.
+ (lrint): Define using libm_alias_double.
+ (llrint): Likewise.
+ * sysdeps/sparc/sparc64/fpu/s_nearbyint.S: Include
+ <libm-alias-double.h>.
+ (nearbyint): Define using libm_alias_double.
+ * sysdeps/sparc/sparc64/fpu/s_rint.S: Include
+ <libm-alias-double.h>.
+ (rint): Define using libm_alias_double.
+
[BZ #22229]
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S: Include
<math_ldbl_opt.h>.
diff --git a/sysdeps/sparc/sparc32/fpu/s_copysign.S b/sysdeps/sparc/sparc32/fpu/s_copysign.S
index 348cabcbb7..7ff5f40f47 100644
--- a/sysdeps/sparc/sparc32/fpu/s_copysign.S
+++ b/sysdeps/sparc/sparc32/fpu/s_copysign.S
@@ -19,6 +19,7 @@
#include <sysdep.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
ENTRY (__copysign)
sethi %hi(0x80000000), %g1
@@ -29,10 +30,7 @@ ENTRY (__copysign)
retl
ldd [%sp + 72], %f0
END (__copysign)
-weak_alias (__copysign, copysign)
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
-#endif
+libm_alias_double (__copysign, copysign)
#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
#endif
diff --git a/sysdeps/sparc/sparc32/fpu/s_fabs.S b/sysdeps/sparc/sparc32/fpu/s_fabs.S
index 774949af23..007ca738de 100644
--- a/sysdeps/sparc/sparc32/fpu/s_fabs.S
+++ b/sysdeps/sparc/sparc32/fpu/s_fabs.S
@@ -18,6 +18,7 @@
#include <sysdep.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
ENTRY (__fabs)
st %o0, [%sp+72]
@@ -26,7 +27,4 @@ ENTRY (__fabs)
retl
fabss %f0, %f0
END (__fabs)
-weak_alias (__fabs, fabs)
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
-#endif
+libm_alias_double (__fabs, fabs)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
index 5d26430f70..affe541fae 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
@@ -1,12 +1,10 @@
#include <sparc-ifunc.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
SPARC_ASM_VIS3_IFUNC(copysign)
-weak_alias (__copysign, copysign)
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
-#endif
+libm_alias_double (__copysign, copysign)
#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
#endif
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
index 72cc08fd66..642df18b3e 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
@@ -1,12 +1,10 @@
#include <sparc-ifunc.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
SPARC_ASM_VIS3_IFUNC(fabs)
-weak_alias (__fabs, fabs)
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
-#endif
+libm_alias_double (__fabs, fabs)
# undef weak_alias
# define weak_alias(a, b)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c
index fe483f6406..c8e84fce9d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c
@@ -20,12 +20,10 @@
#include <first-versions.h>
#include <sparc-ifunc.h>
#include <math.h>
+#include <libm-alias-double.h>
extern double __fdim_vis3 (double, double);
extern double __fdim_generic (double, double);
sparc_libm_ifunc(__fdim, hwcap & HWCAP_SPARC_VIS3 ? __fdim_vis3 : __fdim_generic);
-weak_alias (__fdim, fdim)
-#if LONG_DOUBLE_COMPAT (libm, FIRST_VERSION_libm_fdiml)
-compat_symbol (libm, __fdim, fdiml, FIRST_VERSION_libm_fdiml);
-#endif
+libm_alias_double (__fdim, fdim)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
index 3d0c1650cf..804272ff8e 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
@@ -1,12 +1,10 @@
#include <sparc-ifunc.h>
#include <math.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
extern double __fma_vis3 (double, double, double);
extern double __fma_generic (double, double, double);
sparc_libm_ifunc(__fma, hwcap & HWCAP_SPARC_FMAF ? __fma_vis3 : __fma_generic);
-weak_alias (__fma, fma)
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)
-compat_symbol (libm, __fma, fmal, GLIBC_2_1);
-#endif
+libm_alias_double (__fma, fma)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
index fd23041404..f7cf8780a4 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
@@ -1,17 +1,14 @@
#include <sparc-ifunc.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
SPARC_ASM_VIS3_IFUNC(llrint)
-weak_alias (__llrint, llrint)
+libm_alias_double (__llrint, llrint)
strong_alias (__llrint, __lllrint)
weak_alias (__lllrint, lllrint)
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1)
-#endif
-
# undef weak_alias
# define weak_alias(a, b)
# undef strong_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S
index 47da9eaafe..c39d0aee65 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S
@@ -1,13 +1,10 @@
#include <sparc-ifunc.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
SPARC_ASM_VIS3_IFUNC(nearbyint)
-weak_alias (__nearbyint, nearbyint)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1)
-#endif
+libm_alias_double (__nearbyint, nearbyint)
# undef weak_alias
# define weak_alias(a, b)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
index de893faebf..e6b8654776 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
@@ -1,13 +1,10 @@
#include <sparc-ifunc.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
SPARC_ASM_VIS3_IFUNC(rint)
-weak_alias (__rint, rint)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0)
-#endif
+libm_alias_double (__rint, rint)
# undef weak_alias
# define weak_alias(a, b)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S
index 716144630c..db84a5c66d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S
@@ -18,6 +18,7 @@
#include <sysdep.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
ENTRY (__fabs)
st %o0, [%sp+72]
@@ -26,7 +27,4 @@ ENTRY (__fabs)
retl
fabsd %f0, %f0
END (__fabs)
-weak_alias (__fabs, fabs)
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
-#endif
+libm_alias_double (__fabs, fabs)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
index 62bd9f50c7..edf7eafac5 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
@@ -19,6 +19,7 @@
#include <sysdep.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
/* We pop constants into the FPU registers using the incoming
argument stack slots, since this avoid having to use any PIC
@@ -65,8 +66,4 @@ ENTRY (__llrint)
retl
ldd [%sp + 72], %o0
END (__llrint)
-weak_alias (__llrint, llrint)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1)
-#endif
+libm_alias_double (__llrint, llrint)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S
index c26d2e3e44..f1a4b1d2ea 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S
@@ -21,6 +21,7 @@
#include <sysdep.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
/* We pop constants into the FPU registers using the incoming
argument stack slots, since this avoid having to use any PIC
@@ -66,8 +67,4 @@ ENTRY (__nearbyint)
retl
ld [%sp + 88], %fsr
END (__nearbyint)
-weak_alias (__nearbyint, nearbyint)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1)
-#endif
+libm_alias_double (__nearbyint, nearbyint)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
index f3560ccc79..64b78d3500 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
@@ -19,6 +19,7 @@
#include <sysdep.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
/* We pop constants into the FPU registers using the incoming
argument stack slots, since this avoid having to use any PIC
@@ -62,8 +63,4 @@ ENTRY (__rint)
retl
for %f0, SIGN_BIT, %f0
END (__rint)
-weak_alias (__rint, rint)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0)
-#endif
+libm_alias_double (__rint, rint)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c
index cfd5396375..c545688824 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c
@@ -18,6 +18,7 @@
#include <sparc-ifunc.h>
#include <math.h>
+#include <libm-alias-double.h>
extern __typeof (ceil) __ceil_vis3 attribute_hidden;
extern __typeof (ceil) __ceil_generic attribute_hidden;
@@ -26,4 +27,4 @@ sparc_libm_ifunc (__ceil,
hwcap & HWCAP_SPARC_VIS3
? __ceil_vis3
: __ceil_generic)
-weak_alias (__ceil, ceil)
+libm_alias_double (__ceil, ceil)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c
index 9d71158cdb..068009fb40 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c
@@ -18,6 +18,7 @@
#include <sparc-ifunc.h>
#include <math.h>
+#include <libm-alias-double.h>
extern __typeof (floor) __floor_vis3 attribute_hidden;
extern __typeof (floor) __floor_generic attribute_hidden;
@@ -26,4 +27,4 @@ sparc_libm_ifunc (__floor,
hwcap & HWCAP_SPARC_VIS3
? __floor_vis3
: __floor_generic);
-weak_alias (__floor, floor)
+libm_alias_double (__floor, floor)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
index 1b2701cadb..34b4f45150 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
@@ -1,5 +1,6 @@
#include <sparc-ifunc.h>
#include <math.h>
+#include <libm-alias-double.h>
extern __typeof (fma) __fma_vis3 attribute_hidden;
extern __typeof (fma) __fma_generic attribute_hidden;
@@ -8,4 +9,4 @@ sparc_libm_ifunc (__fma,
hwcap & HWCAP_SPARC_FMAF
? __fma_vis3
: __fma_generic);
-weak_alias (__fma, fma)
+libm_alias_double (__fma, fma)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.c
index 557f0d66cd..659468acb8 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.c
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.c
@@ -26,6 +26,7 @@
#undef __lrint
#undef __llrint
#include <sparc-ifunc.h>
+#include <libm-alias-double.h>
extern __typeof (__redirect_lrint) __lrint_vis3 attribute_hidden;
extern __typeof (__redirect_lrint) __lrint_generic attribute_hidden;
@@ -34,6 +35,6 @@ sparc_libm_ifunc_redirected (__redirect_lrint, __lrint,
hwcap & HWCAP_SPARC_VIS3
? __lrint_vis3
: __lrint_generic);
-weak_alias (__lrint, lrint)
+libm_alias_double (__lrint, lrint)
strong_alias (__lrint, __llrint)
-weak_alias (__llrint, llrint)
+libm_alias_double (__llrint, llrint)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.c
index 1ed497a106..86a8327abf 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.c
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.c
@@ -18,6 +18,7 @@
#include <math.h>
#include <sparc-ifunc.h>
+#include <libm-alias-double.h>
extern __typeof (nearbyint) __nearbyint_vis3 attribute_hidden;
extern __typeof (nearbyint) __nearbyint_generic attribute_hidden;
@@ -26,4 +27,4 @@ sparc_libm_ifunc (__nearbyint,
hwcap & HWCAP_SPARC_VIS3
? __nearbyint_vis3
: __nearbyint_generic);
-weak_alias (__nearbyint, nearbyint)
+libm_alias_double (__nearbyint, nearbyint)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c
index c53a7fe697..fdff814164 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c
@@ -18,6 +18,7 @@
#include <math.h>
#include <sparc-ifunc.h>
+#include <libm-alias-double.h>
extern __typeof (rint) __rint_vis3 attribute_hidden;
extern __typeof (rint) __rint_generic attribute_hidden;
@@ -26,4 +27,4 @@ sparc_libm_ifunc (__rint,
hwcap & HWCAP_SPARC_VIS3
? __rint_vis3
: __rint_generic);
-weak_alias (__rint, rint)
+libm_alias_double (__rint, rint)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c
index 3fd9cc0041..b6fad8cf73 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c
@@ -18,6 +18,7 @@
#include <sparc-ifunc.h>
#include <math.h>
+#include <libm-alias-double.h>
extern __typeof (trunc) __trunc_vis3 attribute_hidden;
extern __typeof (trunc) __trunc_generic attribute_hidden;
@@ -26,4 +27,4 @@ sparc_libm_ifunc (__trunc,
hwcap & HWCAP_SPARC_VIS3
? __trunc_vis3
: __trunc_generic);
-weak_alias (__trunc, trunc)
+libm_alias_double (__trunc, trunc)
diff --git a/sysdeps/sparc/sparc64/fpu/s_copysign.S b/sysdeps/sparc/sparc64/fpu/s_copysign.S
index e50d8cd246..d2d82605f7 100644
--- a/sysdeps/sparc/sparc64/fpu/s_copysign.S
+++ b/sysdeps/sparc/sparc64/fpu/s_copysign.S
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-double.h>
ENTRY (__copysign)
fzeros %f7
@@ -27,4 +28,4 @@ ENTRY (__copysign)
retl
fors %f0, %f9, %f0
END (__copysign)
-weak_alias (__copysign, copysign) \ No newline at end of file
+libm_alias_double (__copysign, copysign)
diff --git a/sysdeps/sparc/sparc64/fpu/s_fabs.c b/sysdeps/sparc/sparc64/fpu/s_fabs.c
index db5ecf2162..7862290da3 100644
--- a/sysdeps/sparc/sparc64/fpu/s_fabs.c
+++ b/sysdeps/sparc/sparc64/fpu/s_fabs.c
@@ -1,5 +1,7 @@
+#include <libm-alias-double.h>
+
double __fabs (double x)
{
return __builtin_fabs (x);
}
-weak_alias (__fabs, fabs)
+libm_alias_double (__fabs, fabs)
diff --git a/sysdeps/sparc/sparc64/fpu/s_lrint.S b/sysdeps/sparc/sparc64/fpu/s_lrint.S
index 0a3162f947..48447a2359 100644
--- a/sysdeps/sparc/sparc64/fpu/s_lrint.S
+++ b/sysdeps/sparc/sparc64/fpu/s_lrint.S
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-double.h>
/* We pop constants into the FPU registers using the incoming
argument stack slots, since this avoid having to use any PIC
@@ -57,7 +58,7 @@ ENTRY (__lrint)
retl
ldx [%sp + STACK_BIAS + 128], %o0
END (__lrint)
-weak_alias (__lrint, lrint)
+libm_alias_double (__lrint, lrint)
strong_alias (__lrint, __llrint)
-weak_alias (__llrint, llrint)
+libm_alias_double (__llrint, llrint)
diff --git a/sysdeps/sparc/sparc64/fpu/s_nearbyint.S b/sysdeps/sparc/sparc64/fpu/s_nearbyint.S
index 05ed2bce40..0839f91101 100644
--- a/sysdeps/sparc/sparc64/fpu/s_nearbyint.S
+++ b/sysdeps/sparc/sparc64/fpu/s_nearbyint.S
@@ -20,6 +20,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-double.h>
/* We pop constants into the FPU registers using the incoming
argument stack slots, since this avoid having to use any PIC
@@ -61,4 +62,4 @@ ENTRY (__nearbyint)
retl
ldx [%sp + STACK_BIAS + 144], %fsr
END (__nearbyint)
-weak_alias (__nearbyint, nearbyint)
+libm_alias_double (__nearbyint, nearbyint)
diff --git a/sysdeps/sparc/sparc64/fpu/s_rint.S b/sysdeps/sparc/sparc64/fpu/s_rint.S
index 8d0134c90c..a0d2c20448 100644
--- a/sysdeps/sparc/sparc64/fpu/s_rint.S
+++ b/sysdeps/sparc/sparc64/fpu/s_rint.S
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <libm-alias-double.h>
/* We pop constants into the FPU registers using the incoming
argument stack slots, since this avoid having to use any PIC
@@ -54,4 +55,4 @@ ENTRY (__rint)
retl
for %f0, SIGN_BIT, %f0
END (__rint)
-weak_alias (__rint, rint)
+libm_alias_double (__rint, rint)