From 1e40199c8dd97c47c7177fc7a6b3ac2bfbe4113f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 28 Sep 2023 15:14:09 -0700 Subject: [PATCH] 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 --- lib/libc/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/libc/Kconfig b/lib/libc/Kconfig index 1ee19062e38..7c5f92f7e97 100644 --- a/lib/libc/Kconfig +++ b/lib/libc/Kconfig @@ -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