From 6d9b0b5a22738e100b57bdd593d799abac4949d7 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 18 Sep 2017 23:26:35 +0000 Subject: Fix powerpc64le problem from last ldbl-opt patch. This patch fixes a problem on powerpc64le that I missed in initial testing of my last patch to ldbl-opt. In the specific case of powerpc64le, the weak aliases for exp10l and remainderl do not get defined in the generic wrappers because of how those wrappers undefine and redefine weak_alias. This patch restores those aliases in the ldbl-opt code. Tested (compilation only) for powerpc64le with build-many-glibcs.py. * sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c [LIBM_SVID_COMPAT && !LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)] (weak_alias): Undefine and redefine. [LIBM_SVID_COMPAT && !LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)] (exp10l): Define as weak alias. * sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c [LIBM_SVID_COMPAT && !LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)] (weak_alias): Undefine and redefine. [LIBM_SVID_COMPAT && !LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)] (remainderl): Define as weak alias. --- sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c') diff --git a/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c b/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c index 9314117eda..bb9bac0db7 100644 --- a/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c @@ -3,6 +3,14 @@ #define weak_alias(n,a) #include #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) +weak_alias (__remainderl, remainderl) +# endif strong_alias (__remainderl, __dreml) long_double_symbol (libm, __dreml, dreml); #endif -- cgit 1.4.1