[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is needed |
Date: |
Mon, 20 Aug 2012 19:53:22 +0000 |
On Mon, Aug 20, 2012 at 12:43 PM, Peter Maydell
<address@hidden> wrote:
> On 16 August 2012 14:22, Natanael Copa <address@hidden> wrote:
>> Fixes build against uClibc.
>>
>> uClibc provides 2 versions of clock_gettime(), one with realtime
>> support and one without (this is so you can avoid linking in -lrt
>> unless actually needed). This means that the clock_gettime() don't
>> need -lrt. We still need it for timer_create() so we check for this
>> function in addition.
>>
>> We also need check if -lm is needed for isnan().
>>
>> Both -lm and -lrt are needed for libs_qga.
>>
>> Signed-off-by: Natanael Copa <address@hidden>
>> ---
>> The Xen people have nagged me to get this patch upstream so I have come
>> up with a rebased v2 patch after consulting with pm215 on IRC.
>>
>> Please consider include this.
>>
>> Changes v1->v2:
>> - Check for sin() in addition to isnan()
>> - Add comment on why we also check for timer_create
>> - Use $LIBS and $libs_qga instead of $libm and $librt, based on
>> feedback from pm215 on IRC
>> - Do not remove the explicit add of -lm unless Haiku. This was due
>> to http://www.mail-archive.com/address@hidden/msg102965.html
>> I am not sure if this is valid, though.
>
> Certainly building a linux-user target works for me even without
> that explicit 'LIBS+=-lm' in Makefile.target. Blue, can you remember
> what you had in mind when you wrote that email?
Build failed since math library functions (sin() etc.) were not found.
>
> thanks
> -- PMM
- [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is needed, Natanael Copa, 2012/08/16
- Re: [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is needed, Juan Quintela, 2012/08/20
- Re: [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is needed, Peter Maydell, 2012/08/20
- Re: [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is needed,
Blue Swirl <=
- Re: [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is needed, Natanael Copa, 2012/08/21
- Re: [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is needed, Blue Swirl, 2012/08/21
- [Qemu-devel] [PATCH v4] configure: properly check if -lrt and -lm is needed, Natanael Copa, 2012/08/22
- Re: [Qemu-devel] [PATCH v4] configure: properly check if -lrt and -lm is needed, Natanael Copa, 2012/08/28
- Re: [Qemu-devel] [PATCH v4] configure: properly check if -lrt and -lm is needed, Blue Swirl, 2012/08/28
- Re: [Qemu-devel] [PATCH v4] configure: properly check if -lrt and -lm is needed, Natanael Copa, 2012/08/29
Re: [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is needed, Peter Maydell, 2012/08/20