Skip to contentSkip to conversation

buildsys: Build faster (mostly tools and linux-user)

PATCH In review Philippe Mathieu-Daudé 4 participants 17 messages Jan 18, 2020 – Jan 21, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

v2 cover buildsys: Build faster (mostly tools and linux-user)

In some configuration (linux-user, tools) we can ignore building various objects (and the libfdt).

Tested with all the combinations of --[enable|disable]-tools, --[enable|disable]-user and --[enable|disable]-system using the following commands (suggested by Laurent Vivier in v1):

  $ mkdir build
  $ cd build
  $ for user in enable disable; do \
        for tools in enable disable; do \
            for system in enable disable; do \
                rm -fr build-$user-$system-$tools && \
                mkdir build-$user-$system-$tools && \
                    (cd build-$user-$system-$tools && \
                     ../../configure \
                                     --${user}-user \
                                     --${system}-system \
                                     --${tools}-tools \
                                     --disable-docs \
                    ); \
            done; \
        done; \
    done

Then building each of the 8 subdirectories on x86_64 and aarch64 hosts, running 'make check', and only on x86_64:
'make run-tcg-tests-x86_64-linux-user'.

All CI green:
https://gitlab.com/philmd/qemu/pipelines/110420332
https://travis-ci.org/philmd/qemu/builds/638781159
https://app.shippable.com/github/philmd/qemu/runs/587/summary/console

Since v1:
- no code change, improved commit description, added review tags
- added 2 new patches touching hw/core/ (remove reset.o from linux-user)

$ git backport-diff -u v1
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/6:[----] [--] 'configure: Do not build libfdt if not required' 002/6:[----] [--] 'Makefile: Clarify all the codebase requires qom/ objects' 003/6:[----] [--] 'Makefile: Restrict system emulation and tools objects' 004/6:[----] [--] 'Makefile: Remove unhelpful comment'
005/6:[down] 'hw/core: Restrict reset handlers API to system-mode' 006/6:[down] 'hw/core/Makefile: Group generic objects versus system-mode objects'

Supersedes: <[email protected]>

Philippe Mathieu-Daudé (6):
configure: Do not build libfdt if not required
Makefile: Clarify all the codebase requires qom/ objects
Makefile: Restrict system emulation and tools objects
Makefile: Remove unhelpful comment
hw/core: Restrict reset handlers API to system-mode hw/core/Makefile: Group generic objects versus system-mode objects

 configure             |  2 ++
 Makefile.objs         | 31 ++++++++++---------------------
 hw/core/Makefile.objs | 31 ++++++++++++++++---------------
 3 files changed, 28 insertions(+), 36 deletions(-)
Signature · 1 line
2.21.1
#1 lore raw

PATCH v2 1/6 configure: Do not build libfdt if not required

We only require libfdt for system emulation, in a small set of architecture:

4077  # fdt support is mandatory for at least some target architectures,
4078  # so insist on it if we're building those system emulators.
4079  fdt_required=no
4080  for target in $target_list; do

4081 case $target in
4082 aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu)
4083 fdt_required=yes

Do not build libfdt if we did not manually specified --enable-fdt, or have one of the platforms that require it in our target list.

---
v2: Improved description (thuth)

---
 configure | 2 ++
 1 file changed, 2 insertions(+)
configure +2 -0
index 557e4382ea..c67a7e73db 100755
@@ -4095,6 +4095,8 @@ if test "$fdt_required" = "yes"; then
       "targets which need it (by specifying a cut down --target-list)."
   fi
   fdt=yes
+elif test "$fdt" != "yes" ; then
+  fdt=no
 fi
 
 if test "$fdt" != "no" ; then
Signature · 1 line
2.21.1
Reviewed-by on v2 1/6
#2 lore raw

Re: [PATCH v2 1/6] configure: Do not build libfdt if not required

Quoted 11 lines · Philippe Mathieu-Daudé

We only require libfdt for system emulation, in a small set of architecture:

4077  # fdt support is mandatory for at least some target architectures,
4078  # so insist on it if we're building those system emulators.
4079  fdt_required=no
4080  for target in $target_list; do

4081 case $target in
4082 aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu)
4083 fdt_required=yes

Quoted 6 lines

Do not build libfdt if we did not manually specified --enable-fdt, or have one of the platforms that require it in our target list.

Quoted 19 lines

---
v2: Improved description (thuth)

---
 configure | 2 ++
 1 file changed, 2 insertions(+)
configure +2 -0
index 557e4382ea..c67a7e73db 100755
@@ -4095,6 +4095,8 @@ if test "$fdt_required" = "yes"; then
       "targets which need it (by specifying a cut down --target-list)."
   fi
   fdt=yes
+elif test "$fdt" != "yes" ; then
+  fdt=no
 fi
 
 if test "$fdt" != "no" ; then
Signature · 1 line
Alex Bennée
#3 lore raw

PATCH v2 2/6 Makefile: Clarify all the codebase requires qom/ objects

In reply to Philippe Mathieu-Daudé

QEMU user-mode also requires the qom/ objects, it is not only used by "system emulation and qemu-img". As we will use a big if() block, move it upper in the "Common libraries for tools and emulators" section.

---
 Makefile.objs | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Makefile.objs +1 -5
index 7c1e50f9d6..5aae561984 100644
@@ -2,6 +2,7 @@
 # Common libraries for tools and emulators
 stub-obj-y = stubs/
 util-obj-y = crypto/ util/ qobject/ qapi/
+qom-obj-y = qom/
 
 chardev-obj-y = chardev/
 
@@ -26,11 +27,6 @@ block-obj-m = block/
 
 crypto-obj-y = crypto/
 
-#######################################################################
-# qom-obj-y is code used by both qemu system emulation and qemu-img
-
-qom-obj-y = qom/
-
 #######################################################################
 # io-obj-y is code used by both qemu system emulation and qemu-img
 
Signature · 1 line
2.21.1
Reviewed-by on v2 2/6
#4 lore raw

Re: [PATCH v2 2/6] Makefile: Clarify all the codebase requires qom/ objects

Quoted 7 lines · Philippe Mathieu-Daudé

QEMU user-mode also requires the qom/ objects, it is not only used by "system emulation and qemu-img". As we will use a big if() block, move it upper in the "Common libraries for tools and emulators" section.

Quoted 27 lines
---
 Makefile.objs | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Makefile.objs +1 -5
index 7c1e50f9d6..5aae561984 100644
@@ -2,6 +2,7 @@
 # Common libraries for tools and emulators
 stub-obj-y = stubs/
 util-obj-y = crypto/ util/ qobject/ qapi/
+qom-obj-y = qom/
 
 chardev-obj-y = chardev/
 
@@ -26,11 +27,6 @@ block-obj-m = block/
 
 crypto-obj-y = crypto/
 
-#######################################################################
-# qom-obj-y is code used by both qemu system emulation and qemu-img
-
-qom-obj-y = qom/
-
 #######################################################################
 # io-obj-y is code used by both qemu system emulation and qemu-img
Signature · 1 line
Alex Bennée
#5 lore raw

PATCH v2 3/6 Makefile: Restrict system emulation and tools objects

In reply to Philippe Mathieu-Daudé

Restrict all the system emulation and tools objects with a Makefile IF (CONFIG_SOFTMMU OR CONFIG_TOOLS) check.

Using the same description over and over is not very helpful. Use it once, just before the if() block.

---
 Makefile.objs | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
Makefile.objs +7 -12
index 5aae561984..395dd1e670 100644
@@ -4,16 +4,15 @@ stub-obj-y = stubs/
 util-obj-y = crypto/ util/ qobject/ qapi/
 qom-obj-y = qom/
 
+#######################################################################
+# code used by both qemu system emulation and qemu-img
+
+ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
+
 chardev-obj-y = chardev/
 
-#######################################################################
-# authz-obj-y is code used by both qemu system emulation and qemu-img
-
 authz-obj-y = authz/
 
-#######################################################################
-# block-obj-y is code used by both qemu system emulation and qemu-img
-
 block-obj-y = nbd/
 block-obj-y += block.o blockjob.o job.o
 block-obj-y += block/ scsi/
@@ -22,16 +21,12 @@ block-obj-$(CONFIG_REPLICATION) += replication.o
 
 block-obj-m = block/
 
-#######################################################################
-# crypto-obj-y is code used by both qemu system emulation and qemu-img
-
 crypto-obj-y = crypto/
 
-#######################################################################
-# io-obj-y is code used by both qemu system emulation and qemu-img
-
 io-obj-y = io/
 
+endif # CONFIG_SOFTMMU or CONFIG_TOOLS
+
 ######################################################################
 # 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
Signature · 1 line
2.21.1
Reviewed-by on v2 3/6
#6 lore raw

Re: [PATCH v2 3/6] Makefile: Restrict system emulation and tools objects

Quoted 8 lines · Philippe Mathieu-Daudé

Restrict all the system emulation and tools objects with a Makefile IF (CONFIG_SOFTMMU OR CONFIG_TOOLS) check.

Using the same description over and over is not very helpful. Use it once, just before the if() block.

Quoted 49 lines
---
 Makefile.objs | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
Makefile.objs +7 -12
index 5aae561984..395dd1e670 100644
@@ -4,16 +4,15 @@ stub-obj-y = stubs/
 util-obj-y = crypto/ util/ qobject/ qapi/
 qom-obj-y = qom/
 
+#######################################################################
+# code used by both qemu system emulation and qemu-img
+
+ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
+
 chardev-obj-y = chardev/
 
-#######################################################################
-# authz-obj-y is code used by both qemu system emulation and qemu-img
-
 authz-obj-y = authz/
 
-#######################################################################
-# block-obj-y is code used by both qemu system emulation and qemu-img
-
 block-obj-y = nbd/
 block-obj-y += block.o blockjob.o job.o
 block-obj-y += block/ scsi/
@@ -22,16 +21,12 @@ block-obj-$(CONFIG_REPLICATION) += replication.o
 
 block-obj-m = block/
 
-#######################################################################
-# crypto-obj-y is code used by both qemu system emulation and qemu-img
-
 crypto-obj-y = crypto/
 
-#######################################################################
-# io-obj-y is code used by both qemu system emulation and qemu-img
-
 io-obj-y = io/
 
+endif # CONFIG_SOFTMMU or CONFIG_TOOLS
+
 ######################################################################
 # 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
Signature · 1 line
Alex Bennée
#7 lore raw

PATCH v2 4/6 Makefile: Remove unhelpful comment

In reply to Philippe Mathieu-Daudé

It is pointless to keep qapi/ object separate from the other common-objects. Drop the comment.

---
 Makefile.objs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Makefile.objs +2 -4
index 395dd1e670..c6321d0465 100644
@@ -71,11 +71,9 @@ qemu-seccomp.o-libs := $(SECCOMP_LIBS)
 
 common-obj-$(CONFIG_FDT) += device_tree.o
 
-######################################################################
-# qapi
-
 common-obj-y += qapi/
-endif
+
+endif # CONFIG_SOFTMMU
 
 #######################################################################
 # Target-independent parts used in system and user emulation
Signature · 1 line
2.21.1
Reviewed-by on v2 4/6
#8 lore raw

Re: [PATCH v2 4/6] Makefile: Remove unhelpful comment

Quoted 5 lines · Philippe Mathieu-Daudé

It is pointless to keep qapi/ object separate from the other common-objects. Drop the comment.

Quoted 22 lines
---
 Makefile.objs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Makefile.objs +2 -4
index 395dd1e670..c6321d0465 100644
@@ -71,11 +71,9 @@ qemu-seccomp.o-libs := $(SECCOMP_LIBS)
 
 common-obj-$(CONFIG_FDT) += device_tree.o
 
-######################################################################
-# qapi
-
 common-obj-y += qapi/
-endif
+
+endif # CONFIG_SOFTMMU
 
 #######################################################################
 # Target-independent parts used in system and user emulation
Signature · 1 line
Alex Bennée
#9 lore raw

PATCH v2 5/6 hw/core: Restrict reset handlers API to system-mode

In reply to Philippe Mathieu-Daudé

The user-mode code does not use this API, restrict it to the system-mode.

---
 hw/core/Makefile.objs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/core/Makefile.objs +2 -1
index 0edd9e635d..2fea68ccf7 100644
@@ -1,6 +1,7 @@
 # core qdev-related obj files, also used by *-user:
 common-obj-y += qdev.o qdev-properties.o
-common-obj-y += bus.o reset.o
+common-obj-y += bus.o
+common-obj-$(CONFIG_SOFTMMU) += reset.o
 common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
 common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
 # irq.o needed for qdev GPIO handling:
Signature · 1 line
2.21.1
Reviewed-by on v2 5/6
#10 lore raw

Re: [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode

Quoted 14 lines · Philippe Mathieu-Daudé

The user-mode code does not use this API, restrict it to the system-mode.

---
 hw/core/Makefile.objs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/core/Makefile.objs +0 -0
index 0edd9e635d..2fea68ccf7 100644

hw/core/Makefile.objs line 7

Quoted 8 lines
hw/core/Makefile.objs +2 -1
@@ -1,6 +1,7 @@
 # core qdev-related obj files, also used by *-user:
 common-obj-y += qdev.o qdev-properties.o
-common-obj-y += bus.o reset.o
+common-obj-y += bus.o
+common-obj-$(CONFIG_SOFTMMU) += reset.o
 common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
 common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
 # irq.o needed for qdev GPIO handling:
Reviewed-by on v2 5/6
#11 lore raw

Re: [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode

In reply to Philippe Mathieu-Daudé
Quoted 13 lines · Philippe Mathieu-Daudé

The user-mode code does not use this API, restrict it to the system-mode.

---
 hw/core/Makefile.objs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/core/Makefile.objs +0 -0
index 0edd9e635d..2fea68ccf7 100644

hw/core/Makefile.objs line 4

Quoted 5 lines
hw/core/Makefile.objs +2 -1
@@ -1,6 +1,7 @@
 # core qdev-related obj files, also used by *-user:
 common-obj-y += qdev.o qdev-properties.o
-common-obj-y += bus.o reset.o
+common-obj-y += bus.o
+common-obj-$(CONFIG_SOFTMMU) += reset.o

This seems a very minor tweaks as far as it goes. I though the only thing needed in hw was hw/core/cpu and everything else was system emulation?

However it at least moves the needle in the right direction:

Quoted 3 lines
hw/core/Makefile.objs +0 -0
 common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
 common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
 # irq.o needed for qdev GPIO handling:
Signature · 1 line
Alex Bennée
#12 lore raw

Re: [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode

Quoted 11 lines · Alex Bennée
Quoted 8 lines · Philippe Mathieu-Daudé

The user-mode code does not use this API, restrict it to the system-mode.

---
  hw/core/Makefile.objs | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 14 lines

hw/core/Makefile.objs line 4

Quoted 10 lines
hw/core/Makefile.objs +2 -1
index 0edd9e635d..2fea68ccf7 100644
@@ -1,6 +1,7 @@
  # core qdev-related obj files, also used by *-user:
  common-obj-y += qdev.o qdev-properties.o
-common-obj-y += bus.o reset.o
+common-obj-y += bus.o
+common-obj-$(CONFIG_SOFTMMU) += reset.o

This seems a very minor tweaks as far as it goes. I though the only thing needed in hw was hw/core/cpu and everything else was system emulation?

Unfortunately qdev.o pulls in a lot of unnecessary code (qbus, machine properties...).

Quoted 4 lines

However it at least moves the needle in the right direction:

Thanks!

Quoted 5 lines
Quoted 3 lines
hw/core/Makefile.objs +0 -0
  common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
  common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
  # irq.o needed for qdev GPIO handling:
#13 lore raw

PATCH v2 6/6 hw/core/Makefile: Group generic objects versus system-mode objects

In reply to Philippe Mathieu-Daudé

To ease review/modifications of this Makefile, group generic objects first, then system-mode specific ones, and finally peripherals (which are only used in system-mode).

No logical changes introduced here.

---
 hw/core/Makefile.objs | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
hw/core/Makefile.objs +14 -14
index 2fea68ccf7..a522b7297d 100644
@@ -1,32 +1,32 @@
 # core qdev-related obj files, also used by *-user:
 common-obj-y += qdev.o qdev-properties.o
 common-obj-y += bus.o
+common-obj-y += cpu.o
+common-obj-y += hotplug.o
+common-obj-y += vmstate-if.o
+# irq.o needed for qdev GPIO handling:
+common-obj-y += irq.o
+
 common-obj-$(CONFIG_SOFTMMU) += reset.o
 common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
 common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
-# irq.o needed for qdev GPIO handling:
-common-obj-y += irq.o
-common-obj-y += hotplug.o
 common-obj-$(CONFIG_SOFTMMU) += nmi.o
 common-obj-$(CONFIG_SOFTMMU) += vm-change-state-handler.o
-common-obj-y += cpu.o
-common-obj-y += vmstate-if.o
+common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
+common-obj-$(CONFIG_SOFTMMU) += sysbus.o
+common-obj-$(CONFIG_SOFTMMU) += machine.o
+common-obj-$(CONFIG_SOFTMMU) += null-machine.o
+common-obj-$(CONFIG_SOFTMMU) += loader.o
+common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
+obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
+obj-$(CONFIG_SOFTMMU) += numa.o
 
 common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
 common-obj-$(CONFIG_XILINX_AXI) += stream.o
 common-obj-$(CONFIG_PTIMER) += ptimer.o
-common-obj-$(CONFIG_SOFTMMU) += sysbus.o
-common-obj-$(CONFIG_SOFTMMU) += machine.o
-common-obj-$(CONFIG_SOFTMMU) += loader.o
 common-obj-$(CONFIG_FITLOADER) += loader-fit.o
-common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
 common-obj-$(CONFIG_REGISTER) += register.o
 common-obj-$(CONFIG_OR_IRQ) += or-irq.o
 common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o
 common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
 common-obj-$(CONFIG_GENERIC_LOADER) += generic-loader.o
-common-obj-$(CONFIG_SOFTMMU) += null-machine.o
-
-obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
-obj-$(CONFIG_SOFTMMU) += numa.o
-common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
Signature · 1 line
2.21.1
#14 lore raw

Re: [PATCH v2 6/6] hw/core/Makefile: Group generic objects versus system-mode objects

Quoted 16 lines · Philippe Mathieu-Daudé

To ease review/modifications of this Makefile, group generic objects first, then system-mode specific ones, and finally peripherals (which are only used in system-mode).

No logical changes introduced here.

---
 hw/core/Makefile.objs | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
hw/core/Makefile.objs +0 -0
index 2fea68ccf7..a522b7297d 100644

hw/core/Makefile.objs line 7

Quoted 7 lines
hw/core/Makefile.objs +4 -0
@@ -1,32 +1,32 @@
 # core qdev-related obj files, also used by *-user:
 common-obj-y += qdev.o qdev-properties.o
 common-obj-y += bus.o
+common-obj-y += cpu.o
+common-obj-y += hotplug.o
+common-obj-y += vmstate-if.o
+# irq.o needed for qdev GPIO handling:

how are IRQs relevant to linux-user? or vmstate and hotplug?

Quoted 39 lines
hw/core/Makefile.objs +10 -14
+common-obj-y += irq.o
+
 common-obj-$(CONFIG_SOFTMMU) += reset.o
 common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
 common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
-# irq.o needed for qdev GPIO handling:
-common-obj-y += irq.o
-common-obj-y += hotplug.o
 common-obj-$(CONFIG_SOFTMMU) += nmi.o
 common-obj-$(CONFIG_SOFTMMU) += vm-change-state-handler.o
-common-obj-y += cpu.o
-common-obj-y += vmstate-if.o
+common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
+common-obj-$(CONFIG_SOFTMMU) += sysbus.o
+common-obj-$(CONFIG_SOFTMMU) += machine.o
+common-obj-$(CONFIG_SOFTMMU) += null-machine.o
+common-obj-$(CONFIG_SOFTMMU) += loader.o
+common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
+obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
+obj-$(CONFIG_SOFTMMU) += numa.o
 
 common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
 common-obj-$(CONFIG_XILINX_AXI) += stream.o
 common-obj-$(CONFIG_PTIMER) += ptimer.o
-common-obj-$(CONFIG_SOFTMMU) += sysbus.o
-common-obj-$(CONFIG_SOFTMMU) += machine.o
-common-obj-$(CONFIG_SOFTMMU) += loader.o
 common-obj-$(CONFIG_FITLOADER) += loader-fit.o
-common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
 common-obj-$(CONFIG_REGISTER) += register.o
 common-obj-$(CONFIG_OR_IRQ) += or-irq.o
 common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o
 common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
 common-obj-$(CONFIG_GENERIC_LOADER) += generic-loader.o
-common-obj-$(CONFIG_SOFTMMU) += null-machine.o
-
-obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
-obj-$(CONFIG_SOFTMMU) += numa.o
-common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
Signature · 1 line
Alex Bennée
#15 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 45 lines · Philippe Mathieu-Daudé

In some configuration (linux-user, tools) we can ignore building various objects (and the libfdt).

Tested with all the combinations of --[enable|disable]-tools, --[enable|disable]-user and --[enable|disable]-system using the following commands (suggested by Laurent Vivier in v1):

   $ mkdir build
   $ cd build
   $ for user in enable disable; do \
         for tools in enable disable; do \
             for system in enable disable; do \
                 rm -fr build-$user-$system-$tools && \
                 mkdir build-$user-$system-$tools && \
                     (cd build-$user-$system-$tools && \
                      ../../configure \
                                      --${user}-user \
                                      --${system}-system \
                                      --${tools}-tools \
                                      --disable-docs \
                     ); \
             done; \
         done; \
     done

Then building each of the 8 subdirectories on x86_64 and aarch64 hosts, running 'make check', and only on x86_64:
'make run-tcg-tests-x86_64-linux-user'.

All CI green:
https://gitlab.com/philmd/qemu/pipelines/110420332
https://travis-ci.org/philmd/qemu/builds/638781159
https://app.shippable.com/github/philmd/qemu/runs/587/summary/console

Since v1:
- no code change, improved commit description, added review tags
- added 2 new patches touching hw/core/ (remove reset.o from linux-user)

$ git backport-diff -u v1
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
Quoted 8 lines

001/6:[----] [--] 'configure: Do not build libfdt if not required' 002/6:[----] [--] 'Makefile: Clarify all the codebase requires qom/ objects' 003/6:[----] [--] 'Makefile: Restrict system emulation and tools objects' 004/6:[----] [--] 'Makefile: Remove unhelpful comment'
005/6:[down] 'hw/core: Restrict reset handlers API to system-mode' 006/6:[down] 'hw/core/Makefile: Group generic objects versus system-mode objects'

Supersedes: <[email protected]>

^ testing latest patchew feature, v2 has different subject name
than v1, but patchew successfully linked them :)

See "Diff against v1" in v2:
https://patchew.org/QEMU/[email protected]/

https://patchew.org/QEMU/[email protected]/diff/[email protected]/

Thanks Kevin & Paolo for this feature :)

#16 lore raw
Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 2 lines

Supersedes: <[email protected]>

  ^ testing latest patchew feature, v2 has different subject name than v1, but patchew successfully linked them :)

Appreciated! You've now demonstrated the case where the header is included in the cover letter rather than a separate message. :)

Series queued, thanks.

Paolo

Quoted 7 lines

See "Diff against v1" in v2:
https://patchew.org/QEMU/[email protected]/

https://patchew.org/QEMU/[email protected]/diff/[email protected]/

Thanks Kevin & Paolo for this feature :)