<div dir="ltr"><div><div><div>Although I work on the PPC back end, I can't say I'm overly familiar with long double support. But here's what I know...<br></div>On Linux, both gcc and glibc fully support IBM double+double format. Clang supports it as well of course. It'll emit the necessary calls and I think it does the right thing for compile-time calculations using APFloat.<br><br></div>So you should be able to use clang on Linux without any issues.<br></div>Furthermore, I believe compiler-rt should have the necessary support as well so you should be able to use it on any OS that clang works on.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 5, 2017 at 10:02 PM, ardi via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have some old C code written for PowerPC long double (IBM<br>
double+double). I believe that clang supports generating IBM long<br>
double code for ppc targets (correct me if I'm wrong), but I'd like to<br>
know what C runtimes I could use together with clang in order to get<br>
this floating point format working.<br>
<br>
What I know for the moment:<br>
<br>
- The Apple libc of course supports the IBM long double (at least in<br>
versions older than when they removed ppc support).<br>
<br>
- Linux seems to support it too in glibc (didn't test it myself,<br>
though, so not 100% sure).<br>
<br>
- The musl library won't support that format, by design decision (they<br>
will only support standard formats).<br>
<br>
- The support for long double in NetBSD seems quite recent (added in<br>
7.0 in preliminary status, if I'm reading the relnotes correctly, so I<br>
don't think IBM long double is supported at this point).<br>
<br>
- No idea about OpenBSD nor FreeBSD (couldn't find any docs referring<br>
to this, only the gcc manpage, but it's a manpage written by the gcc<br>
authors, so it doesn't cover the support in the C runtime of the OS).<br>
<br>
So, the only one that I know for sure supports this format is the<br>
Apple libc. If you know of more alternatives, please tell, as I'd like<br>
to continue working with this code.<br>
<br>
Thanks!<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>