Message ID | 59D24A01.6060605@arm.com |
---|---|
State | Committed |
Commit | bdc5c59214a9e4bd9a299deead29c04ddf141256 |
Headers |
Received: (qmail 13992 invoked by alias); 2 Oct 2017 14:15:40 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 13982 invoked by uid 89); 2 Oct 2017 14:15:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=HX-ClientProxiedBy:sk:DB6PR07, Hx-languages-length:2296 X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs.Nagy@arm.com; Message-ID: <59D24A01.6060605@arm.com> Date: Mon, 02 Oct 2017 15:15:29 +0100 From: Szabolcs Nagy <szabolcs.nagy@arm.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Joseph Myers <joseph@codesourcery.com> CC: nd@arm.com, libc-alpha@sourceware.org Subject: [PATCH] fix gamma symbol for static linking and new targets References: <alpine.DEB.2.20.1709052336210.6352@digraph.polyomino.org.uk> <59CE8698.4000902@arm.com> <alpine.DEB.2.20.1709291748580.25795@digraph.polyomino.org.uk> In-Reply-To: <alpine.DEB.2.20.1709291748580.25795@digraph.polyomino.org.uk> Content-Type: multipart/mixed; boundary="------------030705060108000705030207" X-ClientProxiedBy: DB6PR07CA0198.eurprd07.prod.outlook.com (2603:10a6:6:42::28) To HE1PR0802MB2491.eurprd08.prod.outlook.com (2603:10a6:3:d9::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f2544cec-f909-423d-a1db-08d509a00bf3 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(49563074)(201703131423075)(201703031133081)(201702281549075); SRVR:HE1PR0802MB2491; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2491; 3:G/t1Ud925ARk3xUNHQfNbUE4lg+URR59O/ETjWOOI05m/N4Ct1euAedAwwXgA7I1f7a6bpZESfNpyhaT4hZUAXlEQpxJCM37pBOFKRKfWJNdZsyZX6clssxjsU0T9UF8JRE+f8NyTcrAtIthCKSozmgGMG14hRmaU4sL/QpzpJAnf42ZG7OZvoncOCL0XMQ9hsCWd9/RI1r45v8ZXHiWq7SOBN/3ayg1Y9Nb21lrwIabjVmWzVenrsckNsoCRMFj; 25:wHHBvB1tk/JY2h50/nYGkdmR3/dgHYQaY0gBWXbTIHuTqnfp0vxQ93eqq45T9MkVmm6uEAFMCNmVKGnsO6jo97+usO8XVI0GPLznnQUwWt/fyzmqJPrHGQa3Yg7OI9uvaQCxUbAPtCmHfK9ojoQNQjw+EigWsirauuHTN0WjnO7SvsubMjPkeAhrUGyoJGlS6CP/sOGOCNDyTdygI5Md0E5SORv5ruOiM1ExzPPvnWZIcnmAQKsF3elfFS4CkshYgbIXBaeUujHenZ1Sh3zCMX9giN6+dufWni6t4XRdEqtKzGNs7uvfuwy+SL7TqNHDUznpTXEgmQXPXbjspQWdLA==; 31:patYTizUIw5XZq7VDH3T/ndsOE6dN3HVWlb/IKEQ6+G6jF8RERiaTzu+1NpW432ihi8HRustzMEsPMoakFqR2/r6giHEloUtoB6bov+gtOyNIIDitLXtwByY0c5kMD6XlUIU7oXrQeADtNoznao4O6nFHzJrAGxnVE/FGminI3Av+ke8rlCMYVnbvr30Tz0E24QEpOJSh08lcHpq+mptwSBcarYc5xG34H1xHQOJ3X8= X-MS-TrafficTypeDiagnostic: HE1PR0802MB2491: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2491; 20:j3qHENSkwlt7Vr6PPPHv73NUFhN8DjcDLALYyMittQvkeleqsL6IfuvlejhchaypJeUsZ5BqRp0pHtsjbSBR1o0pnBkz54Mk/bG6+nTuYhKsJp0/DKa7aLOrMD0D9X9ORzzZ1zbQa5XxdZitB59k5KAGRyid7KT0InLFu+02iw0=; 4:x8HXniJy/fR/DoYnSgYYdonrvXcsGWPt8Rs+t6u4CTLNdfYcfoUjGTLURG6q3nFPO9dbvxL9C7RS2x/GwxjqqjNwzBpwIJalkxV3IAk9phHYn4eCHbjJwigUdjt1aZiOe/+Ay1hJgcUo539q0fFkaaHoL6KYMJ9qtDO83HLO4fmYqQdvnSIrDwGNrA/wvWJKY/QvJx55mKf+msPD2O7BwmZNcmTFEuM744t/tk3wTCi7KkB72442k6VutViYTZAVJHZ3vYr3saMZ1w1xgVvQzLCJmtBHgNt6upQheIx/EK0= X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Microsoft-Antispam-PRVS: <HE1PR0802MB249106C9CC27C745D5D03DC8ED7D0@HE1PR0802MB2491.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(102415395)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0802MB2491; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0802MB2491; X-Forefront-PRVS: 0448A97BF2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(6009001)(346002)(376002)(39860400002)(189002)(51444003)(377424004)(24454002)(199003)(16576012)(16526017)(5890100001)(83506001)(6116002)(64126003)(305945005)(7736002)(33656002)(2906002)(66066001)(2476003)(76176999)(65806001)(97736004)(101416001)(36756003)(105586002)(84326002)(65956001)(68736007)(106356001)(80316001)(81156014)(8936002)(316002)(59896002)(81166006)(8676002)(21490400003)(6666003)(65816999)(58126008)(478600001)(16586007)(50986999)(4326008)(72206003)(87266999)(54356999)(189998001)(86362001)(25786009)(53936002)(4610100001)(568964002)(6916009)(270700001)(3846002)(6486002)(2950100002)(77096006)(53546010)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0802MB2491; H:[10.2.206.69]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0802MB2491; 23:SHIJong5NqyBwsE/2ULBcMFSzenyI71CP/jSZqy?= =?us-ascii?Q?razUP5iT7LUL181QS0jzWMTZGkZQsGr848koJzBOMRxm0NTBSuIRMzwC2l4g?= =?us-ascii?Q?ijtuD1m9vspZZmJyFMcehrv4hwh9KI/xqpwokufpYU+zJBtnGcmp1ofc4aih?= =?us-ascii?Q?VbXrJ6UzcerLAMlYBIzdqTjUxQXFLIIYdq8rpOd6465Zr4SFWhqHsC0SgAnN?= =?us-ascii?Q?AzJnPMrhJIQAC2x1uKeD8C8pTduBVPBYS1+VVHjpVhoGPrC7461HHB9yvAJ2?= =?us-ascii?Q?C0sv61h/+WIFbxJ/o/p2v6QZ8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yyYOrU9dww0QxCfS7X68MPP5UbtzStKMyygwh7GnakbzYT7haYYEZBSKDm1KZCKyPYZEr1RFvlbmlhJZzXOqAyDf45ColfOFe02D8d9JR1CA3iapMR2IfUX80bMOlvh/V7+TPOQkQMrsoX6nI9EY0xn/eqTGScdIFNnPUWb8yDd/U0rIKSF5F6FQGKnr67jyZ6BA8g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2017 14:15:33.9131 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2491 |
Commit Message
Szabolcs Nagy
Oct. 2, 2017, 2:15 p.m. UTC
On 29/09/17 18:56, Joseph Myers wrote: > On Fri, 29 Sep 2017, Szabolcs Nagy wrote: >> (at least i don't have those symbols after i rebase >> the arm/ilp32 patches now, they used to come from >> math/w_lgamma*_compat2.os) >> >> i don't think it's safe to remove them for new targets >> since they are still in the public math.h > > I think that means new targets and static linking should get them from > w_lgamma_template.c. That is, there should be w_lgamma.c, w_lgammaf.c and > w_lgammal.c that include the template in the usual way then (for > !LIBM_SVID_COMPAT) create the additional aliases (since we don't want the > old versions of wrappers used on new targets - and as gamma is a Unix98 > interface, it should stay around, but as it's obsolescent, we don't want > it for any _FloatN / _FloatNx types). > is this ok?: The lgamma compat code is no longer built for !LIBM_SVID_COMPAT targets, but the legacy gamma, gammaf and gammal symbols should be still defined, so make them aliases to the non-compat lgamma code. 2017-10-02 Szabolcs Nagy <szabolcs.nagy@arm.com> * math/w_lgamma.c: New file. * math/w_lgammaf.c: New file. * math/w_lgammal.c: New file.
Comments
On Mon, 2 Oct 2017, Szabolcs Nagy wrote: > is this ok?: > > The lgamma compat code is no longer built for !LIBM_SVID_COMPAT targets, > but the legacy gamma, gammaf and gammal symbols should be still defined, > so make them aliases to the non-compat lgamma code. > > 2017-10-02 Szabolcs Nagy <szabolcs.nagy@arm.com> > > * math/w_lgamma.c: New file. > * math/w_lgammaf.c: New file. > * math/w_lgammal.c: New file. OK.
On 02/10/17 15:42, Joseph Myers wrote: > On Mon, 2 Oct 2017, Szabolcs Nagy wrote: > >> is this ok?: >> >> The lgamma compat code is no longer built for !LIBM_SVID_COMPAT targets, >> but the legacy gamma, gammaf and gammal symbols should be still defined, >> so make them aliases to the non-compat lgamma code. >> >> 2017-10-02 Szabolcs Nagy <szabolcs.nagy@arm.com> >> >> * math/w_lgamma.c: New file. >> * math/w_lgammaf.c: New file. >> * math/w_lgammal.c: New file. > > OK. > it seems drem and pow10 symbols are also affected. i will prepare a patch for those too.
On Mon, 2 Oct 2017, Szabolcs Nagy wrote:
> it seems drem and pow10 symbols are also affected.
pow10 is deliberately obsoleted and should not be present for new ports or
static linking and should be a compat symbol for existing ports.
We might reasonably consider doing the same for drem (it's an __USE_MISC
symbol, not from any supported standard, and an exact alias of remainder).
On 02/10/17 15:51, Joseph Myers wrote: > On Mon, 2 Oct 2017, Szabolcs Nagy wrote: > >> it seems drem and pow10 symbols are also affected. > > pow10 is deliberately obsoleted and should not be present for new ports or > static linking and should be a compat symbol for existing ports. > > We might reasonably consider doing the same for drem (it's an __USE_MISC > symbol, not from any supported standard, and an exact alias of remainder). > i think drem is more widely used in existing code than pow10. so i'd prefer to keep drem on new targets
On Mon, 2 Oct 2017, Szabolcs Nagy wrote: > i think drem is more widely used in existing code than pow10. > > so i'd prefer to keep drem on new targets That's also reasonable, though I think it would be a good idea to revisit such pre-C99 APIs with different names in C99 in general, and consider obsoleting the pre-C99 names (more generally, __USE_MISC APIs may well be appropriate for obsoletion where there is a clear standard replacement even if not an exact alias). (There are other cases of such pre-C99 names in glibc, e.g. strtoq.)
On 10/02/2017 05:03 PM, Szabolcs Nagy wrote: > On 02/10/17 15:51, Joseph Myers wrote: >> On Mon, 2 Oct 2017, Szabolcs Nagy wrote: >> >>> it seems drem and pow10 symbols are also affected. >> >> pow10 is deliberately obsoleted and should not be present for new ports or >> static linking and should be a compat symbol for existing ports. >> >> We might reasonably consider doing the same for drem (it's an __USE_MISC >> symbol, not from any supported standard, and an exact alias of remainder). >> > > i think drem is more widely used in existing code than pow10. The Fedora 26 (built against glibc 2.25) is this: For pow10, we have gforth. For drem, we have clisp, compat-libf2c, ifm, and the popular, schemaless database with the offensive name. The latter comes from the S2 library for spherical geometry, I think, which is bundled and unmaintained upstream (at least the public repository is). I still think we could give drem the pow10 treatment, too. Thanks, Florian
On 02/10/17 16:25, Florian Weimer wrote: > On 10/02/2017 05:03 PM, Szabolcs Nagy wrote: >> On 02/10/17 15:51, Joseph Myers wrote: >>> On Mon, 2 Oct 2017, Szabolcs Nagy wrote: >>> >>>> it seems drem and pow10 symbols are also affected. >>> >>> pow10 is deliberately obsoleted and should not be present for new ports or >>> static linking and should be a compat symbol for existing ports. >>> >>> We might reasonably consider doing the same for drem (it's an __USE_MISC >>> symbol, not from any supported standard, and an exact alias of remainder). >>> >> >> i think drem is more widely used in existing code than pow10. > > The Fedora 26 (built against glibc 2.25) is this: > > For pow10, we have gforth. > > For drem, we have clisp, compat-libf2c, ifm, and the popular, schemaless database with the offensive name. The > latter comes from the S2 library for spherical geometry, I think, which is bundled and unmaintained upstream > (at least the public repository is). > > I still think we could give drem the pow10 treatment, too. > removing symbols can potentially break existing code. i think if it's just an alias then there is no big harm keeping it around. unlike pow10, drem is historically present in all bsd libcs under _BSD_SOURCE, that's why i'd expect it to be more widely used. i'd mostly expect it in historical software (like libf2c) or hacks that try to wrap all libm functions in glibc, either way it's not code that anybody want to spend time fixing when doing a new port. note that gcc has __builtin_drem that expands to drem (not remainder) if nobody is bothered by that then keeping a weak alias drem should be fine too.
diff --git a/math/w_lgamma.c b/math/w_lgamma.c new file mode 100644 index 0000000000..04b9b197f2 --- /dev/null +++ b/math/w_lgamma.c @@ -0,0 +1,10 @@ +#include <math-type-macros-double.h> +#include <w_lgamma_template.c> +#if __USE_WRAPPER_TEMPLATE +strong_alias (__lgamma, __gamma) +weak_alias (__gamma, gamma) +# ifdef NO_LONG_DOUBLE +strong_alias (__gamma, __gammal) +weak_alias (__gammal, gammal) +# endif +#endif diff --git a/math/w_lgammaf.c b/math/w_lgammaf.c new file mode 100644 index 0000000000..371fa26234 --- /dev/null +++ b/math/w_lgammaf.c @@ -0,0 +1,6 @@ +#include <math-type-macros-float.h> +#include <w_lgamma_template.c> +#if __USE_WRAPPER_TEMPLATE +strong_alias (__lgammaf, __gammaf) +weak_alias (__gammaf, gammaf) +#endif diff --git a/math/w_lgammal.c b/math/w_lgammal.c new file mode 100644 index 0000000000..cf6cc9c1ca --- /dev/null +++ b/math/w_lgammal.c @@ -0,0 +1,6 @@ +#include <math-type-macros-ldouble.h> +#include <w_lgamma_template.c> +#if __USE_WRAPPER_TEMPLATE +strong_alias (__lgammal, __gammal) +weak_alias (__gammal, gammal) +#endif