From: Damien Lespiau Subject: Re: [PATCH] overlay: fix link error due to missing -lrt Date: Tue, 17 Sep 2013 00:23:13 +0100 Message-ID: <20130916232313.GE29268@strange.amr.corp.intel.com> References: <1379357298-31918-1-git-send-email-rodrigo.vivi@gmail.com> <20130916214743.GM8243@betterave.cristau.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C82CE5C85 for ; Mon, 16 Sep 2013 16:28:39 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130916214743.GM8243@betterave.cristau.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Julien Cristau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Sep 16, 2013 at 11:47:43PM +0200, Julien Cristau wrote: > On Mon, Sep 16, 2013 at 15:48:18 -0300, Rodrigo Vivi wrote: > > > CC: Damien Lespiau > > Signed-off-by: Rodrigo Vivi > > --- > > overlay/Makefile.am | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/overlay/Makefile.am b/overlay/Makefile.am > > index 426a3df..c648875 100644 > > --- a/overlay/Makefile.am > > +++ b/overlay/Makefile.am > > @@ -65,4 +65,6 @@ intel_gpu_overlay_SOURCES += \ > > > > intel_gpu_overlay_SOURCES += $(both_x11_sources) > > > > +intel_gpu_overlay_LDADD = $(LDADD) -lrt > > + > > EXTRA_DIST=README > > Assuming this is about clock_gettime (which really the commit message > should say), there should be a configure check. Recent libc doesn't > need it. Indeed. Always adding -lrt works but is, of course, not perfect. Note that we have other unconditional linking against librt already that could be audited. One could steal what glib does and define a special CLOCK_GETTIME_LIBS variable that will end up either empty or equal to '-lrt': https://git.gnome.org/browse/glib/tree/configure.ac#n2414 -- Damien