0966be01fc
gmtime_r() has been in the minimal libc for years, however it was not added to expcetions due to an overlook. In order to do this however, it has to be moved first to the common libc area, so that it's available to any libc that may not implement it. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
22 lines
857 B
CMake
22 lines
857 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_system_include_directories(include)
|
|
|
|
zephyr_library()
|
|
zephyr_library_property(ALLOW_EMPTY TRUE)
|
|
zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_ABORT source/stdlib/abort.c)
|
|
zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_GMTIME_R source/time/gmtime_r.c)
|
|
zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_TIME source/time/time.c)
|
|
zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_MALLOC source/stdlib/malloc.c)
|
|
zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_STRNLEN source/string/strnlen.c)
|
|
zephyr_library_sources_ifdef(CONFIG_COMMON_LIBC_THRD
|
|
source/thrd/cnd.c
|
|
source/thrd/mtx.c
|
|
source/thrd/once.c
|
|
source/thrd/thrd.c
|
|
source/thrd/tss.c
|
|
)
|
|
|
|
# Prevent compiler from optimizing calloc into an infinite recursive call
|
|
zephyr_library_compile_options($<TARGET_PROPERTY:compiler,no_builtin_malloc>)
|