Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] Add a check whether glibc is used
@ 2020-04-21 17:44 Leonid Vasiliev
  2020-04-22 14:20 ` Cyrill Gorcunov
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Leonid Vasiliev @ 2020-04-21 17:44 UTC (permalink / raw)
  To: gorcunov, alexander.turenko; +Cc: tarantool-patches

The cbus hang test uses glibc pthread mutex implementation details.
Therefore, it should not compile in case of using another library.
---
Now the compilation for alpine 3.5 is broken.

https://github.com/tarantool/tarantool/tree/lvasiliev/gh-noticket-glibc-check

 test/unit/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
index 24586c2..699cd8c 100644
--- a/test/unit/CMakeLists.txt
+++ b/test/unit/CMakeLists.txt
@@ -104,7 +104,9 @@ target_link_libraries(cbus_stress.test core stat)
 add_executable(cbus.test cbus.c)
 target_link_libraries(cbus.test core unit stat)
 
-if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
+include(CheckSymbolExists)
+check_symbol_exists(__GLIBC__ stdio.h GLIBC_USED)
+if (GLIBC_USED)
     add_executable(cbus_hang.test cbus_hang.c)
     target_link_libraries(cbus_hang.test core unit stat)
 endif ()
-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-04-25  6:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 17:44 [Tarantool-patches] [PATCH] Add a check whether glibc is used Leonid Vasiliev
2020-04-22 14:20 ` Cyrill Gorcunov
2020-04-22 14:52   ` lvasiliev
2020-04-22 15:36     ` Cyrill Gorcunov
2020-04-23  9:10       ` lvasiliev
2020-04-23  9:26         ` Cyrill Gorcunov
2020-04-23 10:52 ` Alexander Turenko
2020-04-23 11:37   ` lvasiliev
2020-04-24  7:24 ` Kirill Yukhin
2020-04-24  8:02   ` Kirill Yukhin
2020-04-25  6:43   ` Alexander Turenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox