From patchwork Wed Oct 11 02:52:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 824187 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-85623-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="N/uPOXuc"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yBdnM1GVdz9s1h for ; Wed, 11 Oct 2017 13:52:38 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=UU7GcoWAjksbD2Q7sho3Q7wqAMSk1 0bv9SYeAVBs/Rot5EMKOiV05xAE9pohueDRb0XcOTSs0ehhlH/ymcKAETtEWapJk 8A3GFTud7yGoT76nkk+5hwcA7eDwbK0JrEVTqePtPRz7I9jzt1cGW9tLGWORlOir whSzvsoF5Zc444= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=Gd8DvyICUSyjqHaUsY74QjXxW3g=; b=N/u POXucDX+sv0cnASpNpON0hkED82QS3Lv4zrY3qsf0myY+nLVcnHqrHr0C1CKHZ5f 8Mjpaq39TTrqetmkNEGk7aqvhbroWIsGGlYTqrAWUTOl8T5sqQvkHG7LHCDCJ9cS VBUaVxOuL7BFldwWgY+54xnRwYSFfLCUtf443NFM= Received: (qmail 110806 invoked by alias); 11 Oct 2017 02:52:31 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 103042 invoked by uid 89); 11 Oct 2017 02:52:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Wed, 11 Oct 2017 02:52:15 +0000 From: Joseph Myers To: Subject: Use generic alias macros in ldbl-opt [committed] Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) 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. Committed. 2017-10-11 Joseph Myers * 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. diff --git a/sysdeps/ieee754/ldbl-opt/s_clog10l.c b/sysdeps/ieee754/ldbl-opt/s_clog10l.c index 15dc3ed..d557e96 100644 --- a/sysdeps/ieee754/ldbl-opt/s_clog10l.c +++ b/sysdeps/ieee754/ldbl-opt/s_clog10l.c @@ -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) diff --git a/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c b/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c index dd5915e..4822211 100644 --- a/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c @@ -1,18 +1,8 @@ #include -#undef weak_alias -#define weak_alias(n,a) #undef compat_symbol #define compat_symbol(l,n,a,v) #include #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 diff --git a/sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c b/sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c index f60b3d7..003a253 100644 --- a/sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c +++ b/sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c @@ -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 diff --git a/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c b/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c index bb9bac0..2579600 100644 --- a/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c @@ -3,14 +3,17 @@ #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) + 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