diff --git a/cmake/toolchain/armclang/Kconfig b/cmake/toolchain/armclang/Kconfig index 70b9b2bd1520..155da594a924 100644 --- a/cmake/toolchain/armclang/Kconfig +++ b/cmake/toolchain/armclang/Kconfig @@ -16,7 +16,7 @@ choice LIBC_IMPLEMENTATION config ARMCLANG_STD_LIBC bool "ARM Compiler C library" select COMMON_LIBC_STRNLEN - select COMMON_LIBC_TIME if POSIX_TIMERS + select COMMON_LIBC_TIME help Use the full Arm Compiler runtime libraries. A reduced Zephyr minimal libc will be used for library functionality diff --git a/doc/develop/languages/c/common_libc.rst b/doc/develop/languages/c/common_libc.rst index 643265a63e18..bceb078f6e10 100644 --- a/doc/develop/languages/c/common_libc.rst +++ b/doc/develop/languages/c/common_libc.rst @@ -12,7 +12,7 @@ Time function ************* This provides an implementation of the standard C function, :c:func:`time`, -relying on the Zephyr function, :c:func:`clock_gettime`. This function can +relying on the Zephyr function, :c:func:`sys_clock_gettime`. This function can be enabled by selecting :kconfig:option:`COMMON_LIBC_TIME`. Dynamic Memory Management diff --git a/lib/libc/minimal/Kconfig b/lib/libc/minimal/Kconfig index 94737cb81403..ecb0602aaf0d 100644 --- a/lib/libc/minimal/Kconfig +++ b/lib/libc/minimal/Kconfig @@ -37,7 +37,7 @@ config MINIMAL_LIBC_RAND config MINIMAL_LIBC_TIME bool "Time functions" - select COMMON_LIBC_TIME if POSIX_TIMERS + select COMMON_LIBC_TIME select POSIX_C_LANG_SUPPORT_R select COMMON_LIBC_GMTIME_R select COMMON_LIBC_ASCTIME @@ -47,9 +47,6 @@ config MINIMAL_LIBC_TIME help Enable time() and gmtime_r() for the minimal libc. - time() requires CONFIG_POSIX_TIMERS=y because it relies on the POSIX - clock_gettime() function. - In order to make use of the non-reentrant gmtime(), it is necessary to set CONFIG_MINIMAL_LIBC_NON_REENTRANT_FUNCTIONS=y.