summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2004-05-02 10:55:07 +0000
committerdas <das@FreeBSD.org>2004-05-02 10:55:07 +0000
commit603ccc870f4632c2cb099fc34282c085d8d63760 (patch)
tree6d53e893d42c7c8ef9e52cf63fddfbcc613bedd5
parent94b1a9eeafc91dad3468622023ee59123c1e0ccb (diff)
downloadFreeBSD-src-603ccc870f4632c2cb099fc34282c085d8d63760.zip
FreeBSD-src-603ccc870f4632c2cb099fc34282c085d8d63760.tar.gz
Add option NO_FP_LIBC, which disables floating-point support in
*printf() and *scanf(). Currently, this reduces the size of libc.so by 9K on i386. But the real savings are for static binaries that use *printf() or *scanf() but not strtod(); with an FP-disabled libc, these binaries will not depend on the gdtoa routines, making each binary about 22K smaller.
-rw-r--r--lib/libc/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 0936bc9..ceea67a 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -64,6 +64,9 @@ CFLAGS+= -DYP
.if !defined(NO_HESIOD_LIBC)
CFLAGS+= -DHESIOD
.endif
+.if defined(NO_FP_LIBC)
+CFLAGS+= -DNO_FLOATING_POINT
+.endif
# If there are no machine dependent sources, append all the
# machine-independent sources:
OpenPOWER on IntegriCloud