All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk-Jan C. Binnema <djcb.bulk@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: "linux-bluetooth\@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH] build: use -lrt for clock_gettime on glibc < 2.17
Date: Fri, 06 Sep 2013 11:07:02 +0300	[thread overview]
Message-ID: <87mwnqnzkp.fsf@djcbsoftware.nl> (raw)
In-Reply-To: <52E3B66B-DC7A-4225-8779-8C1E9B0FC15E@holtmann.org>

Hi Marcel,

marcel@holtmann.org writes:

> Hi Dirk-Jan,,
>
>> glibc before 2.17 (e.g., fedora 18) requires -lrt for clock_gettime.
>> AC_SEARCH_LIBS adds it to LIBS in that case
>> ---
>> configure.ac | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/configure.ac b/configure.ac
>> index 050d30d..403e323 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -40,6 +40,7 @@ AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads],
>> AC_CHECK_FUNC(signalfd, dummy=yes,
>> 			AC_MSG_ERROR(signalfd support is required))
>> 
>> +AC_SEARCH_LIBS(clock_gettime,rt)
>
> I do like this since this now it links everything with -lrt even if it is not needed.

Hmm, I suppose there's a missing 'not'...

Note, AC_SEARCH_LIBS tries without rt first, and only adds -lrt if
clock_gettime is not defined without it.

Or did you mean building parts of bluez without -lrt in the glibc < 2.17
case? If so, please see my next patch, which only uses -lrt (if needed)
for bluetoothd.

Cheers,
Dirk.


-- 
Dirk-Jan C. Binnema                  Helsinki, Finland
e:djcb@djcbsoftware.nl           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

  parent reply	other threads:[~2013-09-06  8:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06  6:43 [PATCH] build: use -lrt for clock_gettime on glibc < 2.17 Dirk-Jan C. Binnema
     [not found] ` <52E3B66B-DC7A-4225-8779-8C1E9B0FC15E@holtmann.org>
2013-09-06  8:07   ` Dirk-Jan C. Binnema [this message]
2013-09-06  8:09   ` Dirk-Jan C. Binnema
     [not found]     ` <4A735792-B4D7-468A-A61A-488F605AAB30@holtmann.org>
2013-09-10  7:20       ` Dirk-Jan C. Binnema
2013-09-10  7:55     ` Johan Hedberg

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=87mwnqnzkp.fsf@djcbsoftware.nl \
    --to=djcb.bulk@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.