* [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs
@ 2019-04-01 14:12 Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 1/5] trace: only include trace-event-subdirs when they are needed Laurent Vivier
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Laurent Vivier @ 2019-04-01 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Gerd Hoffmann, qemu-s390x, Paolo Bonzini,
Cornelia Huck, Thomas Huth, David Hildenbrand, Richard Henderson,
Marc-André Lureau, Philippe Mathieu-Daudé,
Laurent Vivier
This cleanup removes hardware objects from the list of files to be
built for linux-user only targets.
It also builds traces files only when the related file is built.
Tested with all combinations of --{disable,enable}-{system,user,tools}
v3:
- don't move hw/display to CONFIG_BLOCK section
v2:
- add CONFIG_TOOLS and CONFIG_BLOCK
- replace GENERATED_FILES by generated-files-y
and use generated-files-${CONFIG_TRACE_UST} and
generated-files-${CONFIG_SOFTMMU}
- move chardev-obj-y from SUBDIR_RULES to SOFTMMU_SUBDIR_RULES
- use $(CONFIG_BLOCK) in tests/Makefile.include
- disable qemu-ga with linux-user only
Laurent Vivier (5):
trace: only include trace-event-subdirs when they are needed
build: replace GENERATED_FILES by generated-files-y
configure: qemu-ga is only needed with softmmu targets
build: chardev is only needed for softmmu targets
build: don't build hardware objects with linux-user
Makefile | 43 +++++++-------
Makefile.objs | 22 ++++---
Makefile.target | 6 +-
configure | 4 +-
target/s390x/Makefile.objs | 2 +-
tests/Makefile.include | 116 ++++++++++++++++++-------------------
6 files changed, 102 insertions(+), 91 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v3 1/5] trace: only include trace-event-subdirs when they are needed
2019-04-01 14:12 [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Laurent Vivier
@ 2019-04-01 14:12 ` Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 2/5] build: replace GENERATED_FILES by generated-files-y Laurent Vivier
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2019-04-01 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Gerd Hoffmann, qemu-s390x, Paolo Bonzini,
Cornelia Huck, Thomas Huth, David Hildenbrand, Richard Henderson,
Marc-André Lureau, Philippe Mathieu-Daudé,
Laurent Vivier
Some directories are built only for softmmu targets,
and the related trace-event-subdirs must do the same
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
Makefile.objs | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/Makefile.objs b/Makefile.objs
index cf065de5ed44..dda5bbc9101f 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -127,11 +127,12 @@ rdmacm-mux-obj-y = contrib/rdmacm-mux/
trace-events-subdirs =
trace-events-subdirs += accel/kvm
trace-events-subdirs += accel/tcg
-trace-events-subdirs += audio
trace-events-subdirs += authz
trace-events-subdirs += block
trace-events-subdirs += chardev
trace-events-subdirs += crypto
+ifeq ($(CONFIG_SOFTMMU),y)
+trace-events-subdirs += audio
trace-events-subdirs += hw/9pfs
trace-events-subdirs += hw/acpi
trace-events-subdirs += hw/alpha
@@ -140,7 +141,6 @@ trace-events-subdirs += hw/audio
trace-events-subdirs += hw/block
trace-events-subdirs += hw/block/dataplane
trace-events-subdirs += hw/char
-trace-events-subdirs += hw/display
trace-events-subdirs += hw/dma
trace-events-subdirs += hw/hppa
trace-events-subdirs += hw/i2c
@@ -173,11 +173,14 @@ trace-events-subdirs += hw/virtio
trace-events-subdirs += hw/watchdog
trace-events-subdirs += hw/xen
trace-events-subdirs += hw/gpio
+trace-events-subdirs += migration
+trace-events-subdirs += net
+trace-events-subdirs += ui
+endif
+trace-events-subdirs += hw/display
trace-events-subdirs += io
trace-events-subdirs += linux-user
-trace-events-subdirs += migration
trace-events-subdirs += nbd
-trace-events-subdirs += net
trace-events-subdirs += qapi
trace-events-subdirs += qom
trace-events-subdirs += scsi
@@ -189,7 +192,6 @@ trace-events-subdirs += target/ppc
trace-events-subdirs += target/riscv
trace-events-subdirs += target/s390x
trace-events-subdirs += target/sparc
-trace-events-subdirs += ui
trace-events-subdirs += util
trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
--
2.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v3 2/5] build: replace GENERATED_FILES by generated-files-y
2019-04-01 14:12 [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 1/5] trace: only include trace-event-subdirs when they are needed Laurent Vivier
@ 2019-04-01 14:12 ` Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 3/5] configure: qemu-ga is only needed with softmmu targets Laurent Vivier
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2019-04-01 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Gerd Hoffmann, qemu-s390x, Paolo Bonzini,
Cornelia Huck, Thomas Huth, David Hildenbrand, Richard Henderson,
Marc-André Lureau, Philippe Mathieu-Daudé,
Laurent Vivier
When possible use generated-files-$(FLAG) to disable
some targets (like KEYCODEMAP_FILES).
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
Makefile | 36 +++++++++++++++++-------------------
Makefile.target | 6 +++---
target/s390x/Makefile.objs | 2 +-
tests/Makefile.include | 26 +++++++++++++-------------
4 files changed, 34 insertions(+), 36 deletions(-)
diff --git a/Makefile b/Makefile
index 04a0d4505085..10ae5e31fc0a 100644
--- a/Makefile
+++ b/Makefile
@@ -101,7 +101,7 @@ QEMU_PKGVERSION := $(if $(PKGVERSION),$(PKGVERSION),$(shell \
# Either "version (pkgversion)", or just "version" if pkgversion not set
FULL_VERSION := $(if $(QEMU_PKGVERSION),$(VERSION) ($(QEMU_PKGVERSION)),$(VERSION))
-GENERATED_FILES = qemu-version.h config-host.h qemu-options.def
+generated-files-y = qemu-version.h config-host.h qemu-options.def
GENERATED_QAPI_FILES = qapi/qapi-builtin-types.h qapi/qapi-builtin-types.c
GENERATED_QAPI_FILES += qapi/qapi-types.h qapi/qapi-types.c
@@ -121,20 +121,18 @@ GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.c)
GENERATED_QAPI_FILES += qapi/qapi-introspect.c qapi/qapi-introspect.h
GENERATED_QAPI_FILES += qapi/qapi-doc.texi
-GENERATED_FILES += $(GENERATED_QAPI_FILES)
+generated-files-y += $(GENERATED_QAPI_FILES)
-GENERATED_FILES += trace/generated-tcg-tracers.h
+generated-files-y += trace/generated-tcg-tracers.h
-GENERATED_FILES += trace/generated-helpers-wrappers.h
-GENERATED_FILES += trace/generated-helpers.h
-GENERATED_FILES += trace/generated-helpers.c
+generated-files-y += trace/generated-helpers-wrappers.h
+generated-files-y += trace/generated-helpers.h
+generated-files-y += trace/generated-helpers.c
-ifdef CONFIG_TRACE_UST
-GENERATED_FILES += trace-ust-all.h
-GENERATED_FILES += trace-ust-all.c
-endif
+generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.h
+generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.c
-GENERATED_FILES += module_block.h
+generated-files-y += module_block.h
TRACE_HEADERS = trace-root.h $(trace-events-subdirs:%=%/trace.h)
TRACE_SOURCES = trace-root.c $(trace-events-subdirs:%=%/trace.c)
@@ -147,10 +145,10 @@ ifdef CONFIG_TRACE_UST
TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h)
endif
-GENERATED_FILES += $(TRACE_HEADERS)
-GENERATED_FILES += $(TRACE_SOURCES)
-GENERATED_FILES += $(BUILD_DIR)/trace-events-all
-GENERATED_FILES += .git-submodule-status
+generated-files-y += $(TRACE_HEADERS)
+generated-files-y += $(TRACE_SOURCES)
+generated-files-y += $(BUILD_DIR)/trace-events-all
+generated-files-y += .git-submodule-status
trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
@@ -281,7 +279,7 @@ KEYCODEMAP_FILES = \
ui/input-keymap-osx-to-qcode.c \
$(NULL)
-GENERATED_FILES += $(KEYCODEMAP_FILES)
+generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES)
ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
$(call quiet-command,\
@@ -637,10 +635,10 @@ clean:
rm -f fsdev/*.pod scsi/*.pod
rm -f qemu-img-cmds.h
rm -f ui/shader/*-vert.h ui/shader/*-frag.h
- @# May not be present in GENERATED_FILES
+ @# May not be present in generated-files-y
rm -f trace/generated-tracers-dtrace.dtrace*
rm -f trace/generated-tracers-dtrace.h*
- rm -f $(foreach f,$(GENERATED_FILES),$(f) $(f)-timestamp)
+ rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
rm -f qapi-gen-timestamp
rm -rf qga/qapi-generated
for d in $(ALL_SUBDIRS); do \
@@ -1032,7 +1030,7 @@ endif # CONFIG_WIN
# rebuilt before other object files
ifneq ($(wildcard config-host.mak),)
ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
-Makefile: $(GENERATED_FILES)
+Makefile: $(generated-files-y)
endif
endif
diff --git a/Makefile.target b/Makefile.target
index ae02495951df..fdbe7c89f4a0 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -166,7 +166,7 @@ else
obj-y += hw/$(TARGET_BASE_ARCH)/
endif
-GENERATED_FILES += hmp-commands.h hmp-commands-info.h
+generated-files-y += hmp-commands.h hmp-commands-info.h
endif # CONFIG_SOFTMMU
@@ -236,5 +236,5 @@ ifdef CONFIG_TRACE_SYSTEMTAP
$(INSTALL_DATA) $(QEMU_PROG)-log.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-log.stp"
endif
-GENERATED_FILES += config-target.h
-Makefile: $(GENERATED_FILES)
+generated-files-y += config-target.h
+Makefile: $(generated-files-y)
diff --git a/target/s390x/Makefile.objs b/target/s390x/Makefile.objs
index 68eeee3d2f9b..312bf4f6baa0 100644
--- a/target/s390x/Makefile.objs
+++ b/target/s390x/Makefile.objs
@@ -12,7 +12,7 @@ obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
feat-src = $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/
feat-dst = $(BUILD_DIR)/$(TARGET_DIR)
ifneq ($(MAKECMDGOALS),clean)
-GENERATED_FILES += $(feat-dst)gen-features.h
+generated-files-y += $(feat-dst)gen-features.h
endif
$(feat-dst)gen-features.h: $(feat-dst)gen-features.h-timestamp
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 6b904d74303c..428a9eaaf762 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -468,19 +468,19 @@ qapi-schema += unknown-expr-key.json
check-qapi-schema-y := $(addprefix tests/qapi-schema/, $(qapi-schema))
-GENERATED_FILES += tests/test-qapi-types.h \
- tests/include/test-qapi-types-sub-module.h \
- tests/test-qapi-types-sub-sub-module.h \
- tests/test-qapi-visit.h \
- tests/include/test-qapi-visit-sub-module.h \
- tests/test-qapi-visit-sub-sub-module.h \
- tests/test-qapi-commands.h \
- tests/include/test-qapi-commands-sub-module.h \
- tests/test-qapi-commands-sub-sub-module.h \
- tests/test-qapi-events.h \
- tests/include/test-qapi-events-sub-module.h \
- tests/test-qapi-events-sub-sub-module.h \
- tests/test-qapi-introspect.h
+generated-files-y += tests/test-qapi-types.h
+generated-files-y += tests/include/test-qapi-types-sub-module.h
+generated-files-y += tests/test-qapi-types-sub-sub-module.h
+generated-files-y += tests/test-qapi-visit.h
+generated-files-y += tests/include/test-qapi-visit-sub-module.h
+generated-files-y += tests/test-qapi-visit-sub-sub-module.h
+generated-files-y += tests/test-qapi-commands.h
+generated-files-y += tests/include/test-qapi-commands-sub-module.h
+generated-files-y += tests/test-qapi-commands-sub-sub-module.h
+generated-files-y += tests/test-qapi-events.h
+generated-files-y += tests/include/test-qapi-events-sub-module.h
+generated-files-y += tests/test-qapi-events-sub-sub-module.h
+generated-files-y += tests/test-qapi-introspect.h
test-obj-y = tests/check-qnum.o tests/check-qstring.o tests/check-qdict.o \
tests/check-qlist.o tests/check-qnull.o tests/check-qobject.o \
--
2.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v3 3/5] configure: qemu-ga is only needed with softmmu targets
2019-04-01 14:12 [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 1/5] trace: only include trace-event-subdirs when they are needed Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 2/5] build: replace GENERATED_FILES by generated-files-y Laurent Vivier
@ 2019-04-01 14:12 ` Laurent Vivier
2019-04-01 14:50 ` Thomas Huth
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 4/5] build: chardev is only needed for " Laurent Vivier
` (2 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Laurent Vivier @ 2019-04-01 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Gerd Hoffmann, qemu-s390x, Paolo Bonzini,
Cornelia Huck, Thomas Huth, David Hildenbrand, Richard Henderson,
Marc-André Lureau, Philippe Mathieu-Daudé,
Laurent Vivier
Remove it from the list of tools if --disable-system
and --disable-tools are used as we don't need it for
linux-user targets.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
[lv: I also disable it with disable-tools, not only with disable-system]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
configure | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 1c563a70276a..b627efede6cf 100755
--- a/configure
+++ b/configure
@@ -6083,7 +6083,9 @@ fi
# Probe for guest agent support/options
if [ "$guest_agent" != "no" ]; then
- if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then
+ if [ "$softmmu" = no -a "$want_tools" = no ] ; then
+ guest_agent=no
+ elif [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then
tools="qemu-ga $tools"
guest_agent=yes
elif [ "$guest_agent" != yes ]; then
--
2.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v3 4/5] build: chardev is only needed for softmmu targets
2019-04-01 14:12 [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Laurent Vivier
` (2 preceding siblings ...)
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 3/5] configure: qemu-ga is only needed with softmmu targets Laurent Vivier
@ 2019-04-01 14:12 ` Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 5/5] build: don't build hardware objects with linux-user Laurent Vivier
2019-04-02 8:08 ` [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Paolo Bonzini
5 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2019-04-01 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Gerd Hoffmann, qemu-s390x, Paolo Bonzini,
Cornelia Huck, Thomas Huth, David Hildenbrand, Richard Henderson,
Marc-André Lureau, Philippe Mathieu-Daudé,
Laurent Vivier
Move the dependency from SUBDIR_RULES to SOFTMMU_SUBDIR_RULES
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
Makefile | 3 ++-
Makefile.objs | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 10ae5e31fc0a..d2de0b6e56cc 100644
--- a/Makefile
+++ b/Makefile
@@ -440,6 +440,7 @@ SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES))
$(SOFTMMU_SUBDIR_RULES): $(authz-obj-y)
$(SOFTMMU_SUBDIR_RULES): $(block-obj-y)
+$(SOFTMMU_SUBDIR_RULES): $(chardev-obj-y)
$(SOFTMMU_SUBDIR_RULES): $(crypto-obj-y)
$(SOFTMMU_SUBDIR_RULES): $(io-obj-y)
$(SOFTMMU_SUBDIR_RULES): config-all-devices.mak
@@ -475,7 +476,7 @@ subdir-capstone: .git-submodule-status
subdir-slirp: .git-submodule-status
$(call quiet-command,$(MAKE) -C $(SRC_PATH)/slirp BUILD_DIR="$(BUILD_DIR)/slirp" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(QEMU_CFLAGS)")
-$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
+$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) \
$(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY))
ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
diff --git a/Makefile.objs b/Makefile.objs
index dda5bbc9101f..43c9e4503297 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -129,9 +129,9 @@ trace-events-subdirs += accel/kvm
trace-events-subdirs += accel/tcg
trace-events-subdirs += authz
trace-events-subdirs += block
-trace-events-subdirs += chardev
trace-events-subdirs += crypto
ifeq ($(CONFIG_SOFTMMU),y)
+trace-events-subdirs += chardev
trace-events-subdirs += audio
trace-events-subdirs += hw/9pfs
trace-events-subdirs += hw/acpi
--
2.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v3 5/5] build: don't build hardware objects with linux-user
2019-04-01 14:12 [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Laurent Vivier
` (3 preceding siblings ...)
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 4/5] build: chardev is only needed for " Laurent Vivier
@ 2019-04-01 14:12 ` Laurent Vivier
2019-04-02 8:08 ` [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Paolo Bonzini
5 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2019-04-01 14:12 UTC (permalink / raw)
To: qemu-devel
Cc: Stefan Hajnoczi, Gerd Hoffmann, qemu-s390x, Paolo Bonzini,
Cornelia Huck, Thomas Huth, David Hildenbrand, Richard Henderson,
Marc-André Lureau, Philippe Mathieu-Daudé,
Laurent Vivier, Laurent Vivier
Some objects are only needed for system emulation and tools.
We can ignore them for the user mode case
Update tests to run accordingly: conditionally build some tests
on CONFIG_BLOCK.
Some tests use components that are only built when softmmu or
block tools are enabled, not for linux-user. So, if these components
are not available, disable the tests.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
Makefile | 4 ++
Makefile.objs | 14 ++++---
tests/Makefile.include | 90 +++++++++++++++++++++---------------------
3 files changed, 58 insertions(+), 50 deletions(-)
diff --git a/Makefile b/Makefile
index d2de0b6e56cc..ab6e8d00979b 100644
--- a/Makefile
+++ b/Makefile
@@ -87,6 +87,10 @@ endif
include $(SRC_PATH)/rules.mak
+# notempy and lor are defined in rules.mak
+CONFIG_TOOLS := $(call notempty,$(TOOLS))
+CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
+
# Create QEMU_PKGVERSION and FULL_VERSION strings
# If PKGVERSION is set, use that; otherwise get version and -dirty status from git
QEMU_PKGVERSION := $(if $(PKGVERSION),$(PKGVERSION),$(shell \
diff --git a/Makefile.objs b/Makefile.objs
index 43c9e4503297..2b0793ecc9ff 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -127,9 +127,17 @@ rdmacm-mux-obj-y = contrib/rdmacm-mux/
trace-events-subdirs =
trace-events-subdirs += accel/kvm
trace-events-subdirs += accel/tcg
+trace-events-subdirs += crypto
+ifeq ($(CONFIG_USER_ONLY),y)
+trace-events-subdirs += linux-user
+endif
+ifeq ($(CONFIG_BLOCK),y)
trace-events-subdirs += authz
trace-events-subdirs += block
-trace-events-subdirs += crypto
+trace-events-subdirs += io
+trace-events-subdirs += nbd
+trace-events-subdirs += scsi
+endif
ifeq ($(CONFIG_SOFTMMU),y)
trace-events-subdirs += chardev
trace-events-subdirs += audio
@@ -178,12 +186,8 @@ trace-events-subdirs += net
trace-events-subdirs += ui
endif
trace-events-subdirs += hw/display
-trace-events-subdirs += io
-trace-events-subdirs += linux-user
-trace-events-subdirs += nbd
trace-events-subdirs += qapi
trace-events-subdirs += qom
-trace-events-subdirs += scsi
trace-events-subdirs += target/arm
trace-events-subdirs += target/hppa
trace-events-subdirs += target/i386
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 428a9eaaf762..3be3be0b13cb 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -45,7 +45,7 @@ SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
check-unit-y += tests/check-qdict$(EXESUF)
check-unit-y += tests/check-block-qdict$(EXESUF)
-check-unit-y += tests/test-char$(EXESUF)
+check-unit-$(CONFIG_SOFTMMU) += tests/test-char$(EXESUF)
check-unit-y += tests/check-qnum$(EXESUF)
check-unit-y += tests/check-qstring$(EXESUF)
check-unit-y += tests/check-qlist$(EXESUF)
@@ -61,21 +61,21 @@ check-unit-y += tests/test-string-input-visitor$(EXESUF)
check-unit-y += tests/test-string-output-visitor$(EXESUF)
check-unit-y += tests/test-qmp-event$(EXESUF)
check-unit-y += tests/test-opts-visitor$(EXESUF)
-check-unit-y += tests/test-coroutine$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-coroutine$(EXESUF)
check-unit-y += tests/test-visitor-serialization$(EXESUF)
check-unit-y += tests/test-iov$(EXESUF)
-check-unit-y += tests/test-aio$(EXESUF)
-check-unit-y += tests/test-aio-multithread$(EXESUF)
-check-unit-y += tests/test-throttle$(EXESUF)
-check-unit-y += tests/test-thread-pool$(EXESUF)
-check-unit-y += tests/test-hbitmap$(EXESUF)
-check-unit-y += tests/test-bdrv-drain$(EXESUF)
-check-unit-y += tests/test-bdrv-graph-mod$(EXESUF)
-check-unit-y += tests/test-blockjob$(EXESUF)
-check-unit-y += tests/test-blockjob-txn$(EXESUF)
-check-unit-y += tests/test-block-backend$(EXESUF)
-check-unit-y += tests/test-block-iothread$(EXESUF)
-check-unit-y += tests/test-image-locking$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-aio$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-aio-multithread$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-throttle$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-thread-pool$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-hbitmap$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-bdrv-drain$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-bdrv-graph-mod$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-blockjob$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-blockjob-txn$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-block-backend$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-block-iothread$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-image-locking$(EXESUF)
check-unit-y += tests/test-x86-cpuid$(EXESUF)
# all code tested by test-x86-cpuid is inside topology.h
ifeq ($(CONFIG_SOFTMMU),y)
@@ -101,40 +101,40 @@ check-unit-y += tests/check-qom-interface$(EXESUF)
check-unit-y += tests/check-qom-proplist$(EXESUF)
check-unit-y += tests/test-qemu-opts$(EXESUF)
check-unit-y += tests/test-keyval$(EXESUF)
-check-unit-y += tests/test-write-threshold$(EXESUF)
-check-unit-y += tests/test-crypto-hash$(EXESUF)
-check-speed-y += tests/benchmark-crypto-hash$(EXESUF)
-check-unit-y += tests/test-crypto-hmac$(EXESUF)
-check-speed-y += tests/benchmark-crypto-hmac$(EXESUF)
-check-unit-y += tests/test-crypto-cipher$(EXESUF)
-check-speed-y += tests/benchmark-crypto-cipher$(EXESUF)
-check-unit-y += tests/test-crypto-secret$(EXESUF)
-check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlscredsx509$(EXESUF)
-check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlssession$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-write-threshold$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-crypto-hash$(EXESUF)
+check-speed-$(CONFIG_BLOCK) += tests/benchmark-crypto-hash$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-crypto-hmac$(EXESUF)
+check-speed-$(CONFIG_BLOCK) += tests/benchmark-crypto-hmac$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-crypto-cipher$(EXESUF)
+check-speed-$(CONFIG_BLOCK) += tests/benchmark-crypto-cipher$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-crypto-secret$(EXESUF)
+check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) += tests/test-crypto-tlscredsx509$(EXESUF)
+check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) += tests/test-crypto-tlssession$(EXESUF)
ifneq (,$(findstring qemu-ga,$(TOOLS)))
check-unit-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_SERIAL)) += tests/test-qga$(EXESUF)
endif
check-unit-y += tests/test-timed-average$(EXESUF)
check-unit-$(CONFIG_INOTIFY1) += tests/test-util-filemonitor$(EXESUF)
check-unit-y += tests/test-util-sockets$(EXESUF)
-check-unit-y += tests/test-authz-simple$(EXESUF)
-check-unit-y += tests/test-authz-list$(EXESUF)
-check-unit-y += tests/test-authz-listfile$(EXESUF)
-check-unit-$(CONFIG_AUTH_PAM) += tests/test-authz-pam$(EXESUF)
-check-unit-y += tests/test-io-task$(EXESUF)
-check-unit-y += tests/test-io-channel-socket$(EXESUF)
-check-unit-y += tests/test-io-channel-file$(EXESUF)
-check-unit-$(CONFIG_GNUTLS) += tests/test-io-channel-tls$(EXESUF)
-check-unit-y += tests/test-io-channel-command$(EXESUF)
-check-unit-y += tests/test-io-channel-buffer$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-authz-simple$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-authz-list$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-authz-listfile$(EXESUF)
+check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_AUTH_PAM)) += tests/test-authz-pam$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-io-task$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-io-channel-socket$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-io-channel-file$(EXESUF)
+check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) += tests/test-io-channel-tls$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-io-channel-command$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-io-channel-buffer$(EXESUF)
check-unit-y += tests/test-base64$(EXESUF)
-check-unit-$(if $(CONFIG_NETTLE),y,$(CONFIG_GCRYPT)) += tests/test-crypto-pbkdf$(EXESUF)
-check-unit-y += tests/test-crypto-ivgen$(EXESUF)
-check-unit-y += tests/test-crypto-afsplit$(EXESUF)
-check-unit-y += tests/test-crypto-xts$(EXESUF)
-check-unit-y += tests/test-crypto-block$(EXESUF)
+check-unit-$(call land,$(CONFIG_BLOCK),$(if $(CONFIG_NETTLE),y,$(CONFIG_GCRYPT))) += tests/test-crypto-pbkdf$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-crypto-ivgen$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-crypto-afsplit$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-crypto-xts$(EXESUF)
+check-unit-$(CONFIG_BLOCK) += tests/test-crypto-block$(EXESUF)
check-unit-y += tests/test-logging$(EXESUF)
-check-unit-$(CONFIG_REPLICATION) += tests/test-replication$(EXESUF)
+check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_REPLICATION)) += tests/test-replication$(EXESUF)
check-unit-y += tests/test-bufferiszero$(EXESUF)
check-unit-y += tests/test-uuid$(EXESUF)
check-unit-y += tests/ptimer-test$(EXESUF)
@@ -515,11 +515,11 @@ test-qapi-obj-y = tests/test-qapi-types.o \
tests/test-qapi-visit-sub-sub-module.o \
tests/test-qapi-introspect.o \
$(test-qom-obj-y)
-benchmark-crypto-obj-y = $(authz-obj-y) $(crypto-obj-y) $(test-qom-obj-y)
-test-crypto-obj-y = $(authz-obj-y) $(crypto-obj-y) $(test-qom-obj-y)
-test-io-obj-y = $(io-obj-y) $(test-crypto-obj-y)
-test-authz-obj-y = $(test-qom-obj-y) $(authz-obj-y)
-test-block-obj-y = $(block-obj-y) $(test-io-obj-y) tests/iothread.o
+benchmark-crypto-obj-$(CONFIG_BLOCK) = $(authz-obj-y) $(crypto-obj-y) $(test-qom-obj-y)
+test-crypto-obj-$(CONFIG_BLOCK) = $(authz-obj-y) $(crypto-obj-y) $(test-qom-obj-y)
+test-io-obj-$(CONFIG_BLOCK) = $(io-obj-y) $(test-crypto-obj-y)
+test-authz-obj-$(CONFIG_BLOCK) = $(test-qom-obj-y) $(authz-obj-y)
+test-block-obj-$(CONFIG_BLOCK) = $(block-obj-y) $(test-io-obj-y) tests/iothread.o
tests/check-qnum$(EXESUF): tests/check-qnum.o $(test-util-obj-y)
tests/check-qstring$(EXESUF): tests/check-qstring.o $(test-util-obj-y)
--
2.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v3 3/5] configure: qemu-ga is only needed with softmmu targets
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 3/5] configure: qemu-ga is only needed with softmmu targets Laurent Vivier
@ 2019-04-01 14:50 ` Thomas Huth
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2019-04-01 14:50 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel
Cc: Stefan Hajnoczi, Gerd Hoffmann, qemu-s390x, Paolo Bonzini,
Cornelia Huck, David Hildenbrand, Richard Henderson,
Marc-André Lureau, Philippe Mathieu-Daudé
On 01/04/2019 16.12, Laurent Vivier wrote:
> Remove it from the list of tools if --disable-system
> and --disable-tools are used as we don't need it for
> linux-user targets.
>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> [lv: I also disable it with disable-tools, not only with disable-system]
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> configure | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 1c563a70276a..b627efede6cf 100755
> --- a/configure
> +++ b/configure
> @@ -6083,7 +6083,9 @@ fi
> # Probe for guest agent support/options
>
> if [ "$guest_agent" != "no" ]; then
> - if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then
> + if [ "$softmmu" = no -a "$want_tools" = no ] ; then
> + guest_agent=no
> + elif [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then
> tools="qemu-ga $tools"
> guest_agent=yes
> elif [ "$guest_agent" != yes ]; then
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs
2019-04-01 14:12 [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Laurent Vivier
` (4 preceding siblings ...)
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 5/5] build: don't build hardware objects with linux-user Laurent Vivier
@ 2019-04-02 8:08 ` Paolo Bonzini
2019-05-13 15:17 ` Laurent Vivier
5 siblings, 1 reply; 10+ messages in thread
From: Paolo Bonzini @ 2019-04-02 8:08 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel
Cc: Stefan Hajnoczi, Gerd Hoffmann, qemu-s390x, Cornelia Huck,
Thomas Huth, David Hildenbrand, Richard Henderson,
Marc-André Lureau, Philippe Mathieu-Daudé
On 01/04/19 16:12, Laurent Vivier wrote:
> This cleanup removes hardware objects from the list of files to be
> built for linux-user only targets.
>
> It also builds traces files only when the related file is built.
>
> Tested with all combinations of --{disable,enable}-{system,user,tools}
>
> v3:
> - don't move hw/display to CONFIG_BLOCK section
> v2:
> - add CONFIG_TOOLS and CONFIG_BLOCK
> - replace GENERATED_FILES by generated-files-y
> and use generated-files-${CONFIG_TRACE_UST} and
> generated-files-${CONFIG_SOFTMMU}
> - move chardev-obj-y from SUBDIR_RULES to SOFTMMU_SUBDIR_RULES
> - use $(CONFIG_BLOCK) in tests/Makefile.include
> - disable qemu-ga with linux-user only
>
> Laurent Vivier (5):
> trace: only include trace-event-subdirs when they are needed
> build: replace GENERATED_FILES by generated-files-y
> configure: qemu-ga is only needed with softmmu targets
> build: chardev is only needed for softmmu targets
> build: don't build hardware objects with linux-user
>
> Makefile | 43 +++++++-------
> Makefile.objs | 22 ++++---
> Makefile.target | 6 +-
> configure | 4 +-
> target/s390x/Makefile.objs | 2 +-
> tests/Makefile.include | 116 ++++++++++++++++++-------------------
> 6 files changed, 102 insertions(+), 91 deletions(-)
>
Queued for 4.1, thanks.
Paolo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs
2019-04-02 8:08 ` [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Paolo Bonzini
@ 2019-05-13 15:17 ` Laurent Vivier
2019-05-13 16:17 ` Paolo Bonzini
0 siblings, 1 reply; 10+ messages in thread
From: Laurent Vivier @ 2019-05-13 15:17 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
Cc: Thomas Huth, David Hildenbrand, Cornelia Huck, qemu-s390x,
Gerd Hoffmann, Stefan Hajnoczi, Marc-André Lureau,
Philippe Mathieu-Daudé,
Richard Henderson
On 02/04/2019 10:08, Paolo Bonzini wrote:
> On 01/04/19 16:12, Laurent Vivier wrote:
>> This cleanup removes hardware objects from the list of files to be
>> built for linux-user only targets.
>>
>> It also builds traces files only when the related file is built.
>>
>> Tested with all combinations of --{disable,enable}-{system,user,tools}
>>
>> v3:
>> - don't move hw/display to CONFIG_BLOCK section
>> v2:
>> - add CONFIG_TOOLS and CONFIG_BLOCK
>> - replace GENERATED_FILES by generated-files-y
>> and use generated-files-${CONFIG_TRACE_UST} and
>> generated-files-${CONFIG_SOFTMMU}
>> - move chardev-obj-y from SUBDIR_RULES to SOFTMMU_SUBDIR_RULES
>> - use $(CONFIG_BLOCK) in tests/Makefile.include
>> - disable qemu-ga with linux-user only
>>
>> Laurent Vivier (5):
>> trace: only include trace-event-subdirs when they are needed
>> build: replace GENERATED_FILES by generated-files-y
>> configure: qemu-ga is only needed with softmmu targets
>> build: chardev is only needed for softmmu targets
>> build: don't build hardware objects with linux-user
>>
>> Makefile | 43 +++++++-------
>> Makefile.objs | 22 ++++---
>> Makefile.target | 6 +-
>> configure | 4 +-
>> target/s390x/Makefile.objs | 2 +-
>> tests/Makefile.include | 116 ++++++++++++++++++-------------------
>> 6 files changed, 102 insertions(+), 91 deletions(-)
>>
>
> Queued for 4.1, thanks.
Any news?
Thanks,
Laurent
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs
2019-05-13 15:17 ` Laurent Vivier
@ 2019-05-13 16:17 ` Paolo Bonzini
0 siblings, 0 replies; 10+ messages in thread
From: Paolo Bonzini @ 2019-05-13 16:17 UTC (permalink / raw)
To: Laurent Vivier
Cc: Thomas Huth, David Hildenbrand, Cornelia Huck, qemu-devel,
qemu-s390x, Gerd Hoffmann, Hajnoczi, Stefan,
Marc-André Lureau, Philippe Mathieu-Daudé,
Richard Henderson
Will send it out this week.
Paolo
Il lun 13 mag 2019, 16:18 Laurent Vivier <lvivier@redhat.com> ha scritto:
> On 02/04/2019 10:08, Paolo Bonzini wrote:
> > On 01/04/19 16:12, Laurent Vivier wrote:
> >> This cleanup removes hardware objects from the list of files to be
> >> built for linux-user only targets.
> >>
> >> It also builds traces files only when the related file is built.
> >>
> >> Tested with all combinations of --{disable,enable}-{system,user,tools}
> >>
> >> v3:
> >> - don't move hw/display to CONFIG_BLOCK section
> >> v2:
> >> - add CONFIG_TOOLS and CONFIG_BLOCK
> >> - replace GENERATED_FILES by generated-files-y
> >> and use generated-files-${CONFIG_TRACE_UST} and
> >> generated-files-${CONFIG_SOFTMMU}
> >> - move chardev-obj-y from SUBDIR_RULES to SOFTMMU_SUBDIR_RULES
> >> - use $(CONFIG_BLOCK) in tests/Makefile.include
> >> - disable qemu-ga with linux-user only
> >>
> >> Laurent Vivier (5):
> >> trace: only include trace-event-subdirs when they are needed
> >> build: replace GENERATED_FILES by generated-files-y
> >> configure: qemu-ga is only needed with softmmu targets
> >> build: chardev is only needed for softmmu targets
> >> build: don't build hardware objects with linux-user
> >>
> >> Makefile | 43 +++++++-------
> >> Makefile.objs | 22 ++++---
> >> Makefile.target | 6 +-
> >> configure | 4 +-
> >> target/s390x/Makefile.objs | 2 +-
> >> tests/Makefile.include | 116 ++++++++++++++++++-------------------
> >> 6 files changed, 102 insertions(+), 91 deletions(-)
> >>
> >
> > Queued for 4.1, thanks.
>
> Any news?
>
> Thanks,
> Laurent
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-05-13 16:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-01 14:12 [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 1/5] trace: only include trace-event-subdirs when they are needed Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 2/5] build: replace GENERATED_FILES by generated-files-y Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 3/5] configure: qemu-ga is only needed with softmmu targets Laurent Vivier
2019-04-01 14:50 ` Thomas Huth
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 4/5] build: chardev is only needed for " Laurent Vivier
2019-04-01 14:12 ` [Qemu-devel] [PATCH v3 5/5] build: don't build hardware objects with linux-user Laurent Vivier
2019-04-02 8:08 ` [Qemu-devel] [PATCH v3 0/5] build: cleanup in Makefile.objs Paolo Bonzini
2019-05-13 15:17 ` Laurent Vivier
2019-05-13 16:17 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.