qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for li


From: Michael Roth
Subject: Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link
Date: Thu, 01 Sep 2011 14:52:12 -0500
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1

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<address@hidden>

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,$^)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]