From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzDJK-0000Tv-Rg for qemu-devel@nongnu.org; Thu, 01 Sep 2011 15:52:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzDJJ-0002nC-Si for qemu-devel@nongnu.org; Thu, 01 Sep 2011 15:52:26 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]:52592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzDJJ-0002lE-Q4 for qemu-devel@nongnu.org; Thu, 01 Sep 2011 15:52:25 -0400 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by e3.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p81JRdKB027589 for ; Thu, 1 Sep 2011 15:27:39 -0400 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p81JqHga178570 for ; Thu, 1 Sep 2011 15:52:17 -0400 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p81JqDYc006020 for ; Thu, 1 Sep 2011 13:52:16 -0600 Message-ID: <4E5FE26C.7030002@linux.vnet.ibm.com> Date: Thu, 01 Sep 2011 14:52:12 -0500 From: Michael Roth MIME-Version: 1.0 References: <20110824195317.14304.63305.stgit@ginnungagap.bsc.es> <1314260332-10534-1-git-send-email-stefanha@linux.vnet.ibm.com> <4E5FD4F9.3030107@codemonkey.ws> In-Reply-To: <4E5FD4F9.3030107@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , =?ISO-8859-1?Q?Llu=EDs?= =?ISO-8859-1?Q?_Vilanova?= On 09/01/2011 01:54 PM, Anthony Liguori wrote: > On 08/25/2011 03:18 AM, Stefan Hajnoczi wrote: >> Avoid duplicate object files during the link. There are legitimate >> cases where a link command-line would include duplicate object files >> because two independent subsystems both depend on common infrastructure. >> >> Use GNU make's $(sort) function to remove duplicate object files from >> the link command-line. >> >> Signed-off-by: Stefan Hajnoczi > > Applied. Thanks. > Don't think it'll hurt to have both, but "[PATCH 01/15] build: Fix linkage of QEMU_PROG" from Stefan's tracing pull request has the more elegant fix for this. > Regards, > > Anthony Liguori > >> --- >> Your patch seems fine but we need to avoid duplicate object files >> during the >> link phase. Otherwise we run into linker warnings because >> qemu-timer-common.o >> is linked multiple times. Please include this patch and resend the two >> together with this patch as 1/2 and yours as 2/2. >> >> rules.mak | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/rules.mak b/rules.mak >> index 884d421..04a9198 100644 >> --- a/rules.mak >> +++ b/rules.mak >> @@ -31,7 +31,7 @@ endif >> %.o: %.m >> $(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) >> $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," OBJC $(TARGET_DIR)$@") >> >> -LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) >> -o $@ $(1) $(LIBS)," LINK $(TARGET_DIR)$@") >> +LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) >> -o $@ $(sort $(1)) $(LIBS)," LINK $(TARGET_DIR)$@") >> >> %$(EXESUF): %.o >> $(call LINK,$^) > >