diff options
author | akhropov <akhropov@yandex-team.com> | 2025-01-26 02:29:03 +0300 |
---|---|---|
committer | akhropov <akhropov@yandex-team.com> | 2025-01-26 02:44:54 +0300 |
commit | a5f805e22331a9bb2ee0c43f635dd06087a54ace (patch) | |
tree | 15e15533f98ac57abe8b6030726874ed9d47573b | |
parent | ef11d5ffc3c4ce85afc3180cf45106400424c3e5 (diff) | |
download | ydb-a5f805e22331a9bb2ee0c43f635dd06087a54ace.tar.gz |
Fix: Add pthread library in global_flags after it has been removed as a libcxx dependency
commit_hash:7297c5504ba3a733325e0c15f99934a893f3a812
-rw-r--r-- | build/export_generators/cmake/cmake/global_flags.linker.gnu.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/build/export_generators/cmake/cmake/global_flags.linker.gnu.cmake b/build/export_generators/cmake/cmake/global_flags.linker.gnu.cmake index 37e40ce45b..7e68857c9d 100644 --- a/build/export_generators/cmake/cmake/global_flags.linker.gnu.cmake +++ b/build/export_generators/cmake/cmake/global_flags.linker.gnu.cmake @@ -27,3 +27,17 @@ endif() if (CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux)$") add_link_options(-rdynamic) endif() + +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + # NB: + # glibc merged pthread into libc.so as of 2.34 / Ubuntu 22.04, see + # https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread + # + # In macOS and iOS libpthread points to libSystem already (just as libc.tbd does): + # $ file libpthread.tbd + # libpthread.tbd: symbolic link to libSystem.tbd + # + # Android does not provide libpthread at all. + # Once we will be building against glibc=2.34, we might simply remove -lpthread + link_libraries(pthread) +endif() |