qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] build: make sharing of objects explicit
@ 2011-02-24 10:33 Juan Quintela
  2011-02-24 10:33 ` [Qemu-devel] [PATCH 1/2] build: Create tools-obj-y variable Juan Quintela
  2011-02-24 10:33 ` [Qemu-devel] [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu Juan Quintela
  0 siblings, 2 replies; 9+ messages in thread
From: Juan Quintela @ 2011-02-24 10:33 UTC (permalink / raw)
  To: qemu-devel

Hi

- all tools shared the same list of object files, create a variable instead
  or repeating them (tools-obj-y).
- tools and softmmu targets share lots of objects, just make that explicit
  with shared-obj-y.

Please review, Juan.

Juan Quintela (2):
  build: Create tools-obj-y variable
  build: create shared-obj-y for tools/qemu-softmmu

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

-- 
1.7.4

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

* [Qemu-devel] [PATCH 1/2] build: Create tools-obj-y variable
  2011-02-24 10:33 [Qemu-devel] [PATCH 0/2] build: make sharing of objects explicit Juan Quintela
@ 2011-02-24 10:33 ` Juan Quintela
  2011-02-24 10:33 ` [Qemu-devel] [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu Juan Quintela
  1 sibling, 0 replies; 9+ messages in thread
From: Juan Quintela @ 2011-02-24 10:33 UTC (permalink / raw)
  To: qemu-devel

All our tools have to have exactly all this objects, just share them.

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

diff --git a/Makefile b/Makefile
index eca4c76..9e090cb 100644
--- a/Makefile
+++ b/Makefile
@@ -150,14 +150,18 @@ version.o: $(SRC_PATH)/version.rc config-host.mak
 version-obj-$(CONFIG_WIN32) += version.o
 ######################################################################

+tools-obj-y=qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y)
+tools-obj-y+=$(block-obj-y) $(qobject-obj-y) $(version-obj-y)
+tools-obj-y+=qemu-timer-common.o
+
 qemu-img.o: qemu-img-cmds.h
 qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o: $(GENERATED_HEADERS)

-qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o
+qemu-img$(EXESUF): qemu-img.o $(tools-obj-y)

-qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o
+qemu-nbd$(EXESUF): qemu-nbd.o $(tools-obj-y)

-qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o
+qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y)

 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
 	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"  GEN   $@")
-- 
1.7.4

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

* [Qemu-devel] [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu
  2011-02-24 10:33 [Qemu-devel] [PATCH 0/2] build: make sharing of objects explicit Juan Quintela
  2011-02-24 10:33 ` [Qemu-devel] [PATCH 1/2] build: Create tools-obj-y variable Juan Quintela
@ 2011-02-24 10:33 ` Juan Quintela
  2011-02-24 11:12   ` Peter Maydell
  1 sibling, 1 reply; 9+ messages in thread
From: Juan Quintela @ 2011-02-24 10:33 UTC (permalink / raw)
  To: qemu-devel

There are objects that need to be in both places, just make it explicit
in a single place.

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

diff --git a/Makefile b/Makefile
index 9e090cb..1902f96 100644
--- a/Makefile
+++ b/Makefile
@@ -150,9 +150,7 @@ version.o: $(SRC_PATH)/version.rc config-host.mak
 version-obj-$(CONFIG_WIN32) += version.o
 ######################################################################

-tools-obj-y=qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y)
-tools-obj-y+=$(block-obj-y) $(qobject-obj-y) $(version-obj-y)
-tools-obj-y+=qemu-timer-common.o
+tools-obj-y = qemu-tool.o $(shared-obj-y) $(trace-obj-y) $(version-obj-y)

 qemu-img.o: qemu-img-cmds.h
 qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o: $(GENERATED_HEADERS)
diff --git a/Makefile.objs b/Makefile.objs
index 9e98a66..5849487 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -54,17 +54,21 @@ fsdev-nested-$(CONFIG_VIRTFS) = qemu-fsdev.o
 fsdev-obj-$(CONFIG_VIRTFS) += $(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) $(oslib-obj-y)
+shared-obj-y += qemu-timer-common.o
+
+######################################################################
 # 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) blockdev.o
+common-obj-y = $(shared-obj-y) blockdev.o
 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 cursor.o async.o qemu-error.o
-common-obj-y += $(oslib-obj-y)
+common-obj-y += readline.o console.o cursor.o async.o
 common-obj-$(CONFIG_WIN32) += os-win32.o
 common-obj-$(CONFIG_POSIX) += os-posix.o

@@ -145,7 +149,7 @@ common-obj-y += iov.o acl.o
 common-obj-$(CONFIG_THREAD) += qemu-thread.o
 common-obj-$(CONFIG_POSIX) += compatfd.o
 common-obj-y += notify.o event_notifier.o
-common-obj-y += qemu-timer.o qemu-timer-common.o
+common-obj-y += qemu-timer.o

 slirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o
 slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
-- 
1.7.4

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

* Re: [Qemu-devel] [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu
  2011-02-24 10:33 ` [Qemu-devel] [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu Juan Quintela
@ 2011-02-24 11:12   ` Peter Maydell
  2011-02-24 11:44     ` Markus Armbruster
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2011-02-24 11:12 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel

On 24 February 2011 10:33, Juan Quintela <quintela@redhat.com> wrote:
> +# 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) $(oslib-obj-y)
> +shared-obj-y += qemu-timer-common.o

I don't feel very strongly about this, but:
It seems a bit odd to have a shared-obj-y variable that isn't actually
a list of shared objects (ie .so files, DLLs). Maybe there's a better name?

-- PMM

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

* Re: [Qemu-devel] [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu
  2011-02-24 11:12   ` Peter Maydell
@ 2011-02-24 11:44     ` Markus Armbruster
  2011-02-24 12:19       ` [Qemu-devel] " Juan Quintela
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Armbruster @ 2011-02-24 11:44 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Juan Quintela

Peter Maydell <peter.maydell@linaro.org> writes:

> On 24 February 2011 10:33, Juan Quintela <quintela@redhat.com> wrote:
>> +# 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) $(oslib-obj-y)
>> +shared-obj-y += qemu-timer-common.o
>
> I don't feel very strongly about this, but:
> It seems a bit odd to have a shared-obj-y variable that isn't actually
> a list of shared objects (ie .so files, DLLs). Maybe there's a better name?

common-obj-y?

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

* [Qemu-devel] Re: [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu
  2011-02-24 11:44     ` Markus Armbruster
@ 2011-02-24 12:19       ` Juan Quintela
  2011-02-24 13:53         ` Markus Armbruster
  0 siblings, 1 reply; 9+ messages in thread
From: Juan Quintela @ 2011-02-24 12:19 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: Peter Maydell, qemu-devel

Markus Armbruster <armbru@redhat.com> wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
>
>> On 24 February 2011 10:33, Juan Quintela <quintela@redhat.com> wrote:
>>> +# 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) $(oslib-obj-y)
>>> +shared-obj-y += qemu-timer-common.o
>>
>> I don't feel very strongly about this, but:
>> It seems a bit odd to have a shared-obj-y variable that isn't actually
>> a list of shared objects (ie .so files, DLLs). Maybe there's a better name?
>
> common-obj-y?

already taken :-(

common-obj-y is the list of files that are shared by all qemu-softmmu

######################################################################
# 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) blockdev.o
...

so, this is the list of files that are shared between all the softmmu
(common) and the tools.

I am open to suggestions, but all names I thought are worse than shared
(common-common-obj-y) :p

Later, Juan.

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

* [Qemu-devel] Re: [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu
  2011-02-24 12:19       ` [Qemu-devel] " Juan Quintela
@ 2011-02-24 13:53         ` Markus Armbruster
  2011-02-24 13:58           ` Paolo Bonzini
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Armbruster @ 2011-02-24 13:53 UTC (permalink / raw)
  To: quintela; +Cc: Peter Maydell, qemu-devel

Juan Quintela <quintela@redhat.com> writes:

> Markus Armbruster <armbru@redhat.com> wrote:
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>
>>> On 24 February 2011 10:33, Juan Quintela <quintela@redhat.com> wrote:
>>>> +# 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) $(oslib-obj-y)
>>>> +shared-obj-y += qemu-timer-common.o
>>>
>>> I don't feel very strongly about this, but:
>>> It seems a bit odd to have a shared-obj-y variable that isn't actually
>>> a list of shared objects (ie .so files, DLLs). Maybe there's a better name?
>>
>> common-obj-y?
>
> already taken :-(
>
> common-obj-y is the list of files that are shared by all qemu-softmmu
>
> ######################################################################
> # 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) blockdev.o
> ...
>
> so, this is the list of files that are shared between all the softmmu
> (common) and the tools.
>
> I am open to suggestions, but all names I thought are worse than shared
> (common-common-obj-y) :p

really-common-obj-y?  ;)

Seriously, what about renaming common-obj-y away?  target-indep-obj-y?

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

* [Qemu-devel] Re: [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu
  2011-02-24 13:53         ` Markus Armbruster
@ 2011-02-24 13:58           ` Paolo Bonzini
  2011-02-24 14:09             ` Juan Quintela
  0 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2011-02-24 13:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, quintela

On 02/24/2011 02:53 PM, Markus Armbruster wrote:
> really-common-obj-y?;)
>
> Seriously, what about renaming common-obj-y away?  target-indep-obj-y?

softmmu-obj-y?

Paolo

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

* [Qemu-devel] Re: [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu
  2011-02-24 13:58           ` Paolo Bonzini
@ 2011-02-24 14:09             ` Juan Quintela
  0 siblings, 0 replies; 9+ messages in thread
From: Juan Quintela @ 2011-02-24 14:09 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Peter Maydell, Markus Armbruster, qemu-devel

Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 02/24/2011 02:53 PM, Markus Armbruster wrote:
>> really-common-obj-y?;)
>>
>> Seriously, what about renaming common-obj-y away?  target-indep-obj-y?
>
> softmmu-obj-y?

Waiting for Anthony to decide anything, renaming the variable is the
easy thing to do.

Later, Juan.

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

end of thread, other threads:[~2011-02-24 14:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24 10:33 [Qemu-devel] [PATCH 0/2] build: make sharing of objects explicit Juan Quintela
2011-02-24 10:33 ` [Qemu-devel] [PATCH 1/2] build: Create tools-obj-y variable Juan Quintela
2011-02-24 10:33 ` [Qemu-devel] [PATCH 2/2] build: create shared-obj-y for tools/qemu-softmmu Juan Quintela
2011-02-24 11:12   ` Peter Maydell
2011-02-24 11:44     ` Markus Armbruster
2011-02-24 12:19       ` [Qemu-devel] " Juan Quintela
2011-02-24 13:53         ` Markus Armbruster
2011-02-24 13:58           ` Paolo Bonzini
2011-02-24 14:09             ` 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).