diff options
author | Lada Trimasova | 2016-01-26 16:34:50 +0100 |
---|---|---|
committer | Lada Trimasova | 2016-01-26 16:34:50 +0100 |
commit | bf6be9f5238a0db221089f87a601738a110bd4d6 (patch) | |
tree | 2b31bf9046d374fe1df8ac0ba7025b67942b73c9 /configure.ac | |
parent | libmount: consolidate btrfs stuff, make it more portable (diff) | |
download | kernel-qcow2-util-linux-bf6be9f5238a0db221089f87a601738a110bd4d6.tar.gz kernel-qcow2-util-linux-bf6be9f5238a0db221089f87a601738a110bd4d6.tar.xz kernel-qcow2-util-linux-bf6be9f5238a0db221089f87a601738a110bd4d6.zip |
buildsys: fix static configuration and building
In case of uClibc librt depends on libpthread. In particular
timer_create() function uses pthread_XXX(). That means in case of static
builds it's required to link not librt alone but together with libpthread. So
if checking timer_create function in librt fails, it is necessary to check if
timer_create function successfully links with "-lpthread".
That issues was spotted in Buldroot autobuilder failures:
http://autobuild.buildroot.net/results/759/75960db671807091fe9155aee9e46a6245e32590/
http://autobuild.buildroot.org/results/112/112e8b85783f5aaba42a937a6eb064317615a21b/
Signed-off-by: Lada Trimasova <ltrimas@synopsys.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 3002e77a2..75e869064 100644 --- a/configure.ac +++ b/configure.ac @@ -394,7 +394,14 @@ AC_CHECK_FUNCS([timer_create], [AC_CHECK_LIB([rt], [timer_create], [ have_timer="yes" REALTIME_LIBS="-lrt" - ])] + ],[ + AC_SEARCH_LIBS([timer_create], [rt], [ + AC_MSG_RESULT(yes) + have_timer="yes" + REALTIME_LIBS="-lrt -lpthread" + ],[], [-lpthread] + ) + ])] ) AC_SUBST([REALTIME_LIBS]) |