Subject: Re: shocking speed performance!
To: None <kim@pvv.ntnu.no>
From: Todd Vierling <tv@pobox.com>
List: port-arm32
Date: 05/21/1999 13:31:09
On Fri, 21 May 1999 kim@pvv.ntnu.no wrote:
: > Normally a gcc implementation would put them in libgcc.a, since they are
: > support libraries for a compiler implementation. The NetBSD implementors
: > chose to place most of the functions from that library in libc.so
: > (presumably to simplify shared library handling for the common case). I
: > had nothing to do with that decision; I'm not entirely happy with it, but
: > I have to live with it.
:
: What a mess.
It's actually a speed vs. program-size tradeoff.
You *cannot* put the backing code for an operation such as the following
into libm; it either must be inlined by the compiler or part of a compiler
support library such as libgcc or libc:
double a;
unsigned b;
b = a;
: In my experience, it has always been the users responsibility to specify
: -lm
: when compiling code with math.
However, it is *not* required to use -lm when using basic operators (-lm
specifies a library of *math functions*).
--
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)