bug-gnulib
[Top][All Lists]
Advanced

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

Re: M4 1.4.14 on AIX 7.1BETA


From: Rainer Tammer
Subject: Re: M4 1.4.14 on AIX 7.1BETA
Date: Fri, 30 Jul 2010 23:33:24 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Hello Bruno,

Bruno Haible wrote:
> Hello Rainer,
>
> Rainer Tammer wrote:
>   
>> 1. libm
>>
>> Some tests need libm (sample):
>>
>>         xlc  -g   -o test-asin test-asin.o ../gllib/libgnu.a
>> ld: 0711-317 ERROR: Undefined symbol: .asin
>> ld: 0711-317 ERROR: Undefined symbol: asin
>>     
> This is caused by an assumption that gnulib/m4/mathfunc.m4 makes,
> that asin() will be in libm if and only if pow() is in libm. This is not
> true here:
>
>   checking whether pow can be used without linking with libm... yes
>
> So, can you please test whether the functions are in libm individually?
> With this shell code:
>
>   for func in acos asin atan atan2 cbrt copysign cos cosh erf erfc exp \
>               fmod hypot j0 j1 jn lgamma log log10 log1p pow remainder \
>               sin sinh sqrt tan tanh y0 y1 yn; do
>     (echo '#include <math.h>'; echo "double (*funcptr)() = (double 
> (*)())$func;"; echo 'int main() {}') > conftest.c
>     if xlc conftest.c > /dev/null 2>/dev/null; then
>       echo "$func is in libc"
>     else
>       echo "$func requires libm"
>     fi
>   done
>
> Bruno
>
>
>   
I am not entirely sure is this is OK:

libc.a does not contain cos(), cos() is in libm.a

# dump -Tvh libc.a  | grep cos
[403]   0x00000000    undef   ImpExp SV3264 EXTref           /unix
_rmcpucosts
[404]   0x00000000    undef   ImpExp SV3264 EXTref           /unix
_addcpucosts
[405]   0x00000000    undef   ImpExp SV3264 EXTref           /unix
_rmlmbcost

But the test says:

# dump -Tvh libm.a  | grep cos
libm.a[acos.o]:
libm.a[acosh.o]:
libm.a[cacos.o]:
libm.a[cacosh.o]:
libm.a[ccos.o]:
libm.a[ccosh.o]:
libm.a[cos.o]:
libm.a[cosh.o]:
libm.a[acosF.o]:
libm.a[cosF.o]:
libm.a[coshF.o]:
libm.a[cosd.o]:
libm.a[cospid.o]:
libm.a[acosd.o]:
libm.a[coshd.o]:
libm.a[acoshd.o]:
libm.a[_qacos.o]:
libm.a[_qcosh.o]:
libm.a[_qsincos.o]:


AIX 7.1BETA

# ./testlibm
acos is in libc
asin is in libc
atan is in libc
atan2 is in libc
cbrt is in libc
copysign is in libc
cos is in libc
cosh is in libc
erf is in libc
erfc is in libc
exp is in libc
fmod is in libc
hypot is in libc
j0 is in libc
j1 is in libc
jn is in libc
lgamma is in libc
log is in libc
log10 is in libc
log1p is in libc
pow is in libc
remainder is in libc
sin is in libc
sinh is in libc
sqrt is in libc
tan is in libc
tanh is in libc
y0 is in libc
y1 is in libc
yn is in libc


AIX 6.1

# ./testlibm
acos is in libc
asin is in libc
atan is in libc
atan2 is in libc
cbrt is in libc
copysign is in libc
cos is in libc
cosh is in libc
erf is in libc
erfc is in libc
exp is in libc
fmod is in libc
hypot is in libc
j0 is in libc
j1 is in libc
jn is in libc
lgamma is in libc
log is in libc
log10 is in libc
log1p is in libc
pow is in libc
remainder is in libc
sin is in libc
sinh is in libc
sqrt is in libc
tan is in libc
tanh is in libc
y0 is in libc
y1 is in libc
yn is in libc


AIX 5.3.3

# ./testlibm
acos is in libc
asin is in libc
atan is in libc
atan2 is in libc
cbrt is in libc
copysign is in libc
cos is in libc
cosh is in libc
erf is in libc
erfc is in libc
exp is in libc
fmod is in libc
hypot is in libc
j0 is in libc
j1 is in libc
jn is in libc
lgamma is in libc
log is in libc
log10 is in libc
log1p is in libc
pow is in libc
remainder is in libc
sin is in libc
sinh is in libc
sqrt is in libc
tan is in libc
tanh is in libc
y0 is in libc
y1 is in libc
yn is in libc

If I change the test to include the math call in main():

# ./testlibm
acos requires libm
asin requires libm
atan requires libm
atan2 requires libm
cbrt requires libm
copysign requires libm
cos requires libm
cosh requires libm
erf requires libm
erfc requires libm
exp requires libm
fmod requires libm
hypot requires libm
j0 requires libm
j1 requires libm
jn requires libm
lgamma requires libm
log requires libm
log10 requires libm
log1p requires libm
pow requires libm
remainder requires libm
sin requires libm
sinh requires libm
sqrt requires libm
tan requires libm
tanh requires libm
y0 requires libm
y1 requires libm
yn requires libm

It's the same for 6.1... am I mistaken here ?


Bye
  Rainer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]