libc: Remove the legacy printf support

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2021-08-24 22:04:37 +08:00 committed by David Sidrane
parent dbdec45049
commit d242861c44
4 changed files with 2 additions and 3543 deletions

View File

@ -51,15 +51,6 @@ config NUNGET_CHARS
Number of characters that can be buffered by ungetc() (Only if
FILE_STREAM equals y)
config LIBC_PRINT_LEGACY
bool "Enable legacy printf logic"
default n
---help---
By default, printf (and friends) are implemented using a port from
newlib-nano. That port can be signifcantly smaller, especially if
floating support is enabled. This option is available, however,
to revert to the legacy printf version is so desired.
config LIBC_FLOATINGPOINT
bool "Enable floating point in printf"
default n
@ -86,7 +77,7 @@ config LIBC_LONG_LONG
config LIBC_NUMBERED_ARGS
bool "Enable numbered arguments in printf"
default n
depends on (LIBC_FLOATINGPOINT || LIBC_LONG_LONG) && !LIBC_PRINT_LEGACY
depends on LIBC_FLOATINGPOINT || LIBC_LONG_LONG
---help---
Enables support for numbered arguments in printf.

View File

@ -28,24 +28,11 @@ CSRCS += lib_meminstream.c lib_memoutstream.c lib_memsistream.c
CSRCS += lib_memsostream.c lib_lowoutstream.c
CSRCS += lib_zeroinstream.c lib_nullinstream.c lib_nulloutstream.c
CSRCS += lib_sscanf.c lib_vsscanf.c lib_libvscanf.c lib_libnoflush.c
CSRCS += lib_libsnoflush.c
ifeq ($(CONFIG_LIBC_PRINT_LEGACY),y)
CSRCS += legacy_libvsprintf.c
ifeq ($(CONFIG_LIBC_FLOATINGPOINT),y)
CSRCS += legacy_dtoa.c
endif
else
CSRCS += lib_libvsprintf.c lib_ultoa_invert.c
CSRCS += lib_libsnoflush.c lib_libvsprintf.c lib_ultoa_invert.c
ifeq ($(CONFIG_LIBC_FLOATINGPOINT),y)
CSRCS += lib_dtoa_engine.c lib_dtoa_data.c
endif
endif
# The remaining sources files depend upon C streams
ifeq ($(CONFIG_FILE_STREAM),y)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff