NetBSD-Bugs archive

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

port-powerpc/43042: frexp(), ldexp() and modf() are missing from powerpc64 libm/libc

>Number:         43042
>Category:       port-powerpc
>Synopsis:       frexp(), ldexp() and modf() are missing from powerpc64 
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-powerpc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 23 09:45:00 +0000 2010
>Originator:     Dennis Ferguson
>Release:        very recent 5.99.24
NetBSD 5.99.24 NetBSD 5.99.24 (GENERIC) #0: Mon Mar 
22 15:11:34 HKT 2010

The floating point functions frexp(), ldexp() and modf(),
which are advertised as being in the math library libm,
aren't there or anywhere else for powerpc64 builds.  Here's
the link of a program which uses frexp():

#      link  grn/grn
-B/usr/src/obj/destdir.macppc/usr/lib/ -B/usr/src/obj/destdir.macppc/usr/lib/  
-Wl,-nostdlib       -o grn  hdb.o hpoint.o hgraph.o main.o 
/usr/src/gnu/usr.bin/groff/src/libs/libgroff/obj/libgroff.a -lm -lsupc++      
hgraph.o: In function `.HGArc(int, int, int, int, int)':
hgraph.cpp:(.text+0xf3c): undefined reference to `.frexp'
collect2: ld returned 1 exit status

*** Failed target:  grn

Do a:

    MACHINE=macppc64 ./ distribution
For reasons unknown to me NetBSD compiles these three
functions into libc rather than libm.  The powerpc64
libc configuration forgets to include them, however.

This change to src/lib/libc/compat/arch/powerpc64/gen/
fixes it:

RCS file: /cvsroot/src/lib/libc/compat/arch/powerpc64/gen/,v
retrieving revision 1.1
diff -u -r1.1
---        1 Jul 2006 19:17:32 -0000       1.1
+++        23 Mar 2010 03:38:06 -0000
@@ -4,4 +4,4 @@
 # objects built from C sources in compat/gen
+SRCS+= compat_frexp_ieee754.c compat_ldexp_ieee754.c compat_modf_ieee754.c

Home | Main Index | Thread Index | Old Index