From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org,
"Stefan Hajnoczi" <stefanha@linux.vnet.ibm.com>,
"Lluís Vilanova" <vilanova@ac.upc.edu>
Subject: Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link
Date: Thu, 01 Sep 2011 14:52:12 -0500 [thread overview]
Message-ID: <4E5FE26C.7030002@linux.vnet.ibm.com> (raw)
In-Reply-To: <4E5FD4F9.3030107@codemonkey.ws>
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<stefanha@linux.vnet.ibm.com>
>
> 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,$^)
>
>
next prev parent reply other threads:[~2011-09-01 19:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 19:53 [Qemu-devel] [PATCH] [simple] Include qemu-timer-common.o in trace-obj-y Lluís
2011-08-25 8:18 ` [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link Stefan Hajnoczi
2011-09-01 18:54 ` Anthony Liguori
2011-09-01 19:47 ` Lluís Vilanova
2011-09-01 19:52 ` Michael Roth [this message]
2011-09-02 8:42 ` Stefan Hajnoczi
2011-09-02 14:56 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E5FE26C.7030002@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
--cc=vilanova@ac.upc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.