small create_config cleanup
cover small create_config cleanup
Noticed while reviewing the config-devices.h, decided to remove it since it confused Philippe as well.
Paolo Bonzini (2):
Makefile: do not repeat $(CONFIG_SOFTMMU) in hw/Makefile.objs
create_config: remove $(CONFIG_SOFTMMU) hack
configure | 2 +- hw/Makefile.objs | 61 +++++++++++++++++++++++++++------------------------ scripts/create_config | 2 +- 3 files changed, 34 insertions(+), 31 deletions(-)
Signature · 1 line
1.8.3.1
PATCH 1/2 Makefile: do not repeat $(CONFIG_SOFTMMU) in hw/Makefile.objs
The device directories must be included only for softmmu builds. Instead of repeating $(CONFIG_SOFTMMU), use an "ifeq".
--- hw/Makefile.objs | 61 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 29 deletions(-)
hw/Makefile.objs +32 -29
@@ -1,42 +1,45 @@ +devices-dirs-y = core/ +ifeq ($(CONFIG_SOFTMMU), y) devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/ -devices-dirs-$(CONFIG_SOFTMMU) += acpi/ -devices-dirs-$(CONFIG_SOFTMMU) += adc/ -devices-dirs-$(CONFIG_SOFTMMU) += audio/ -devices-dirs-$(CONFIG_SOFTMMU) += block/ -devices-dirs-$(CONFIG_SOFTMMU) += bt/ -devices-dirs-$(CONFIG_SOFTMMU) += char/ -devices-dirs-$(CONFIG_SOFTMMU) += cpu/ -devices-dirs-$(CONFIG_SOFTMMU) += display/ -devices-dirs-$(CONFIG_SOFTMMU) += dma/ -devices-dirs-$(CONFIG_SOFTMMU) += gpio/ +devices-dirs-y += acpi/ +devices-dirs-y += adc/ +devices-dirs-y += audio/ +devices-dirs-y += block/ +devices-dirs-y += bt/ +devices-dirs-y += char/ +devices-dirs-y += cpu/ +devices-dirs-y += display/ +devices-dirs-y += dma/ +devices-dirs-y += gpio/ devices-dirs-$(CONFIG_HYPERV) += hyperv/ devices-dirs-$(CONFIG_I2C) += i2c/ -devices-dirs-$(CONFIG_SOFTMMU) += ide/ -devices-dirs-$(CONFIG_SOFTMMU) += input/ -devices-dirs-$(CONFIG_SOFTMMU) += intc/ +devices-dirs-y += ide/ +devices-dirs-y += input/ +devices-dirs-y += intc/ devices-dirs-$(CONFIG_IPACK) += ipack/ devices-dirs-$(CONFIG_IPMI) += ipmi/ -devices-dirs-$(CONFIG_SOFTMMU) += isa/ -devices-dirs-$(CONFIG_SOFTMMU) += misc/ -devices-dirs-$(CONFIG_SOFTMMU) += net/ -devices-dirs-$(CONFIG_SOFTMMU) += rdma/ -devices-dirs-$(CONFIG_SOFTMMU) += nvram/ -devices-dirs-$(CONFIG_SOFTMMU) += pci/ +devices-dirs-y += isa/ +devices-dirs-y += misc/ +devices-dirs-y += net/ +devices-dirs-y += rdma/ +devices-dirs-y += nvram/ +devices-dirs-y += pci/ devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/ -devices-dirs-$(CONFIG_SOFTMMU) += pcmcia/ +devices-dirs-y += pcmcia/ devices-dirs-$(CONFIG_SCSI) += scsi/ -devices-dirs-$(CONFIG_SOFTMMU) += sd/ -devices-dirs-$(CONFIG_SOFTMMU) += ssi/ -devices-dirs-$(CONFIG_SOFTMMU) += timer/ +devices-dirs-y += sd/ +devices-dirs-y += ssi/ +devices-dirs-y += timer/ devices-dirs-$(CONFIG_TPM) += tpm/ -devices-dirs-$(CONFIG_SOFTMMU) += usb/ +devices-dirs-y += usb/ devices-dirs-$(CONFIG_VFIO) += vfio/ -devices-dirs-$(CONFIG_SOFTMMU) += virtio/ -devices-dirs-$(CONFIG_SOFTMMU) += watchdog/ -devices-dirs-$(CONFIG_SOFTMMU) += xen/ +devices-dirs-y += virtio/ +devices-dirs-y += watchdog/ +devices-dirs-y += xen/ devices-dirs-$(CONFIG_MEM_DEVICE) += mem/ -devices-dirs-$(CONFIG_SOFTMMU) += smbios/ devices-dirs-y += semihosting/ -devices-dirs-y += core/ +devices-dirs-y += smbios/ +endif + common-obj-y += $(devices-dirs-y) obj-y += $(devices-dirs-y)
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 1/2] Makefile: do not repeat $(CONFIG_SOFTMMU) in hw/Makefile.objs
Quoted 71 lines · Paolo Bonzini
The device directories must be included only for softmmu builds. Instead of repeating $(CONFIG_SOFTMMU), use an "ifeq".
Signed-off-by Paolo Bonzini <[email protected]>--- hw/Makefile.objs | 61 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 29 deletions(-)hw/Makefile.objs +26
-24@@ -1,42 +1,45 @@ +devices-dirs-y = core/ +ifeq ($(CONFIG_SOFTMMU), y) devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/ -devices-dirs-$(CONFIG_SOFTMMU) += acpi/ -devices-dirs-$(CONFIG_SOFTMMU) += adc/ -devices-dirs-$(CONFIG_SOFTMMU) += audio/ -devices-dirs-$(CONFIG_SOFTMMU) += block/ -devices-dirs-$(CONFIG_SOFTMMU) += bt/ -devices-dirs-$(CONFIG_SOFTMMU) += char/ -devices-dirs-$(CONFIG_SOFTMMU) += cpu/ -devices-dirs-$(CONFIG_SOFTMMU) += display/ -devices-dirs-$(CONFIG_SOFTMMU) += dma/ -devices-dirs-$(CONFIG_SOFTMMU) += gpio/ +devices-dirs-y += acpi/ +devices-dirs-y += adc/ +devices-dirs-y += audio/ +devices-dirs-y += block/ +devices-dirs-y += bt/ +devices-dirs-y += char/ +devices-dirs-y += cpu/ +devices-dirs-y += display/ +devices-dirs-y += dma/ +devices-dirs-y += gpio/ devices-dirs-$(CONFIG_HYPERV) += hyperv/ devices-dirs-$(CONFIG_I2C) += i2c/ -devices-dirs-$(CONFIG_SOFTMMU) += ide/ -devices-dirs-$(CONFIG_SOFTMMU) += input/ -devices-dirs-$(CONFIG_SOFTMMU) += intc/ +devices-dirs-y += ide/ +devices-dirs-y += input/ +devices-dirs-y += intc/ devices-dirs-$(CONFIG_IPACK) += ipack/ devices-dirs-$(CONFIG_IPMI) += ipmi/ -devices-dirs-$(CONFIG_SOFTMMU) += isa/ -devices-dirs-$(CONFIG_SOFTMMU) += misc/ -devices-dirs-$(CONFIG_SOFTMMU) += net/ -devices-dirs-$(CONFIG_SOFTMMU) += rdma/ -devices-dirs-$(CONFIG_SOFTMMU) += nvram/ -devices-dirs-$(CONFIG_SOFTMMU) += pci/ +devices-dirs-y += isa/ +devices-dirs-y += misc/ +devices-dirs-y += net/ +devices-dirs-y += rdma/ +devices-dirs-y += nvram/ +devices-dirs-y += pci/ devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/ -devices-dirs-$(CONFIG_SOFTMMU) += pcmcia/ +devices-dirs-y += pcmcia/ devices-dirs-$(CONFIG_SCSI) += scsi/ -devices-dirs-$(CONFIG_SOFTMMU) += sd/ -devices-dirs-$(CONFIG_SOFTMMU) += ssi/ -devices-dirs-$(CONFIG_SOFTMMU) += timer/ +devices-dirs-y += sd/ +devices-dirs-y += ssi/ +devices-dirs-y += timer/ devices-dirs-$(CONFIG_TPM) += tpm/ -devices-dirs-$(CONFIG_SOFTMMU) += usb/ +devices-dirs-y += usb/
hw/Makefile.objs line 40
Quoted 10 lines
hw/Makefile.objs +3
-4devices-dirs-$(CONFIG_VFIO) += vfio/ -devices-dirs-$(CONFIG_SOFTMMU) += virtio/ -devices-dirs-$(CONFIG_SOFTMMU) += watchdog/ -devices-dirs-$(CONFIG_SOFTMMU) += xen/ +devices-dirs-y += virtio/ +devices-dirs-y += watchdog/ +devices-dirs-y += xen/ devices-dirs-$(CONFIG_MEM_DEVICE) += mem/ -devices-dirs-$(CONFIG_SOFTMMU) += smbios/ devices-dirs-y += semihosting/
This one is now conditional on CONFIG_SOFTMMU. Intentional?
Quoted 6 lines
hw/Makefile.objs +3
-1-devices-dirs-y += core/ +devices-dirs-y += smbios/ +endif + common-obj-y += $(devices-dirs-y) obj-y += $(devices-dirs-y)
PATCH 2/2 create_config: remove $(CONFIG_SOFTMMU) hack
In reply to Paolo BonziniCONFIG_TPM is defined to a rather weird $(CONFIG_SOFTMMU) so that it expands to the right thing in hw/Makefile.objs. This however is not needed anymore and it has a corresponding hack in create_config to turn it into "#define CONFIG_TPM 1". Clean up.
--- configure | 2 +- scripts/create_config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
configure +1 -1
@@ -7159,7 +7159,7 @@ if test "$live_block_migration" = "yes" ; then fi if test "$tpm" = "yes"; then - echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak + echo 'CONFIG_TPM=y' >> $config_host_mak fi echo "TRACE_BACKENDS=$trace_backends" >> $config_host_mak
scripts/create_config +1 -1
@@ -54,7 +54,7 @@ case $line in done echo " NULL" ;; - CONFIG_*='$(CONFIG_SOFTMMU)'|CONFIG_*=y) # configuration + CONFIG_*=y) # configuration name=${line%=*} echo "#define $name 1" ;;
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 2/2] create_config: remove $(CONFIG_SOFTMMU) hack
Quoted 30 lines · Paolo Bonzini
CONFIG_TPMis defined to a rather weird $(CONFIG_SOFTMMU) so that it expands to the right thing in hw/Makefile.objs. This however is not needed anymore and it has a corresponding hack increate_configto turn it into "#defineCONFIG_TPM1". Clean up.Signed-off-by Paolo Bonzini <[email protected]>--- configure | 2 +- scripts/create_config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)configure +1
-1@@ -7159,7 +7159,7 @@ if test "$live_block_migration" = "yes" ; then fi if test "$tpm" = "yes"; then - echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak + echo 'CONFIG_TPM=y' >> $config_host_mak fi echo "TRACE_BACKENDS=$trace_backends" >> $config_host_makscripts/create_config +0
-0
scripts/create_config case $line in · line 60
Quoted 8 lines
scripts/create_config +1
-1@@ -54,7 +54,7 @@ case $line in done echo " NULL" ;; - CONFIG_*='$(CONFIG_SOFTMMU)'|CONFIG_*=y) # configuration + CONFIG_*=y) # configuration name=${line%=*} echo "#define $name 1" ;;
Re: [Qemu-devel] [PATCH 2/2] create_config: remove $(CONFIG_SOFTMMU) hack
In reply to Paolo Bonzinilgtm, thanks Paolo
Quoted 37 lines · Paolo Bonzini
CONFIG_TPMis defined to a rather weird $(CONFIG_SOFTMMU) so that it expands to the right thing in hw/Makefile.objs. This however is not needed anymore and it has a corresponding hack increate_configto turn it into "#defineCONFIG_TPM1". Clean up.Signed-off-by Paolo Bonzini <[email protected]>--- configure | 2 +- scripts/create_config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)configure +1
-1@@ -7159,7 +7159,7 @@ if test "$live_block_migration" = "yes" ; then fi if test "$tpm" = "yes"; then - echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak + echo 'CONFIG_TPM=y' >> $config_host_mak fi echo "TRACE_BACKENDS=$trace_backends" >> $config_host_makscripts/create_config +1
-1@@ -54,7 +54,7 @@ case $line in done echo " NULL" ;; - CONFIG_*='$(CONFIG_SOFTMMU)'|CONFIG_*=y) # configuration + CONFIG_*=y) # configuration name=${line%=*} echo "#define $name 1" ;;