2003-03-12 20:30:00 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2003-03-13 18:55:14 +00:00
|
|
|
# netlib gdtoa sources
|
2014-03-04 02:19:39 +00:00
|
|
|
.PATH: ${LIBC_SRCTOP}/gdtoa
|
2003-03-13 18:55:14 +00:00
|
|
|
|
Make several changes to the way printf handles hex floating point (%a):
1. Previously, printing the number 1.0 could produce 0x1p+0, 0x2p-1,
0x4p-2, or 0x8p-3, depending on what happened to be convenient. This
meant that printing a value as a double and printing the same value
as a long double could produce different (but equivalent) results.
The change is to always make the leading digit a 1, unless the
number is 0. This solves the aforementioned problem and has
several other advantages.
2. Use the FPU to do rounding. This is far simpler and more portable
than manipulating the bits, and it fixes an obsure round-to-even
bug. It also raises the exceptions now required by IEEE 754R.
The drawbacks are that it is usually slightly slower, and it makes
printf less effective as a debugging tool when the FPU is hosed
(e.g., due to a buggy softfloat implementation).
3. On i386, twiddle the rounding precision so that (2) works properly
for long doubles.
4. Make several simplifications that are now possible due to (2).
5. Split __hldtoa() into a separate file.
Thanks to remko for access to a sparc64 box for testing.
2008-04-12 03:11:36 +00:00
|
|
|
MISRCS+=_hdtoa.c _hldtoa.c _ldtoa.c glue.c
|
2005-01-15 05:23:58 +00:00
|
|
|
GDTOASRCS+=dmisc.c dtoa.c gdtoa.c gethex.c gmisc.c \
|
2003-03-12 20:30:00 +00:00
|
|
|
hd_init.c hexnan.c misc.c smisc.c \
|
2005-01-27 05:44:16 +00:00
|
|
|
strtod.c strtodg.c strtof.c strtord.c sum.c ulp.c
|
2003-03-13 18:55:14 +00:00
|
|
|
|
2014-03-04 02:19:39 +00:00
|
|
|
SYM_MAPS+=${LIBC_SRCTOP}/gdtoa/Symbol.map
|
2006-03-13 01:15:01 +00:00
|
|
|
|
2017-01-20 03:23:24 +00:00
|
|
|
CFLAGS+=-I${SRCTOP}/contrib/gdtoa
|
2003-03-13 18:55:14 +00:00
|
|
|
|
2003-03-12 20:30:00 +00:00
|
|
|
.for src in ${GDTOASRCS}
|
|
|
|
MISRCS+=gdtoa_${src}
|
|
|
|
CLEANFILES+=gdtoa_${src}
|
2017-01-20 03:23:24 +00:00
|
|
|
gdtoa_${src}: ${SRCTOP}/contrib/gdtoa/${src} .NOMETA
|
2015-11-25 19:44:43 +00:00
|
|
|
ln -sf ${.ALLSRC} ${.TARGET}
|
2017-02-13 20:13:29 +00:00
|
|
|
CFLAGS.gdtoa_${src}+=-fno-strict-aliasing
|
2003-03-12 20:30:00 +00:00
|
|
|
.endfor
|