Deprecate WITHOUT_FP_LIBC?

From: Oskar Holmlund <eovholmlund_at_gmail.com>
Date: Fri, 16 Jan 2026 20:08:52 UTC
Hi,

I have been playing around with different options in the src.conf

If I build the world with WITHOUT_FP_LIBC there is some issues for
example in df and top, they are all logical and nothing to cry about.
( https://cgit.freebsd.org/src/tree/lib/libc/stdio/vfprintf.c#n969 )

# df -i
Filesystem            1K-blocks      Used     Avail Capacity iused
ifree %iused  Mounted on
zroot/ROOT/default     12077004   5354740   6722264     f%  78374
  13444528    f%   /


(On armv7 top will core dump, doesnt like %f %s %s)
# top
last pid: 27847;  load averages:       f,       f,       f    up
0+05:49:27  16:11:21
35 processes:  1 running, 34 sleeping
CPU:    f% user,    f% nice,    f% system,    f% interrupt,    f% idle
Mem: 12M Active, 2115M Inact, 4371M Wired, 56K Buf, 103G Free
ARC: 2586M Total, 562M MFU, 1500M MRU, 256K Anon, 34M Header, 472M Other
      1745M Compressed, 3198M Uncompressed, f:1 Ratio
Swap: 8192M Total, 8192M Free

   PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME WCPU COMMAND
27847 root          1   0    0    15M  3812K CPU13   13   0:00   f% top


I dont think there is a point of finding all places there we try to write
any floating point number and handle that in the base applications, too
much work, too messy code.


A little bit more serious problem is that now the buildworld doesnt work anymore

# make buildworld
[Creating objdir /usr/obj/home/oskarh/src/amd64.amd64...]
make: /home/oskarh/src/share/mk/bsd.compiler.mk:249: Comparison with
">=" requires both operands "g" and "100000" to be numeric
         in .for loop from /home/oskarh/src/share/mk/bsd.compiler.mk:160
with cc = CC, X_ = ${_empty_var_}
         in /home/oskarh/src/Makefile:144
make: /home/oskarh/src/share/mk/bsd.compiler.mk:274: Comparison with
">=" requires both operands "g" and "100000" to be numeric
         in .for loop from /home/oskarh/src/share/mk/bsd.compiler.mk:160
with cc = CC, X_ = ${_empty_var_}
         in /home/oskarh/src/Makefile:144

...
make: /home/oskarh/src/share/mk/bsd.linker.mk:117: Comparison with ">="
requires both operands "g" and "140000" to be numeric
         in .for loop from /home/oskarh/src/share/mk/bsd.linker.mk:36
with ld = LD, X_ = ${_empty_var_}
         in /home/oskarh/src/share/mk/bsd.compiler.mk:322
         in /home/oskarh/src/Makefile:144
make: Fatal errors encountered -- cannot continue
make: stopped making "buildworld" in /home/oskarh/src


( https://cgit.freebsd.org/src/tree/lib/libc/stdio/vfprintf.c#n751 -
still ok, will go to default L969
 and produce g instead of a number)

I belive the easiest solution to this problem is to remove the option
WITHOUT_FP_LIBC and clean up libc from the ifndefs spread out in the code.

The motivation to introduce WITHOUT_FP_LIBC is found in commit
https://cgit.freebsd.org/src/commit/?id=757edc654e0f47d1259395b698b012df7630aaad

any thoughts? Does WITHOUT_FP_LIBC fill any need today?

Cheers
Oskar Holmlund