qemu-devel
[Top][All Lists]
Advanced

[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: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] configure: properly check if -lrt and -lm is needed
Date: Mon, 20 Aug 2012 14:27:14 +0100

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.

This patch breaks building the linux-user targets with --static:

cam-vm-266:precise:qemu$ ./configure --target-list=arm-linux-user --static

Error: librt check failed


The test program is failing to link with this
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/librt.a(timer_create.o):
In function `timer_create':
(.text+0x121): undefined reference to `pthread_once'

and a lot of similar errors.

(This seems to me like a glibc bug but since it's out there we rather
have to deal with it I think.)

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]