libc/picolibc: Remove the global definition of _POSIX_C_SOURCE

This was necessary to get Picolibc to expose the whole Zephyr C library
API, but current versions of the SDK use a version of Picolibc with
built-in Zephyr support.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2023-12-27 22:08:48 -08:00 committed by Anas Nashif
commit 9dcbfa8bf2

View file

@ -9,10 +9,11 @@ zephyr_compile_definitions(__LINUX_ERRNO_EXTENSIONS__)
if(NOT CONFIG_PICOLIBC_USE_MODULE)
# Use picolibc provided with the toolchain
# Use picolibc provided with the toolchain. This requires a new enough
# toolchain so that the version of picolibc supports auto-detecting a
# Zephyr build (via the __ZEPHYR__ macro) to expose the Zephyr C API
zephyr_compile_options(--specs=picolibc.specs)
zephyr_compile_definitions(_POSIX_C_SOURCE=200809)
zephyr_libc_link_libraries(--specs=picolibc.specs c -lgcc)
if(CONFIG_PICOLIBC_IO_FLOAT)
zephyr_compile_definitions(PICOLIBC_DOUBLE_PRINTF_SCANF)