about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabrielftg@linux.ibm.com>2019-09-09 12:59:46 -0500
committerGabriel F. T. Gomes <gabrielftg@linux.ibm.com>2019-12-23 16:32:20 -0300
commitf8cd1020817fd6b69446b4308b496de999934ef8 (patch)
treeaaca0fdbd7f4d7a0f10d7931516a5aba87625fc8 /sysdeps/ieee754/ldbl-128
parent3021e781783d6fe12de4697b0d98957bc911cad3 (diff)
downloadglibc-f8cd1020817fd6b69446b4308b496de999934ef8.tar.gz
glibc-f8cd1020817fd6b69446b4308b496de999934ef8.tar.xz
glibc-f8cd1020817fd6b69446b4308b496de999934ef8.zip
Avoid compat symbols for totalorder in powerpc64le IEEE long double
On powerpc64le, the libm_alias_float128_other_r_ldbl macro is
used to create an alias between totalorderf128 and __totalorderlieee128,
as well as between the totalordermagf128 and __totalordermaglieee128.

However, the totalorder* and totalordermag* functions changed their
parameter type since commit ID 42760d764649 and got compat symbols for
their old versions.  With this change, the aforementioned macro would
create two conflicting aliases for __totalorderlieee128 and
__totalordermaglieee128.

This patch avoids the creation of the alias between the IEEE long double
symbols (__totalorderl*ieee128) and the compat symbols, because the IEEE
long double functions have never been exported thus don't need such
compat symbol.

Tested for powerpc64le.

Reviewed-by: Joseph Myers <joseph@codesourcery.com>
Diffstat (limited to 'sysdeps/ieee754/ldbl-128')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_totalorderl.c9
-rw-r--r--sysdeps/ieee754/ldbl-128/s_totalordermagl.c9
2 files changed, 18 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_totalorderl.c b/sysdeps/ieee754/ldbl-128/s_totalorderl.c
index 098bd2bcab..f9db06c025 100644
--- a/sysdeps/ieee754/ldbl-128/s_totalorderl.c
+++ b/sysdeps/ieee754/ldbl-128/s_totalorderl.c
@@ -74,6 +74,15 @@ __totalorder_compatl (_Float128 x, _Float128 y)
 {
   return __totalorderl (&x, &y);
 }
+/* On platforms that reuse the _Float128 implementation for IEEE long
+   double (powerpc64le), the libm_alias_float128_other_r_ldbl macro
+   (which is called by the libm_alias_ldouble macro) is used to create
+   aliases between *f128 (_Float128 API) and __*ieee128 functions.
+   However, this compat version of totalorderl is older than the
+   availability of __ieee*128 symbols, thus, the compat alias is not
+   required, nor desired.  */
+#undef libm_alias_float128_other_r_ldbl
+#define libm_alias_float128_other_r_ldbl(from, to, r)
 #undef do_symbol
 #define do_symbol(orig_name, name, aliasname)			\
   strong_alias (orig_name, name)				\
diff --git a/sysdeps/ieee754/ldbl-128/s_totalordermagl.c b/sysdeps/ieee754/ldbl-128/s_totalordermagl.c
index b31788c77c..45b17ed4dd 100644
--- a/sysdeps/ieee754/ldbl-128/s_totalordermagl.c
+++ b/sysdeps/ieee754/ldbl-128/s_totalordermagl.c
@@ -68,6 +68,15 @@ __totalordermag_compatl (_Float128 x, _Float128 y)
 {
   return __totalordermagl (&x, &y);
 }
+/* On platforms that reuse the _Float128 implementation for IEEE long
+   double (powerpc64le), the libm_alias_float128_other_r_ldbl macro
+   (which is called by the libm_alias_ldouble macro) is used to create
+   aliases between *f128 (_Float128 API) and __*ieee128 functions.
+   However, this compat version of totalordermagl is older than the
+   availability of __ieee*128 symbols, thus, the compat alias is not
+   required, nor desired.  */
+#undef libm_alias_float128_other_r_ldbl
+#define libm_alias_float128_other_r_ldbl(from, to, r)
 #undef do_symbol
 #define do_symbol(orig_name, name, aliasname)			\
   strong_alias (orig_name, name)				\