Tarantool development patches archive
 help / color / mirror / Atom feed
From: Leonid Vasiliev <lvasiliev@tarantool.org>
To: gorcunov@gmail.com, alexander.turenko@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH] Add a check whether glibc is used
Date: Tue, 21 Apr 2020 20:44:57 +0300	[thread overview]
Message-ID: <41a1decbbad25ee4b080052e64f65d1c4206c426.1587490798.git.lvasiliev@tarantool.org> (raw)

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

             reply	other threads:[~2020-04-21 17:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 17:44 Leonid Vasiliev [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41a1decbbad25ee4b080052e64f65d1c4206c426.1587490798.git.lvasiliev@tarantool.org \
    --to=lvasiliev@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] Add a check whether glibc is used' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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