2021-08-27 01:00:10 -04:00
|
|
|
set(sources "pthread.c"
|
|
|
|
"pthread_cond_var.c"
|
|
|
|
"pthread_local_storage.c"
|
|
|
|
"pthread_rwlock.c")
|
|
|
|
|
|
|
|
idf_component_register(SRCS ${sources}
|
2019-04-28 03:38:23 -04:00
|
|
|
INCLUDE_DIRS include)
|
2018-06-06 02:14:03 -04:00
|
|
|
|
2022-08-28 15:20:48 -04:00
|
|
|
idf_build_set_property(COMPILE_DEFINITIONS "_POSIX_READER_WRITER_LOCKS" APPEND)
|
2021-08-27 01:00:10 -04:00
|
|
|
|
2019-11-05 06:20:26 -05:00
|
|
|
set(extra_link_flags "-u pthread_include_pthread_impl")
|
|
|
|
list(APPEND extra_link_flags "-u pthread_include_pthread_cond_impl")
|
|
|
|
list(APPEND extra_link_flags "-u pthread_include_pthread_local_storage_impl")
|
2021-08-27 01:00:10 -04:00
|
|
|
list(APPEND extra_link_flags "-u pthread_include_pthread_rwlock_impl")
|
2019-07-28 05:22:08 -04:00
|
|
|
|
2022-06-17 09:57:11 -04:00
|
|
|
if(CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP AND NOT CONFIG_FREERTOS_SMP) # See IDF-4955
|
2020-04-28 09:04:51 -04:00
|
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=vPortCleanUpTCB")
|
2018-06-06 02:14:03 -04:00
|
|
|
endif()
|
2019-07-28 05:22:08 -04:00
|
|
|
|
|
|
|
if(extra_link_flags)
|
|
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE "${extra_link_flags}")
|
|
|
|
endif()
|
2022-01-31 13:45:31 -05:00
|
|
|
|
|
|
|
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|