Comment 2 for bug 1193628

Revision history for this message
Michael Tokarev (mjt+launchpad-tls) wrote :

This is a change in glibc. Since version 2.17, clock_gettime() and friends were moved from -lrt to the main libc, so for linking with clock_gettime(), -lrt isn't needed anymore.

However, (old) qemu configure only checked clock_gettime(), and used other functions like timer_create() &Co above.

There was a patch:

commit 8bacde8d86a09699207d85d4bab06162aed18dc4
Author: Natanael Copa <email address hidden>
Date: Wed Sep 12 09:06:51 2012 +0000

    configure: properly check if -lrt and -lm is needed

    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.

which was applied past qemu-1.2, so 1.4 and 1.5 versions have it, and _should_ work fine.

Thanks,

/mjt