Seongbae Park <[EMAIL PROTECTED]> wrote:
> Joerg Schilling wrote:
> >It is currently impossible to create a 100% Sun compatible libm.
>
> Keith M Wesolowski <[EMAIL PROTECTED]> wrote:
> > Why?
>
> Joerg Schilling wrote:
> > libm not only depends on ANSI C-99 but on undocumented hidden
> > behavior of Studio 10.
>
> Can you report them to us (via some wiki page, a blog, or an email
> by decreasing order of preference) ?
> If you have a list of issues that you've seen,
> at least we can try to get an informal documentation on what
> Studio 10 expects from libm.
> Unfortunately, I don't think there's an existing document
> that lists all such dependences,
> and it's possible that there are dependences that
> we're not even aware of.
> OTOH, I just hope we'll opensource libm as soon as possible..
It seems that there are two basic "reasons":
- Sun CC as well as GNU CC heavily use built in functions
for floating point support. Of course these builtins are
incompatible :-(
- Sun cc calls sin() if you use "normal" optimization but
if you use the optimization that is used by e.g. X11,
it calls __sin() from the same source.
As a result, my first libm could not be used to create
X11 binaries.
The builtin function problem opens a can of worms because you need to
take some precautions to allow programs to call printf() without
forcing them to link against libm regardless of whether they contain
floating point code or not.
For this reason, the float -> string functions don't use floatingpoint
math to do the conversion. But as the printf code needs to call something
like isinf() and isnan(), to know whther it makes sense to call the
float -> string functions at all.
BSD uses gcc and FreeBSD's libc contains isinf() and isnan(). Sun's libc does
not and compiling your own printf only works on OpenSolaris in case you
have a math.h that knows about the secret builtin functions of the Sun
C-compiler.
I hope this helps to understand the problem with libm a bit....
Jörg
--
EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni)
[EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-discuss mailing list
[email protected]