* [Qemu-devel] [PATCH] [simple] Include qemu-timer-common.o in trace-obj-y
@ 2011-08-24 19:53 Lluís
2011-08-25 8:18 ` [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link Stefan Hajnoczi
0 siblings, 1 reply; 7+ messages in thread
From: Lluís @ 2011-08-24 19:53 UTC (permalink / raw)
To: qemu-devel
Helper programs like qemu-ga use tracing primitives, but qemu-timer-common.o
(also used by simpletrace.o) is not necessarily included in the linkage line.
This currently produces a warning when linking the *-softmmu programs.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
Makefile.objs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile.objs b/Makefile.objs
index d1f3e5d..44d7238 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -380,7 +380,7 @@ else
trace-obj-y = trace.o
ifeq ($(TRACE_BACKEND),simple)
trace-obj-y += simpletrace.o
-user-obj-y += qemu-timer-common.o
+trace-obj-y += qemu-timer-common.o
endif
endif
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link
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 ` Stefan Hajnoczi
2011-09-01 18:54 ` Anthony Liguori
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Hajnoczi @ 2011-08-25 8:18 UTC (permalink / raw)
To: Lluís Vilanova; +Cc: qemu-devel, Stefan Hajnoczi
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>
---
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,$^)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link
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
0 siblings, 2 replies; 7+ messages in thread
From: Anthony Liguori @ 2011-09-01 18:54 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Lluís Vilanova, qemu-devel
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.
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,$^)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link
2011-09-01 18:54 ` Anthony Liguori
@ 2011-09-01 19:47 ` Lluís Vilanova
2011-09-01 19:52 ` Michael Roth
1 sibling, 0 replies; 7+ messages in thread
From: Lluís Vilanova @ 2011-09-01 19:47 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Hajnoczi, qemu-devel
Anthony Liguori writes:
> 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.
> Regards,
AFAIK, this patch is unnecessary once commit
e03b41d47708744669aaa51e781021c3dc380198 in Stefan's repo is merged into
upstream (which, according to the list, you just pulled).
The reason is that $(sort) is unnecessary when passing $^ to the LINK
function ($^ already eliminates repeats, while keeping the order
intact). The patch fixes the QEMU_PROG rule, which was the only one not
using $^.
Thanks,
Lluis
--
"And it's much the same thing with knowledge, for whenever you learn
something new, the whole world becomes that much richer."
-- The Princess of Pure Reason, as told by Norton Juster in The Phantom
Tollbooth
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link
2011-09-01 18:54 ` Anthony Liguori
2011-09-01 19:47 ` Lluís Vilanova
@ 2011-09-01 19:52 ` Michael Roth
2011-09-02 8:42 ` Stefan Hajnoczi
1 sibling, 1 reply; 7+ messages in thread
From: Michael Roth @ 2011-09-01 19:52 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Stefan Hajnoczi, Lluís 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<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,$^)
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link
2011-09-01 19:52 ` Michael Roth
@ 2011-09-02 8:42 ` Stefan Hajnoczi
2011-09-02 14:56 ` Anthony Liguori
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Hajnoczi @ 2011-09-02 8:42 UTC (permalink / raw)
To: Anthony Liguori
Cc: Lluís Vilanova, Michael Roth, qemu-devel, Stefan Hajnoczi
2011/9/1 Michael Roth <mdroth@linux.vnet.ibm.com>:
> 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.
Agreed, it doesn't hurt to take this one but the $^ fix is nicer and
already merged.
Anthony: Do you want to revert this patch? It's not necessary.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link
2011-09-02 8:42 ` Stefan Hajnoczi
@ 2011-09-02 14:56 ` Anthony Liguori
0 siblings, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2011-09-02 14:56 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: qemu-devel, Lluís Vilanova, Stefan Hajnoczi, Michael Roth
On 09/02/2011 03:42 AM, Stefan Hajnoczi wrote:
> 2011/9/1 Michael Roth<mdroth@linux.vnet.ibm.com>:
>> 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.
>
> Agreed, it doesn't hurt to take this one but the $^ fix is nicer and
> already merged.
>
> Anthony: Do you want to revert this patch? It's not necessary.
If someone wants to send a patch, I can apply it, but I don't see the
motivation to revert.
Regards,
Anthony Liguori
> Stefan
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-09-02 14:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-09-02 8:42 ` Stefan Hajnoczi
2011-09-02 14:56 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).