]> sourceware.org Git - glibc.git/commitdiff
Use generic alias macros in ldbl-opt.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 11 Oct 2017 02:51:39 +0000 (02:51 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 11 Oct 2017 02:51:39 +0000 (02:51 +0000)
This patch fixes ldbl-opt code to use generic libm alias macros in
preparation for getting _FloatN / _FloatNx aliases where appropriate.

Four functions are affected, that undefine and redefine alias macros
before including the implementations they wrap in such a way that
_FloatN / _FloatNx aliases would not appear.  s_clog10l.c undefines
and redefined declare_mgen_alias, so just needs a
libm_alias_ldouble_other call added.  w_exp10l_compat.c undefines and
redefines weak_alias, but in fact does not need to do so, since
math/w_exp10l_compat.c uses libm_alias_ldouble and does not use
weak_alias other than through that, so the undefines and redefines of
weak_alias are removed.  w_lgamma_compatl.c and w_remainderl_compat.c
are made to use libm_alias_ldouble_other in conjunction with restoring
the original definition of weak_alias so this is effective.

Tested with build-many-glibcs.py.  Installed stripped shared libraries
are unchanged by this patch.

* sysdeps/ieee754/ldbl-opt/s_clog10l.c: Use
libm_alias_ldouble_other.
* sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c (weak_alias): Do not
undefine and redefine.
[LIBM_SVID_COMPAT && !LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)]
(exp10l): Do not define here.
* sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c [BUILD_LGAMMA]
(weak_alias): Undefine and redefine.
[BUILD_LGAMMA]: Use libm_alias_ldouble_other.
* sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c
[LIBM_SVID_COMPAT] (weak_alias): Undefine and redefine here.
[LIBM_SVID_COMPAT]: Use libm_alias_ldouble_other.

ChangeLog
sysdeps/ieee754/ldbl-opt/s_clog10l.c
sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c
sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c
sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c

index 870d29d772e667b6643b46e0dd803e1a752d87a1..f8914f35e5538fa658e3dc7c53ba568ec9cdf298 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2017-10-11  Joseph Myers  <joseph@codesourcery.com>
 
+       * sysdeps/ieee754/ldbl-opt/s_clog10l.c: Use
+       libm_alias_ldouble_other.
+       * sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c (weak_alias): Do not
+       undefine and redefine.
+       [LIBM_SVID_COMPAT && !LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)]
+       (exp10l): Do not define here.
+       * sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c [BUILD_LGAMMA]
+       (weak_alias): Undefine and redefine.
+       [BUILD_LGAMMA]: Use libm_alias_ldouble_other.
+       * sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c
+       [LIBM_SVID_COMPAT] (weak_alias): Undefine and redefine here.
+       [LIBM_SVID_COMPAT]: Use libm_alias_ldouble_other.
+
        * soft-fp/fmadf4.c: Include <libm-alias-double.h>.
        [!__fma] (fma): Define using libm_alias_double.
        * soft-fp/fmasf4.c: Include <libm-alias-float.h>.
index 15dc3ed891707d3b094d5501c345cc24e927c447..d557e96bc37e47fb3651b8d331808f2e864b4c60 100644 (file)
@@ -29,3 +29,4 @@
 strong_alias (__clog10l_internal, __clog10l__internal)
 long_double_symbol (libm, __clog10l_internal, __clog10l);
 long_double_symbol (libm, __clog10l__internal, clog10l);
+libm_alias_ldouble_other (__clog10, clog10)
index dd5915e66e2587b9faf1cceb73fe3939796befd8..4822211189dc6596b53c550d6322580c9bfcb65e 100644 (file)
@@ -1,18 +1,8 @@
 #include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
 #undef compat_symbol
 #define compat_symbol(l,n,a,v)
 #include <math/w_exp10l_compat.c>
 #if LIBM_SVID_COMPAT
-# if !LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)
-/* If ldbl-opt is used without special versioning for exp10l being
-   required, the generic code does not define exp10l because of the
-   undefine and redefine of weak_alias above.  */
-#  undef weak_alias
-#  define weak_alias(name, aliasname) _weak_alias (name, aliasname)
-weak_alias (__exp10l, exp10l)
-# endif
 # if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
 /* compat_symbol was undefined and redefined above to avoid the
    default pow10l compat symbol at version GLIBC_2_1 (as for ldbl-opt
index f60b3d7bcfc02af0af764feabe8916338d1f6229..003a253ba496d2ecd0a2352b141c22a636002072 100644 (file)
@@ -9,3 +9,8 @@
 #if GAMMA_ALIAS
 long_double_symbol (libm, __gammal, gammal);
 #endif
+#if BUILD_LGAMMA
+# undef weak_alias
+# define weak_alias(name, aliasname) _weak_alias (name, aliasname)
+libm_alias_ldouble_other (__lgamma, lgamma)
+#endif
index bb9bac0db7ee4c39cc9ac173317413eda365d875..2579600aa2df205efaa059b0fa348d4f0ae42b58 100644 (file)
@@ -3,14 +3,17 @@
 #define weak_alias(n,a)
 #include <math/w_remainderl_compat.c>
 #if LIBM_SVID_COMPAT
-# if !LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
 /* If ldbl-opt is used without special versioning for remainderl being
    required, the generic code does not define remainderl because of
-   the undefine and redefine of weak_alias above.  */
-#  undef weak_alias
-#  define weak_alias(name, aliasname) _weak_alias (name, aliasname)
+   the undefine and redefine of weak_alias above.  In any case, that
+   undefine and redefine mean _FloatN / _FloatNx aliases have not been
+   defined.  */
+# undef weak_alias
+# define weak_alias(name, aliasname) _weak_alias (name, aliasname)
+# if !LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
 weak_alias (__remainderl, remainderl)
 # endif
 strong_alias (__remainderl, __dreml)
 long_double_symbol (libm, __dreml, dreml);
+libm_alias_ldouble_other (__remainder, remainder)
 #endif
This page took 0.076796 seconds and 5 git commands to generate.