tools: enable libstd++ to use idf posix-semaphores

Closes https://github.com/espressif/esp-idf/issues/10598
This commit is contained in:
Alexey Lapshin 2023-05-05 13:37:49 +08:00
parent dfcab42a01
commit f51b55dabb

View File

@ -93,7 +93,9 @@ function(__build_set_default_build_specifications)
unset(c_compile_options)
unset(cxx_compile_options)
list(APPEND compile_definitions "_GNU_SOURCE")
list(APPEND compile_definitions "_GLIBCXX_USE_POSIX_SEMAPHORE" # These two lines enable libstd++ to use
"_GLIBCXX_HAVE_POSIX_SEMAPHORE" # posix-semaphores from components/pthread
"_GNU_SOURCE")
list(APPEND compile_options "-ffunction-sections"
"-fdata-sections"