Re: [PATCH] Don't link with -lrt on OpenBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/04/2012 09:04 AM, Jasper Lievisse Adriaanse wrote:
>>From bdf3bce37531ec346474bc5c4f37a5d2985d1d35 Mon Sep 17 00:00:00 2001
> From: Jasper Lievisse Adriaanse <jasper@xxxxxxxxx>
> Date: Tue, 4 Sep 2012 17:03:43 +0200
> Subject: [PATCH] Don't link with -lrt on OpenBSD
> 
> ---
>  configure.ac |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index e0d00d5..54d049d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -188,7 +188,13 @@ RT_LIBS=
>  LIBS="$LIBS $LIB_PTHREAD -lrt"
>  AC_CHECK_FUNC([clock_gettime],[
>       AC_DEFINE([HAVE_CLOCK_GETTIME],[],[Defined if clock_gettime() exists in librt.so])
> -     RT_LIBS=-lrt
> +     case "$host" in
> +       *-*-openbsd*)
> +         ;;
> +       *)
> +         RT_LIBS=-lrt
> +         ;;
> +     esac

I'd much rather write this as a probe to see if linking with -rt makes a
difference, and only add it when it matters, than trying to blindly add
it (the pre-patch version) or to blindly exclude it for some platforms
(the post-patch version).  I also wonder if gnulib has some help on this
front.  NACK to this version while I investigate.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]