libc: Add REQUIRES_FLOAT_PRINTF to indirectly set printf support

Instead of making applications use C library specific settings to enable
floating point support in printf, provide this indirect symbol which then
detects which C library is in use and selects the correct configuration for
each.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2023-09-28 15:14:09 -07:00 committed by Alberto Escolar
commit 1e40199c8d

View file

@ -10,6 +10,15 @@ config REQUIRES_FULL_LIBC
Select a C library implementation that provides a complete C library
implementation, rather than the subset provided by MINIMAL_LIBC.
config REQUIRES_FLOAT_PRINTF
bool "Requires floating point support in printf"
select PICOLIBC_IO_FLOAT if PICOLIBC
select CBPRINTF_FP_SUPPORT if MINIMAL_LIBC
select NEWLIB_LIBC_FLOAT_PRINTF if NEWLIB_LIBC
help
Select a printf implementation that provides a complete
implementation including floating point support.
config FULL_LIBC_SUPPORTED
bool
help