[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] [PATCH] Link with librt for pre-2.17 versions of glibc
From: |
Beat Bolli |
Subject: |
Re: [gpsd-dev] [PATCH] Link with librt for pre-2.17 versions of glibc |
Date: |
Mon, 23 Mar 2015 23:34:03 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 23.03.15 23:27, Gary E. Miller wrote:
> Yo Beat!
>
> On Mon, 23 Mar 2015 23:20:11 +0100
> Beat Bolli <address@hidden> wrote:
>
>> As stated in the man page of clock_gettime(2).
>
> Not on my Linux man page of clock_gettime():
>
> Link with -lrt (only for glibc versions before 2.17).
>
> Do we have a way to test for glibc version?
Not easliy; the "ldd --version" output contains the glibc version.
But since we're detecting librt anyway, adding it to the default flags
just increases link time a little bit.
> On Mon, 23 Mar 2015 23:20:11 +0100
> Beat Bolli <address@hidden> wrote:
>
>> As stated in the man page of clock_gettime(2).
>>
>> This fixes the build on my Raspberry running Debian 7 with glibc 2.13.
>>
>> Signed-off-by: Beat Bolli <address@hidden>
>> ---
>> SConstruct | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/SConstruct b/SConstruct
>> index ba425e7..29ac977 100644
>> --- a/SConstruct
>> +++ b/SConstruct
>> @@ -1043,7 +1043,7 @@ if qt_env:
>> # The libraries have dependencies on system libraries
>> # libdbus appears multiple times because the linker only does one
>> pass.
>> -gpsflags = ["-lm"] + dbusflags
>> +gpsflags = ["-lm"] + rtlibs + dbusflags
>> gpsdflags = usbflags + bluezflags + gpsflags
>>
>> gpslibs = ["-lgps"] + gpsflags
>
>
>
>
> RGDS
> GARY
> ---------------------------------------------------------------------------
> Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
> address@hidden Tel:+1(541)382-8588
>
--
https://drbeat.li
pgp: 0x506A903A; 49D5 794A EA77 F907 764F D89E 304B 93CF 506A 903A
gsm: 4.7.7.6.0.7.7.9.7.1.4.e164.arpa
icbm: 47.0452 N, 7.2715 E
"It takes love over gold, and mind over matter" -- Dire Straits