From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLyvp-00053M-1G for qemu-devel@nongnu.org; Mon, 16 May 2011 10:38:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QLyvn-0008PT-FF for qemu-devel@nongnu.org; Mon, 16 May 2011 10:38:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLyvn-0008P6-8K for qemu-devel@nongnu.org; Mon, 16 May 2011 10:37:59 -0400 Date: Mon, 16 May 2011 20:37:51 +0300 From: Alon Levy Message-ID: <20110516173750.GA3868@playa.redhat.com> References: <4DD115FD.1040103@redhat.com> <1305552333-19351-1-git-send-email-alevy@redhat.com> <4DD12691.7080905@codemonkey.ws> <4DD12DD9.2040400@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DD12DD9.2040400@redhat.com> Subject: Re: [Qemu-devel] [PATCH] libcacard: add libcacard.la target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Mon, May 16, 2011 at 03:59:53PM +0200, Paolo Bonzini wrote: > On 05/16/2011 03:28 PM, Anthony Liguori wrote: > >> > >> > >> *** Warning: Linking the shared library libcacard.la against the > >>non-libtool > >> *** objects ../trace-dtrace.o is not portable! > > > >I don't think slipping in libtool like this is such a good idea. > > I disagree but, the warning is indeed legitimate, so > > NACK > > >Isn't la just a static archive compiled with -fPIC? > > No, .la is a text file pointing (most importantly) to the static > library, the shared library, and the dependencies of the static > library. > > Alon, do you need this to comply with some packaging guidelines > forbidding static libraries? > I'm basically trying to replace the current shared object built by the standalone libcacard project. Since we are deprecating that on account of not wanting to maintain two code bases, I need a replacement shared object producing something somewhere. It seems best to do it within the project and not, say, as spec file for an rpm, for obvious reasons of wanting this to be distribution agnostic. I've settled on libtool as the linker solution since it seems to be the de facto standard, please correct me on this point if I'm wrong. We are not using autoconf, so I've called it directly in it's various modes, compile, link and install. Regarding your concerns from above: The libcacard.la target produces a shared object with the right version symlinks (libcacard.so.0.0.0, libcacard.so.0 and libcacard.so) thanks to libtool Legitemacy of the warning: basically libtool is concerned about linking in position dependant code. But the trace-dtrace.o contains no .rodata section and is not actually a problem for the linker, I've verfied the resulting library works fine with spicec (the spice client using it). I'd appreciate any suggestion of a replacement for libtool if it is not appropriate. Note that this building of a shared library is not something new - we've talked about this before in relation to libcacard inclusion inside qemu git repository. > Paolo