qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] Makefile: remoeve duplicate qemu-error.o
@ 2010-05-11 11:13 Juan Quintela
  2010-05-11 11:13 ` [Qemu-devel] [PATCH 1/2] Create shared-obj-y Juan Quintela
  2010-05-11 11:13 ` [Qemu-devel] [PATCH 2/2] state that fsdev depends on LINUX only once Juan Quintela
  0 siblings, 2 replies; 7+ messages in thread
From: Juan Quintela @ 2010-05-11 11:13 UTC (permalink / raw)
  To: qemu-devel

Hi

qemu-error.o appears in several places in Makefile*,
with several combinations of make; make clean; make
you could get a build error.  Fix it defining it in a single
place.  Once there, just create a shared-obj-y for objects
that are needed for both tools and qemu binary.  This should remove
this error in the future.

once there, fix fsdevel to check for CONFIG_LINUX only once instead of 4 times.


Juan Quintela (2):
  Create shared-obj-y
  state that fsdev depends on LINUX only once

 Makefile      |    8 +++++---
 Makefile.objs |   15 +++++++++------
 2 files changed, 14 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 1/2] Create shared-obj-y
  2010-05-11 11:13 [Qemu-devel] [PATCH 0/2] Makefile: remoeve duplicate qemu-error.o Juan Quintela
@ 2010-05-11 11:13 ` Juan Quintela
  2010-05-11 11:45   ` Markus Armbruster
  2010-05-11 11:52   ` Kevin Wolf
  2010-05-11 11:13 ` [Qemu-devel] [PATCH 2/2] state that fsdev depends on LINUX only once Juan Quintela
  1 sibling, 2 replies; 7+ messages in thread
From: Juan Quintela @ 2010-05-11 11:13 UTC (permalink / raw)
  To: qemu-devel

This variable contains the objects shared between tools and qemu binary.
Add qemu-error.o only in one place, it "could" be built in two places
depending of make ordering.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile      |    8 +++++---
 Makefile.objs |    9 ++++++---
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index eb9e02b..ba1611b 100644
--- a/Makefile
+++ b/Makefile
@@ -135,11 +135,13 @@ iov.o: iov.c iov.h
 qemu-img.o: qemu-img-cmds.h
 qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o: $(GENERATED_HEADERS)

-qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(block-obj-y) $(qobject-obj-y)
+TOOLS_OBJ=qemu-tool.o $(shared-obj-y)

-qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(block-obj-y) $(qobject-obj-y)
+qemu-img$(EXESUF): qemu-img.o $(TOOLS_OBJ)

-qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(block-obj-y) $(qobject-obj-y)
+qemu-nbd$(EXESUF): qemu-nbd.o $(TOOLS_OBJ)
+
+qemu-io$(EXESUF): qemu-io.o cmd.o $(TOOLS_OBJ)

 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
 	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $@")
diff --git a/Makefile.objs b/Makefile.objs
index ecdd53e..95d864b 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -39,16 +39,19 @@ fsdev-nested-$(CONFIG_LINUX) = qemu-fsdev.o
 fsdev-obj-$(CONFIG_LINUX) += $(addprefix fsdev/, $(fsdev-nested-y))

 ######################################################################
+# shared-obj-y has the object that are shared by qemu binary and tools
+shared-obj-y = qemu-error.o $(block-obj-y) $(qobject-obj-y)
+
+######################################################################
 # libqemu_common.a: Target independent part of system emulation. The
 # long term path is to suppress *all* target specific code in case of
 # system emulation, i.e. a single QEMU executable should support all
 # CPUs and machines.

-common-obj-y = $(block-obj-y)
+common-obj-y = $(shared-obj-y)
 common-obj-y += $(net-obj-y)
-common-obj-y += $(qobject-obj-y)
 common-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX))
-common-obj-y += readline.o console.o async.o qemu-error.o
+common-obj-y += readline.o console.o async.o
 common-obj-y += tcg-runtime.o host-utils.o
 common-obj-y += irq.o ioport.o input.o
 common-obj-$(CONFIG_PTIMER) += ptimer.o
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 2/2] state that fsdev depends on LINUX only once
  2010-05-11 11:13 [Qemu-devel] [PATCH 0/2] Makefile: remoeve duplicate qemu-error.o Juan Quintela
  2010-05-11 11:13 ` [Qemu-devel] [PATCH 1/2] Create shared-obj-y Juan Quintela
@ 2010-05-11 11:13 ` Juan Quintela
  1 sibling, 0 replies; 7+ messages in thread
From: Juan Quintela @ 2010-05-11 11:13 UTC (permalink / raw)
  To: qemu-devel


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.objs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 95d864b..f963c3f 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -35,8 +35,8 @@ net-nested-$(CONFIG_SLIRP) += slirp.o
 net-nested-$(CONFIG_VDE) += vde.o
 net-obj-y += $(addprefix net/, $(net-nested-y))

-fsdev-nested-$(CONFIG_LINUX) = qemu-fsdev.o
-fsdev-obj-$(CONFIG_LINUX) += $(addprefix fsdev/, $(fsdev-nested-y))
+fsdev-nested-y = qemu-fsdev.o
+fsdev-obj-y += $(addprefix fsdev/, $(fsdev-nested-y))

 ######################################################################
 # shared-obj-y has the object that are shared by qemu binary and tools
@@ -50,7 +50,7 @@ shared-obj-y = qemu-error.o $(block-obj-y) $(qobject-obj-y)

 common-obj-y = $(shared-obj-y)
 common-obj-y += $(net-obj-y)
-common-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX))
+common-obj-$(CONFIG_LINUX) += $(fsdev-obj-y)
 common-obj-y += readline.o console.o async.o
 common-obj-y += tcg-runtime.o host-utils.o
 common-obj-y += irq.o ioport.o input.o
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] Create shared-obj-y
  2010-05-11 11:13 ` [Qemu-devel] [PATCH 1/2] Create shared-obj-y Juan Quintela
@ 2010-05-11 11:45   ` Markus Armbruster
  2010-05-11 11:52   ` Kevin Wolf
  1 sibling, 0 replies; 7+ messages in thread
From: Markus Armbruster @ 2010-05-11 11:45 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel

Juan Quintela <quintela@redhat.com> writes:

> This variable contains the objects shared between tools and qemu binary.
> Add qemu-error.o only in one place, it "could" be built in two places
> depending of make ordering.

Yup, that's what I should've done when I added qemu-error.c.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] Create shared-obj-y
  2010-05-11 11:13 ` [Qemu-devel] [PATCH 1/2] Create shared-obj-y Juan Quintela
  2010-05-11 11:45   ` Markus Armbruster
@ 2010-05-11 11:52   ` Kevin Wolf
  2010-05-11 12:07     ` Markus Armbruster
  2010-05-11 12:17     ` [Qemu-devel] " Juan Quintela
  1 sibling, 2 replies; 7+ messages in thread
From: Kevin Wolf @ 2010-05-11 11:52 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel

Am 11.05.2010 13:13, schrieb Juan Quintela:
> This variable contains the objects shared between tools and qemu binary.
> Add qemu-error.o only in one place, it "could" be built in two places
> depending of make ordering.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>

> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -39,16 +39,19 @@ fsdev-nested-$(CONFIG_LINUX) = qemu-fsdev.o
>  fsdev-obj-$(CONFIG_LINUX) += $(addprefix fsdev/, $(fsdev-nested-y))
> 
>  ######################################################################
> +# shared-obj-y has the object that are shared by qemu binary and tools
> +shared-obj-y = qemu-error.o $(block-obj-y) $(qobject-obj-y)

Currently, block-obj-y contains some more files which are not really
related to the block layer, such as cutils.o or osdep.o. Should they be
moved here while we're at it?

Kevin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] Create shared-obj-y
  2010-05-11 11:52   ` Kevin Wolf
@ 2010-05-11 12:07     ` Markus Armbruster
  2010-05-11 12:17     ` [Qemu-devel] " Juan Quintela
  1 sibling, 0 replies; 7+ messages in thread
From: Markus Armbruster @ 2010-05-11 12:07 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel, Juan Quintela

Kevin Wolf <kwolf@redhat.com> writes:

> Am 11.05.2010 13:13, schrieb Juan Quintela:
>> This variable contains the objects shared between tools and qemu binary.
>> Add qemu-error.o only in one place, it "could" be built in two places
>> depending of make ordering.
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>
>> --- a/Makefile.objs
>> +++ b/Makefile.objs
>> @@ -39,16 +39,19 @@ fsdev-nested-$(CONFIG_LINUX) = qemu-fsdev.o
>>  fsdev-obj-$(CONFIG_LINUX) += $(addprefix fsdev/, $(fsdev-nested-y))
>> 
>>  ######################################################################
>> +# shared-obj-y has the object that are shared by qemu binary and tools
>> +shared-obj-y = qemu-error.o $(block-obj-y) $(qobject-obj-y)
>
> Currently, block-obj-y contains some more files which are not really
> related to the block layer, such as cutils.o or osdep.o. Should they be
> moved here while we're at it?

Think so.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] Re: [PATCH 1/2] Create shared-obj-y
  2010-05-11 11:52   ` Kevin Wolf
  2010-05-11 12:07     ` Markus Armbruster
@ 2010-05-11 12:17     ` Juan Quintela
  1 sibling, 0 replies; 7+ messages in thread
From: Juan Quintela @ 2010-05-11 12:17 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

Kevin Wolf <kwolf@redhat.com> wrote:
> Am 11.05.2010 13:13, schrieb Juan Quintela:
>> This variable contains the objects shared between tools and qemu binary.
>> Add qemu-error.o only in one place, it "could" be built in two places
>> depending of make ordering.
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>
>> --- a/Makefile.objs
>> +++ b/Makefile.objs
>> @@ -39,16 +39,19 @@ fsdev-nested-$(CONFIG_LINUX) = qemu-fsdev.o
>>  fsdev-obj-$(CONFIG_LINUX) += $(addprefix fsdev/, $(fsdev-nested-y))
>> 
>>  ######################################################################
>> +# shared-obj-y has the object that are shared by qemu binary and tools
>> +shared-obj-y = qemu-error.o $(block-obj-y) $(qobject-obj-y)
>
> Currently, block-obj-y contains some more files which are not really
> related to the block layer, such as cutils.o or osdep.o. Should they be
> moved here while we're at it?

Agreed, I was just doing the "minimal" impact change.  block-obj-y was
the variable that fit better in old style.

Later, Juan.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-11 12:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11 11:13 [Qemu-devel] [PATCH 0/2] Makefile: remoeve duplicate qemu-error.o Juan Quintela
2010-05-11 11:13 ` [Qemu-devel] [PATCH 1/2] Create shared-obj-y Juan Quintela
2010-05-11 11:45   ` Markus Armbruster
2010-05-11 11:52   ` Kevin Wolf
2010-05-11 12:07     ` Markus Armbruster
2010-05-11 12:17     ` [Qemu-devel] " Juan Quintela
2010-05-11 11:13 ` [Qemu-devel] [PATCH 2/2] state that fsdev depends on LINUX only once Juan Quintela

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).