2018-09-10 21:44:12 -04:00
|
|
|
set(COMPONENT_SRCS "locks.c"
|
|
|
|
"pthread.c"
|
|
|
|
"random.c"
|
|
|
|
"reent_init.c"
|
|
|
|
"select.c"
|
|
|
|
"syscall_table.c"
|
|
|
|
"syscalls.c"
|
2018-09-12 20:56:59 -04:00
|
|
|
"termios.c"
|
2018-10-25 05:53:52 -04:00
|
|
|
"utime.c"
|
2018-09-10 21:44:12 -04:00
|
|
|
"time.c")
|
2018-01-11 21:49:13 -05:00
|
|
|
set(COMPONENT_ADD_INCLUDEDIRS platform_include include)
|
|
|
|
|
|
|
|
if(CONFIG_SPIRAM_CACHE_WORKAROUND)
|
2018-02-26 23:45:30 -05:00
|
|
|
set(LIBC c-psram-workaround)
|
|
|
|
set(LIBM m-psram-workaround)
|
2018-01-11 21:49:13 -05:00
|
|
|
else()
|
|
|
|
|
2018-02-26 23:45:30 -05:00
|
|
|
if(CONFIG_NEWLIB_NANO_FORMAT)
|
|
|
|
set(LIBC c_nano)
|
|
|
|
else()
|
|
|
|
set(LIBC c)
|
|
|
|
endif()
|
2018-01-11 21:49:13 -05:00
|
|
|
|
2018-02-26 23:45:30 -05:00
|
|
|
set(LIBM m)
|
|
|
|
endif()
|
2018-01-11 21:49:13 -05:00
|
|
|
|
2018-03-22 02:27:10 -04:00
|
|
|
set(COMPONENT_REQUIRES vfs) # for sys/ioctl.h
|
|
|
|
|
2018-01-11 21:49:13 -05:00
|
|
|
register_component()
|
|
|
|
|
|
|
|
target_link_libraries(newlib "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib")
|
|
|
|
target_link_libraries(newlib ${LIBC} ${LIBM})
|