[PATCH 068/143] meson: convert most of softmmu/

Paolo Bonzini posted 143 patches 5 years, 6 months ago
Maintainers: Anthony Perard <anthony.perard@citrix.com>, David Gibson <david@gibson.dropbear.id.au>, Keith Busch <kbusch@kernel.org>, Christian Borntraeger <borntraeger@de.ibm.com>, Helge Deller <deller@gmx.de>, Peter Maydell <peter.maydell@linaro.org>, Christian Schoenebeck <qemu_oss@crudebyte.com>, Laurent Vivier <laurent@vivier.eu>, Joel Stanley <joel@jms.id.au>, Raphael Norwitz <raphael.norwitz@nutanix.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Stefano Stabellini <sstabellini@kernel.org>, Michael Rolnik <mrolnik@gmail.com>, Jason Wang <jasowang@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Alex Williamson <alex.williamson@redhat.com>, Juan Quintela <quintela@redhat.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Markus Armbruster <armbru@redhat.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Alexander Bulekov <alxndr@bu.edu>, Artyom Tarasenko <atar4qemu@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, Sarah Harris <S.E.Harris@kent.ac.uk>, "Alex Bennée" <alex.bennee@linaro.org>, Stefan Weil <sw@weilnetz.de>, Riku Voipio <riku.voipio@iki.fi>, Stefan Berger <stefanb@linux.ibm.com>, Eduardo Habkost <ehabkost@redhat.com>, Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, Eric Blake <eblake@redhat.com>, Palmer Dabbelt <palmer@dabbelt.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Max Reitz <mreitz@redhat.com>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Dmitry Fleytman <dmitry.fleytman@gmail.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Richard Henderson <rth@twiddle.net>, Max Filippov <jcmvbkbc@gmail.com>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Huacai Chen <chenhc@lemote.com>, Aurelien Jarno <aurelien@aurel32.net>, Hannes Reinecke <hare@suse.com>, Stafford Horne <shorne@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Alistair Francis <Alistair.Francis@wdc.com>, Laszlo Ersek <lersek@redhat.com>, Bandan Das <bsd@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Andrzej Zaborowski <balrogg@gmail.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Su Hang <suhang16@mails.ucas.ac.cn>, Gerd Hoffmann <kraxel@redhat.com>, Amit Shah <amit@kernel.org>, Ben Warren <ben@skyportsystems.com>, "Cédric Le Goater" <clg@kaod.org>, Yuval Shaia <yuval.shaia.ml@gmail.com>, Fam Zheng <fam@euphon.net>, David Hildenbrand <david@redhat.com>, Greg Kurz <groug@kaod.org>, Thomas Huth <thuth@redhat.com>, Michael Roth <mdroth@linux.vnet.ibm.com>, Laurent Vivier <lvivier@redhat.com>, Paul Durrant <paul@xen.org>
There is a newer version of this series
[PATCH 068/143] meson: convert most of softmmu/
Posted by Paolo Bonzini 5 years, 6 months ago
Leave out main.c, it's special due to fuzzing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 softmmu/meson.build | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/softmmu/meson.build b/softmmu/meson.build
index d4ac51b..95d38df 100644
--- a/softmmu/meson.build
+++ b/softmmu/meson.build
@@ -1,4 +1,4 @@
-specific_ss.add(files(
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
   'arch_init.c',
   'balloon.c',
   'cpus.c',
@@ -6,4 +6,5 @@ specific_ss.add(files(
   'ioport.c',
   'memory.c',
   'memory_mapping.c',
-  'qtest.c'))
+  'qtest.c',
+  'vl.c'))
-- 
1.8.3.1



Re: [PATCH 068/143] meson: convert most of softmmu/
Posted by Philippe Mathieu-Daudé 5 years, 6 months ago
Hi Paolo,

On 8/6/20 9:15 PM, Paolo Bonzini wrote:
> Leave out main.c, it's special due to fuzzing.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  softmmu/meson.build | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/softmmu/meson.build b/softmmu/meson.build
> index d4ac51b..95d38df 100644
> --- a/softmmu/meson.build
> +++ b/softmmu/meson.build
> @@ -1,4 +1,4 @@
> -specific_ss.add(files(
> +specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
>    'arch_init.c',
>    'balloon.c',
>    'cpus.c',
> @@ -6,4 +6,5 @@ specific_ss.add(files(
>    'ioport.c',
>    'memory.c',
>    'memory_mapping.c',
> -  'qtest.c'))
> +  'qtest.c',
> +  'vl.c'))
> 

There is still "obj-y += vl.o" in softmmu/Makefile.objs.

Did you meant to squash this into the previous patch?


Re: [PATCH 068/143] meson: convert most of softmmu/
Posted by Paolo Bonzini 5 years, 6 months ago
On 07/08/20 15:36, Philippe Mathieu-Daudé wrote:
> There is still "obj-y += vl.o" in softmmu/Makefile.objs.
> 
> Did you meant to squash this into the previous patch?

This is what I meant:

diff --git a/meson.build b/meson.build
index a7ad3248cc..ef6f811c51 100644
--- a/meson.build
+++ b/meson.build
@@ -618,6 +618,8 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 
 common_ss.add(files('cpus-common.c'))
 
+subdir('softmmu')
+
 # needed for fuzzing binaries
 subdir('tests/qtest/libqos')
 
diff --git a/softmmu/Makefile.objs b/softmmu/Makefile.objs
index a414a74c50..ebcfd15695 100644
--- a/softmmu/Makefile.objs
+++ b/softmmu/Makefile.objs
@@ -1,14 +1,2 @@
 softmmu-main-y = softmmu/main.o
-
-obj-y += arch_init.o
-obj-y += cpus.o
-obj-y += cpu-throttle.o
-obj-y += balloon.o
-obj-y += ioport.o
-obj-y += memory.o
-obj-y += memory_mapping.o
-
-obj-y += qtest.o
-
-obj-y += vl.o
-vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
+main.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
diff --git a/softmmu/meson.build b/softmmu/meson.build
new file mode 100644
index 0000000000..95d38df259
--- /dev/null
+++ b/softmmu/meson.build
@@ -0,0 +1,10 @@
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
+  'arch_init.c',
+  'balloon.c',
+  'cpus.c',
+  'cpu-throttle.c',
+  'ioport.c',
+  'memory.c',
+  'memory_mapping.c',
+  'qtest.c',
+  'vl.c'))


Re: [PATCH 068/143] meson: convert most of softmmu/
Posted by Philippe Mathieu-Daudé 5 years, 6 months ago
On 8/7/20 4:18 PM, Paolo Bonzini wrote:
> On 07/08/20 15:36, Philippe Mathieu-Daudé wrote:
>> There is still "obj-y += vl.o" in softmmu/Makefile.objs.
>>
>> Did you meant to squash this into the previous patch?
> 
> This is what I meant:
> 
> diff --git a/meson.build b/meson.build
> index a7ad3248cc..ef6f811c51 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -618,6 +618,8 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
>  
>  common_ss.add(files('cpus-common.c'))
>  
> +subdir('softmmu')
> +
>  # needed for fuzzing binaries
>  subdir('tests/qtest/libqos')
>  
> diff --git a/softmmu/Makefile.objs b/softmmu/Makefile.objs
> index a414a74c50..ebcfd15695 100644
> --- a/softmmu/Makefile.objs
> +++ b/softmmu/Makefile.objs
> @@ -1,14 +1,2 @@
>  softmmu-main-y = softmmu/main.o
> -
> -obj-y += arch_init.o
> -obj-y += cpus.o
> -obj-y += cpu-throttle.o
> -obj-y += balloon.o
> -obj-y += ioport.o
> -obj-y += memory.o
> -obj-y += memory_mapping.o
> -
> -obj-y += qtest.o
> -
> -obj-y += vl.o
> -vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
> +main.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)

OK now I understand.

Please add "Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>" to
the new patch with this snippet content.

> diff --git a/softmmu/meson.build b/softmmu/meson.build
> new file mode 100644
> index 0000000000..95d38df259
> --- /dev/null
> +++ b/softmmu/meson.build
> @@ -0,0 +1,10 @@
> +specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
> +  'arch_init.c',
> +  'balloon.c',
> +  'cpus.c',
> +  'cpu-throttle.c',
> +  'ioport.c',
> +  'memory.c',
> +  'memory_mapping.c',
> +  'qtest.c',
> +  'vl.c'))
>