From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12209 Path: news.gmane.org!.POSTED!not-for-mail From: ardi Newsgroups: gmane.linux.lib.musl.general Subject: Feasability of patching libm with OS X 10.5.8 libc for IBM double-double in PPC Date: Wed, 6 Dec 2017 18:23:33 +0100 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1512581026 19980 195.159.176.226 (6 Dec 2017 17:23:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 6 Dec 2017 17:23:46 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12225-gllmg-musl=m.gmane.org@lists.openwall.com Wed Dec 06 18:23:43 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1eMdQ6-00058Y-OC for gllmg-musl@m.gmane.org; Wed, 06 Dec 2017 18:23:42 +0100 Original-Received: (qmail 1668 invoked by uid 550); 6 Dec 2017 17:23:47 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 1630 invoked from network); 6 Dec 2017 17:23:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=npgaygCB68OorshPh0MJf89kK5nK6VjY38HAsd0tR0A=; b=tzQM7sxrjb/AEu5C7Wk3PNVHxKliy2I7VZTDULdob7w0sBrHwNgO5fTTHBDvvitqVc TB/wzzNhCGrKzbY6KwYmn+0t9nysjmK76OFqhODoSOVQgiHIGaXTW0FIp87QPQ5Ovo2V M4auovUi4/5VGBuBIk+zEAGwmIzRsGT51XeCNTYlKCyuyLSJn1aaSkf23wy4pbCRXhoE QJODYjZYetShcVOZf4wBEw56Uq1xsfZgbpFTwU7sMrVAvoCaNbkea20SDBTHsFosPvRT RFiGxE/kQZoSfTwlzVH5kl7Dlu9pebWRsFjepsCKJ8Y2Wr7LBOrjZdHEKV4MvvH5kfmM WD8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=npgaygCB68OorshPh0MJf89kK5nK6VjY38HAsd0tR0A=; b=sgFMCUtpEJjLec+O10KAqwKgbfgdOaJciUEfZtNK1kC6N7Vz3CopV7m1Gt08X4+yta sA06Zfowxx9vQkLZfzRGVzot8N3bcxZoraIbC3YXVCg4GgfXZxoBd0iQ8ILQ2ols2A7u 3qtm+VkXfS0aoJwF3arM4O3rfxbiwDKf3nCfJq+F0KeGoSRr3xyplC0hFNlSiOHAib9E eclfwN6yikAEsVYOQrcBSAqUDy06rxiFEOkYFStMGE0ZZxgFHkkgnl8t/1IyBTm3W8i8 pq9xmtRX5wGkANr/mXPWVDQtLVXoANNdrBtOcBbV63fR5IiHWfAlLdTDj7RYE31r/5vX ZZMA== X-Gm-Message-State: AJaThX6pCol8jWXeKBtyBx7kKzlJUYHlEB1peOvfmRfCj7Iz7R3ck6bF EuTirrA1E9kArLkEcQGuro7fhP/3UWI+EHdGaWQ= X-Google-Smtp-Source: AGs4zMYO2A+tO14q9hjYmp9NTJl5v/ol+aPTT2YYIFzXh4rBHLKEyeVLGVfqG2Sl+u8FyzBHmzmB3hc0ol5LdGpHLqs= X-Received: by 10.84.172.1 with SMTP id m1mr23196341plb.174.1512581014432; Wed, 06 Dec 2017 09:23:34 -0800 (PST) Xref: news.gmane.org gmane.linux.lib.musl.general:12209 Archived-At: Hi!! Disclaimer: I've read previous threads about long double support in musl, as well as web pages and I understand that musl won't support the IBM double-double, by design choice. I respect that decision (I've just started to use musl and I can only say I admire the quality and the design), and I'm not writing this as my opinion about that decision. Said this, I need IBM double-double in PowerPC targets (using clang as compiler), and I'd like to use musl because of its well written code. I'd also have the option of using the libc from OS X 10.5.8, which, AFAIK, is the latest libc from Apple with full support for PPC and PPC64 before they dropped them. This is libc 498.1.7 from the Apple open source site. However, building Darwin components was never easy (build instructions are most of the times missing, ask the PureDarwin people), so I *believe* I can get this libc working, but who knows... As a (perhaps) better solution, I thought that maybe I don't need to patch too many musl source files in order to get double-double working. If I'm understanding the situation correctly, the double-double implementation is actually generated by clang at compile code. The libc library should only need to provide the interface definitions (the definitions for mantissa bits, exponent bits, max values, etc...), and perhaps the implementation of some functions whose code wouldn't be generated by the compiler (not sure of this, as clang generates code for a set of functions through builtins in compiler_rt). Maybe there would be some issues with converting floating point to char string, but it would depend on what code you'd use for that conversion. So, as a personal patch (not pushing for official support, as I said above), do you consider it would be feasible to patch the necessary musl source files with contents from the OS X 10.5.8 libc? Do you believe it would be a matter of a reasonably small set of files, or rather an overwhelming task? And... do you know of any confidence test I could run for checking that it's working as expected? Thanks a lot!