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
>libm/libc
>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
>Organization:
>Environment:
NetBSD timerxxx.akit-ferguson.com 5.99.24 NetBSD 5.99.24 (GENERIC) #0: Mon Mar
22 15:11:34 HKT 2010
dennis%dennisbigmac.akit-ferguson.com@localhost:/Users/dennis/NetBSD/5.0-current/src/sys/arch/amd64/compile/obj/GENERIC
amd64
>Description:
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
/usr/src/obj/tooldir.NetBSD-5.99.24-amd64/bin/powerpc64--netbsd-gcc
-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++
-L/usr/src/obj/destdir.macppc/usr/lib
-Wl,-rpath-link,/usr/src/obj/destdir.macppc/lib
-L/usr/src/obj/destdir.macppc/lib
-Wl,-rpath-link,/usr/src/obj/destdir.macppc/usr/lib
-L/usr/src/obj/destdir.macppc/usr/lib
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
>How-To-Repeat:
Do a:
MACHINE=macppc64 ./build.sh distribution
>Fix:
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/Makefile.inc
fixes it:
Index: Makefile.inc
===================================================================
RCS file: /cvsroot/src/lib/libc/compat/arch/powerpc64/gen/Makefile.inc,v
retrieving revision 1.1
diff -u -r1.1 Makefile.inc
--- Makefile.inc 1 Jul 2006 19:17:32 -0000 1.1
+++ Makefile.inc 23 Mar 2010 03:38:06 -0000
@@ -4,4 +4,4 @@
SRCS+=
# objects built from C sources in compat/gen
-SRCS+=
+SRCS+= compat_frexp_ieee754.c compat_ldexp_ieee754.c compat_modf_ieee754.c
Home |
Main Index |
Thread Index |
Old Index