mailing list of musl libc
 help / color / mirror / code / Atom feed
From: ardi <ardillasdelmonte@gmail.com>
To: musl@lists.openwall.com
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	[thread overview]
Message-ID: <CA+fZqCXK8ZH6hPk-2t9T2ZhBEW-xnfzfSvhHnCv3gDRx_B7mPA@mail.gmail.com> (raw)

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!


             reply	other threads:[~2017-12-06 17:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 17:23 ardi [this message]
2017-12-06 17:33 ` Rich Felker
2017-12-06 17:53 ` Szabolcs Nagy
2017-12-06 19:33   ` ardi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+fZqCXK8ZH6hPk-2t9T2ZhBEW-xnfzfSvhHnCv3gDRx_B7mPA@mail.gmail.com \
    --to=ardillasdelmonte@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).