On 2013-05-13 10:38 +0200, Sven Joachim wrote:

> Am 12.05.2013 um 21:54 schrieb Thorsten Glaser:
>
>> Which does not check “enough”. GCC will usually provide sin(3)
>> as builtin, but not necessarily pow(3).

Foe some value of "usually" which is apparently different on m68k than
on other architectures.

> According to the GCC online documentation[1], both sin() and pow() are
> builtins.

It also states "Many of these functions are only optimized in certain
cases; if they are not optimized in a particular case, a call to the
library function is emitted."

> However, this does not spare you from having to link with -lm
> if you use sin() -- at least on all other Debian architectures than m68k
> the result of the test above is "yes".  Do you have an idea why this is
> different on your pet architecture?

Apparently the builtin sin() is always used on m68k with -O2 then, while
on other arches GCC calls the library function.  Seems it had been
different one year ago when ncurses was last built, or maybe the builtin
pow() was also used back then - sadly there aren't any build logs. :-(

> The test programs have their own configure script which is run instead
> of the one in the main directory[2], so you need to patch
> test/configure.in.  Then it will probably work.

I wonder whether it wouldn't be best to do away with the CF_MATH_LIB
test and always link with -lm.

Cheers,
       Sven


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to