From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy7Sp-0006zZ-R1 for qemu-devel@nongnu.org; Mon, 29 Aug 2011 15:25:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qy7So-0006zL-Hn for qemu-devel@nongnu.org; Mon, 29 Aug 2011 15:25:43 -0400 Received: from e6.ny.us.ibm.com ([32.97.182.146]:58723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy7So-0006zF-E1 for qemu-devel@nongnu.org; Mon, 29 Aug 2011 15:25:42 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p7TJ1VIO019233 for ; Mon, 29 Aug 2011 15:01:31 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p7TJPehJ160680 for ; Mon, 29 Aug 2011 15:25:40 -0400 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p7TDP9nH016586 for ; Mon, 29 Aug 2011 07:25:09 -0600 Message-ID: <4E5BE7AF.5020906@linux.vnet.ibm.com> Date: Mon, 29 Aug 2011 14:25:35 -0500 From: Michael Roth MIME-Version: 1.0 References: <87ippk56nh.fsf@ginnungagap.bsc.es> <87bovahh6p.fsf@ginnungagap.bsc.es> <87vcthqu8p.fsf@ginnungagap.bsc.es> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] Fix guest agent build with simpletrace List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Blue Swirl , qemu-devel@nongnu.org On 08/29/2011 07:28 AM, Stefan Hajnoczi wrote: > On Sun, Aug 28, 2011 at 10:08 PM, Blue Swirl wro= te: >> On Sun, Aug 28, 2011 at 6:13 PM, Llu=EDs wrote: >>> Blue Swirl writes: >>> >>>> On Sat, Aug 27, 2011 at 5:56 PM, Llu=EDs wrote: >>>>>>> I sent a patch that should fix it for everybody linking with the = tracing >>>>>>> objects: >>>>>>> >>>>>>> http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg03150.htm= l >>>>> >>>>>> With your patch, there are warnings from linker: >>>>>> ../qemu-timer-common.o: warning: multiple common of `use_rt_clock' >>>>>> ../qemu-timer-common.o: warning: previous common is here >>>>> >>>>> Ah, yes. These extra errors are fixed by the duplicate elimination = patch >>>>> :) >>>>> >>>>> http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg02987.html >>>>> >>>>> So, you need both to keep it clean. >>> >>>> Using the sort function looks hackish to me. Maybe the linkage shoul= d >>>> be controlled by configure instead? >>> >>> What do you mean? Moving the logic for selecting the object files to >>> link with on each top-level target out into the configure? >> >> Add CONFIG_QEMU_TIMER, configure sets it to 'y' when it is needed by >> simpletrace or other cases. > > The $(sort) approach is simpler because it is implicit. I'm not sure > that explicitly managing these dependencies is necessary. But the It also mirrors how most projects handle duplicate header includes using=20 a guard. Plus, it really sucks to not be able to create a self-sufficient group=20 of objects just because someone that includes your group happens to also=20 include a common object (in this case, common-obj-y). trace-obj-y should=20 absolutely be able to note qemu-timer-common.o as an explicit dependency=20 regardless of whether or not it happens to get linked in by something=20 else in the common case. Plus with talk of breaking up QEMU into shared objects I think we'd end=20 up needing to have self-sufficient object groups anyway. But, in the meantime, I broke something again so I put together a patch=20 with Blue's suggestions that seems to do the trick fairly reasonably.=20 I'll send it as a response for reference, though I'd really prefer the=20 $(sort) approach. > configure approach works for me too. > > Blue: Are you going to post the CONFIG_QEMU_TIMER patch? > > Stefan >