From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzCPf-0002D3-H2 for qemu-devel@nongnu.org; Thu, 01 Sep 2011 14:54:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzCPe-0008Fh-DX for qemu-devel@nongnu.org; Thu, 01 Sep 2011 14:54:55 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:46077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzCPe-0008FM-Ax for qemu-devel@nongnu.org; Thu, 01 Sep 2011 14:54:54 -0400 Received: by yxt3 with SMTP id 3so678629yxt.4 for ; Thu, 01 Sep 2011 11:54:53 -0700 (PDT) Message-ID: <4E5FD4F9.3030107@codemonkey.ws> Date: Thu, 01 Sep 2011 13:54:49 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20110824195317.14304.63305.stgit@ginnungagap.bsc.es> <1314260332-10534-1-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1314260332-10534-1-git-send-email-stefanha@linux.vnet.ibm.com> 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: Stefan Hajnoczi Cc: =?ISO-8859-1?Q?Llu=EDs_Vilanova?= , qemu-devel@nongnu.org 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. 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,$^)