tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xterm (sometimes) needs -lm



On Tue, Jul 22, 2014 at 07:11:07PM +0200, Jean-Yves Migeon wrote:
> Le 22/07/2014 15:02, Manuel Bouyer a ??crit??:
> >Hello,
> >while building a evbarm release with some specific CPUFLAGS:
> >-mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -funsafe-math-optimizations
> >
> >I ran into an error building xterm: undefined references to pow
> >pow(3) is defined in libm and xterm doesn't reference it explicitely.
> >But it does some double computations; I suspect some optimisation
> >comes with calling pow.
> >Anyone know what could be going on here ? blindly adding -lm in xterm's
> >Makefile seems wrong ...
> 
> Squares and such that get replaced by pow()? There are a couple in
> xsrc/.../xterm: xb * xb , yb * yb, ...
> 
> Bizarre though, multiplication is usually faster than pow().
> 
> Or sqrt() with pow(,0.5).

Unless it's being configured with the ReGIS optional feature,
it should not depend on the math library.

xterm has its own sqrt function, to (attempt to) eliminate this dependency.

-- 
Thomas E. Dickey <dickey%invisible-island.net@localhost>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature



Home | Main Index | Thread Index | Old Index