picolibc: USE_MODULE += printf_float for float printf/scanf code [v2]
This makes RIOT use the integer-only printf/scanf code by default and includes a new make parameter to select the full floating point version. This saves about 6kB of text space when building hello-world for the microbit board. Signed-off-by: Keith Packard <keithp@keithp.com> ---- v2: Use USEMODULE=printf_float instead of separate parameter
This commit is contained in:
parent
e215261ced
commit
8c67544e7d
@ -16,6 +16,10 @@ ifeq (1,$(USE_PICOLIBC))
|
|||||||
LINKFLAGS += -Wl,--defsym=__heap_end=_eheap
|
LINKFLAGS += -Wl,--defsym=__heap_end=_eheap
|
||||||
LINKFLAGS += -Wl,--defsym=__heap_start=_sheap
|
LINKFLAGS += -Wl,--defsym=__heap_start=_sheap
|
||||||
CFLAGS += -specs=picolibc.specs
|
CFLAGS += -specs=picolibc.specs
|
||||||
|
ifeq (,$(filter printf_float scanf_float,$(USEMODULE)))
|
||||||
|
CFLAGS += -DPICOLIBC_INTEGER_PRINTF_SCANF
|
||||||
|
LINKFLAGS += -DPICOLIBC_INTEGER_PRINTF_SCANF
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LINKFLAGS += -lc
|
LINKFLAGS += -lc
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user