Skip to contentSkip to conversation

Compile only devices that are used

PATCH In review Juan Quintela 2 participants 33 messages Oct 7, 2009 – Oct 9, 2009 Kbuild

lore
Share & tools
lore
#1 lore raw

PATCH v5 1/31 Don't include config-host.mak from inside config.mak

In reply to Juan Quintela

Include it directly in Makefile.target

---
 Makefile.target |    1 +
 configure       |    2 --
 2 files changed, 1 insertions(+), 2 deletions(-)
Makefile.target +1 -0
index 1f4518c..9793b03 100644
@@ -1,5 +1,6 @@
 # -*- Mode: makefile -*-
 
+include ../config-host.mak
 include config.mak
 include $(SRC_PATH)/rules.mak
 
configure +0 -2
index ad04880..ed5d7d6 100755
@@ -2147,8 +2147,6 @@ ln -s $source_path/Makefile.target $target_dir/Makefile
 
 echo "# Automatically generated by configure - do not modify" > $config_mak
 
-echo "include ../config-host.mak" >> $config_mak
-
 bflt="no"
 elfload32="no"
 target_nptl="no"
Signature · 1 line
1.6.2.5
#0 lore raw

v5 cover Compile only devices that are used

The new config file version! .... (again)
This time works!

v5:
Found problem why it failed to compile some times.
We moved config.h from target directory to home directory. If you find that compilation don't work you have to:
make distclean (this remove target directories)
rm -f */config.* (this remove the conflictiong files)
Why did the files got renamed? Because now we put more stuff inside that file, and it is better to have to do a make distclean that search and replace s/config.h/config-other-name.h/ in all files.

Once that I fixed the build problems, just created again config-devices.h it is always included by default.
Important bit is:
#if defined(NEED_CPU_H)
#include "config-devices.h"
#else
#include "config-all-devices.h"
#endif

I have a different name for the all devices include files that for the target one, reason for this is that we don't want to trust the patch to find the right file.

I tested that all archs compiled as expected compiling them separately, i.e. ./confige --target-list=i386-softmmu
repeat for all architectures. This made me fix a cople of errors in the previous version. Compiled in place and in an external directory, Everything worked.

v4: Now creation of config-host.h and config-target.h fixed
(many thanks to Paolo Bonzini)

v3:
- Now we have a config file by target!!!
- We have configure tool to choose what drivers to compile
vi <target>/config-devices.mak
- We have another nice tool to check if a config file is valid
make: if it compiles, it is good, otherwise go to previous step
- Renamed config.h/config.mak to config-target.h and config-target.{h,mak} now config.h is not generated, and we can put more stuff there
- I did a go at trying to create config-devices.h, but it is _interesting_ as we have different names, and have to put one of the files. That is the reason why I did the automatic generation of *.h files from *.mak files.
- I switched previus patches to this new series.

ToDo:
- there is still a bug when compiling with make -j<n>, sometimes it don't generate config-host.h. Still haven't been able to catch why. Normally it works, that is the reason why it is not esay to find what is wrong.
- Pass more stuff to that configuration files.

Comments?

v2:
- ptimer is also used in sparc64 (Blue Swirl)
- generate and compile gdbstub-xml only when needed.

v1:
This series disable complilation of devices that are not used in any of the selected targets. Patch series remove all the devices that are not used for x86_64/i386-softmmu alone. If you also compiles the softmmu targets that need them, they are compiled back in.

I sent similar patches to this series a couple of months ago. The big different (for those with good memory) is that now I don't move devices from Makefile.hw and Makefile to Makefile.target. I just enable/disable them with CONFIG_FOO and normal building system.

I didn't do it for other platform because I don't have an easy way to test that I haven't broke anything. Anyone that uses other platform can do the same simplification there.

Juan Quintela (31):
Don't include config-host.mak from inside config.mak Move generation of config-host.h to Makefile from configure Remove useless check for config-host.mak
Rename config.{h,mak} config-target.{h,mak}
Move generation of config-target.h to Makefile from configure Add new config-devices.mak for each target
Generate config-devices.h
Generate gdbstub-xml.c only when needed
Only compile usb_ohci when one target uses it
Only compile isa_mmio when one target uses it
Only compile qdev_addr when one target uses it
Only compile nand when one target uses it
Only compile ecc when one target uses it
Only compile esp when one target uses it
Only compile escc when one target uses it
Only compile m48t59 when one target uses it
Only compile ptimer when one target uses it
Only compile sd when one target uses it
Only compile max7310 when one target uses it
Only compile wm8750 when one target uses it
Only compile twl92230 when one target uses it
Only compile tsc2005 when one target uses it
Only compile lm832x when one target uses it
Only compile tmp105 when one target uses it
Only compile stellaris_input when one target uses it Only compile sd0303 when one target uses it
Only compile sd0323 when one target uses it
Only compile ads7846 when one target uses it
Only compile max111x when one target uses it
Only compile ssi-sd when one target uses it
Only compile ssi when one target uses it

 .gitignore                                 |    3 +
 Makefile                                   |   57 ++++++++---
 Makefile.hw                                |   13 ++-
 Makefile.target                            |   33 ++++---
 config.h                                   |   13 +++
 configure                                  |  140 +++++++++++-----------------
 create_config                              |    2 +
 default-configs/alpha-linux-user.mak       |    1 +
 default-configs/arm-linux-user.mak         |    3 +
 default-configs/arm-softmmu.mak            |   22 +++++
 default-configs/armeb-linux-user.mak       |    3 +
 default-configs/cris-linux-user.mak        |    1 +
 default-configs/cris-softmmu.mak           |    4 +
 default-configs/i386-bsd-user.mak          |    1 +
 default-configs/i386-darwin-user.mak       |    1 +
 default-configs/i386-linux-user.mak        |    1 +
 default-configs/i386-softmmu.mak           |    1 +
 default-configs/m68k-linux-user.mak        |    3 +
 default-configs/m68k-softmmu.mak           |    4 +
 default-configs/microblaze-linux-user.mak  |    1 +
 default-configs/microblaze-softmmu.mak     |    3 +
 default-configs/mips-linux-user.mak        |    1 +
 default-configs/mips-softmmu.mak           |    4 +
 default-configs/mips64-softmmu.mak         |    4 +
 default-configs/mips64el-softmmu.mak       |    4 +
 default-configs/mipsel-linux-user.mak      |    1 +
 default-configs/mipsel-softmmu.mak         |    4 +
 default-configs/ppc-darwin-user.mak        |    3 +
 default-configs/ppc-linux-user.mak         |    3 +
 default-configs/ppc-softmmu.mak            |    7 ++
 default-configs/ppc64-linux-user.mak       |    3 +
 default-configs/ppc64-softmmu.mak          |    7 ++
 default-configs/ppc64abi32-linux-user.mak  |    3 +
 default-configs/ppcemb-softmmu.mak         |    7 ++
 default-configs/sh4-linux-user.mak         |    1 +
 default-configs/sh4-softmmu.mak            |    4 +
 default-configs/sh4eb-linux-user.mak       |    1 +
 default-configs/sh4eb-softmmu.mak          |    4 +
 default-configs/sparc-bsd-user.mak         |    1 +
 default-configs/sparc-linux-user.mak       |    1 +
 default-configs/sparc-softmmu.mak          |    8 ++
 default-configs/sparc32plus-linux-user.mak |    1 +
 default-configs/sparc64-bsd-user.mak       |    1 +
 default-configs/sparc64-linux-user.mak     |    1 +
 default-configs/sparc64-softmmu.mak        |    5 +
 default-configs/x86_64-bsd-user.mak        |    1 +
 default-configs/x86_64-linux-user.mak      |    1 +
 default-configs/x86_64-softmmu.mak         |    1 +
 rules.mak                                  |    9 ++
 49 files changed, 282 insertions(+), 119 deletions(-)
 create mode 100644 config.h
 create mode 100644 default-configs/alpha-linux-user.mak
 create mode 100644 default-configs/arm-linux-user.mak
 create mode 100644 default-configs/arm-softmmu.mak
 create mode 100644 default-configs/armeb-linux-user.mak
 create mode 100644 default-configs/cris-linux-user.mak
 create mode 100644 default-configs/cris-softmmu.mak
 create mode 100644 default-configs/i386-bsd-user.mak
 create mode 100644 default-configs/i386-darwin-user.mak
 create mode 100644 default-configs/i386-linux-user.mak
 create mode 100644 default-configs/i386-softmmu.mak
 create mode 100644 default-configs/m68k-linux-user.mak
 create mode 100644 default-configs/m68k-softmmu.mak
 create mode 100644 default-configs/microblaze-linux-user.mak
 create mode 100644 default-configs/microblaze-softmmu.mak
 create mode 100644 default-configs/mips-linux-user.mak
 create mode 100644 default-configs/mips-softmmu.mak
 create mode 100644 default-configs/mips64-softmmu.mak
 create mode 100644 default-configs/mips64el-softmmu.mak
 create mode 100644 default-configs/mipsel-linux-user.mak
 create mode 100644 default-configs/mipsel-softmmu.mak
 create mode 100644 default-configs/ppc-darwin-user.mak
 create mode 100644 default-configs/ppc-linux-user.mak
 create mode 100644 default-configs/ppc-softmmu.mak
 create mode 100644 default-configs/ppc64-linux-user.mak
 create mode 100644 default-configs/ppc64-softmmu.mak
 create mode 100644 default-configs/ppc64abi32-linux-user.mak
 create mode 100644 default-configs/ppcemb-softmmu.mak
 create mode 100644 default-configs/sh4-linux-user.mak
 create mode 100644 default-configs/sh4-softmmu.mak
 create mode 100644 default-configs/sh4eb-linux-user.mak
 create mode 100644 default-configs/sh4eb-softmmu.mak
 create mode 100644 default-configs/sparc-bsd-user.mak
 create mode 100644 default-configs/sparc-linux-user.mak
 create mode 100644 default-configs/sparc-softmmu.mak
 create mode 100644 default-configs/sparc32plus-linux-user.mak
 create mode 100644 default-configs/sparc64-bsd-user.mak
 create mode 100644 default-configs/sparc64-linux-user.mak
 create mode 100644 default-configs/sparc64-softmmu.mak
 create mode 100644 default-configs/x86_64-bsd-user.mak
 create mode 100644 default-configs/x86_64-linux-user.mak
 create mode 100644 default-configs/x86_64-softmmu.mak
#2 lore raw

PATCH v5 2/31 Move generation of config-host.h to Makefile from configure

Use timestamp based appreach to avoid not needed recompilation. Add it to rules.mak

Many thanks to Paolo Bonzini for helpding the design, and the debug.

---
 Makefile      |   13 +++++++++----
 configure     |   20 +-------------------
 create_config |    2 ++
 rules.mak     |    9 +++++++++
 4 files changed, 21 insertions(+), 23 deletions(-)
Makefile +9 -4
index c552739..144b392 100644
@@ -29,7 +29,10 @@ else
 DOCS=
 endif
 
-build-all: $(TOOLS) $(DOCS) recurse-all
+SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
+
+build-all: config-host.h
+	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)
 
 config-host.mak: configure
 ifneq ($(wildcard config-host.mak),)
@@ -37,10 +40,12 @@ ifneq ($(wildcard config-host.mak),)
 	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
 endif
 
-SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
+config-host.h: config-host.h-timestamp
+config-host.h-timestamp: config-host.mak
+
 SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
 
-subdir-%:
+subdir-%: config-host.h
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
 
 $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
@@ -200,7 +205,7 @@ clean:
         done
 
 distclean: clean
-	rm -f config-host.mak config-host.h config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
+	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
 	rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
 	for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
 	rm -rf $$d || exit 1 ; \
configure +1 -19
index ed5d7d6..fd3cb24 100755
@@ -1800,13 +1800,8 @@ echo "-> Your SDL version is too old - please upgrade to have SDL support"
 fi
 
 config_host_mak="config-host.mak"
-config_host_h="config-host.h"
 config_host_ld="config-host.ld"
 
-#echo "Creating $config_host_mak and $config_host_h"
-
-test -f $config_host_h && mv $config_host_h ${config_host_h}~
-
 echo "# Automatically generated by configure - do not modify" > $config_host_mak
 printf "# Configured with:" >> $config_host_mak
 printf " '%s'" "$0" "$@" >> $config_host_mak
@@ -2064,18 +2059,6 @@ echo "LIBS+=$LIBS" >> $config_host_mak
 echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak
 echo "EXESUF=$EXESUF" >> $config_host_mak
 
-echo "/* Automatically generated by configure - do not modify */" > $config_host_h
-
-/bin/sh $source_path/create_config < $config_host_mak >> $config_host_h
-
-if test -f ${config_host_h}~ ; then
-  if cmp -s $config_host_h ${config_host_h}~ ; then
-    mv ${config_host_h}~ $config_host_h
-  else
-    rm ${config_host_h}~
-  fi
-fi
-
 # generate list of library paths for linker script
 
 $ld --verbose -v 2> /dev/null | grep SEARCH_DIR > ${config_host_ld}
@@ -2474,8 +2457,7 @@ fi
 echo "LDFLAGS+=$ldflags" >> $config_mak
 echo "QEMU_CFLAGS+=$cflags" >> $config_mak
 
-echo "/* Automatically generated by configure - do not modify */" > $config_h
-echo "#include \"../config-host.h\"" >> $config_h
+echo "#include \"../config-host.h\"" > $config_h
 
 /bin/sh $source_path/create_config < $config_mak >> $config_h
 
create_config +2 -0
index 5bc8fb6..30d0487 100755
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+echo "/* Automatically generated by create_config - do not modify */"
+
 while read line; do
 
 case $line in
rules.mak +9 -0
index b380903..ca95351 100644
@@ -35,3 +35,12 @@ quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
 
 cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
               >/dev/null 2>&1 && echo OK), $2, $3)
+
+# Generate timestamp files for .h include files
+
+%.h: %.h-timestamp
+	@test -f $@ || cp $< $@
+
+%.h-timestamp: %.mak
+	$(call quiet-command, $(SRC_PATH)/create_config < $< > $@, "  GEN   $*.h")
+	@cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h
Signature · 1 line
1.6.2.5
#4 lore raw

PATCH v5 3/31 Remove useless check for config-host.mak

In reply to Juan Quintela

If config-host.mak dont' exist, we have exited in the check at the beginning of the file.
Once here, move the bits to the else part of the test at the beginning of the file.

---
 Makefile |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
Makefile +3 -6
index 144b392..9169dd5 100644
@@ -5,6 +5,9 @@ ifneq ($(wildcard config-host.mak),)
 all: build-all
 include config-host.mak
 include $(SRC_PATH)/rules.mak
+config-host.mak: configure
+	@echo $@ is out-of-date, running configure
+	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
 else
 config-host.mak:
 	@echo "Please call configure before running make!"
@@ -34,12 +37,6 @@ SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
 build-all: config-host.h
 	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)
 
-config-host.mak: configure
-ifneq ($(wildcard config-host.mak),)
-	@echo $@ is out-of-date, running configure
-	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
-endif
-
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
 
Signature · 1 line
1.6.2.5
#5 lore raw

PATCH v5 4/31 Rename config.{h, mak} config-target.{h, mak}

In reply to Juan Quintela

Add config.h file that includes config-target.h and config-host.h

---
 .gitignore      |    1 +
 Makefile        |    2 +-
 Makefile.target |    2 +-
 config.h        |    3 +
 configure       |  116 +++++++++++++++++++++++++++---------------------------
 5 files changed, 64 insertions(+), 60 deletions(-)
 create mode 100644 config.h
.gitignore +1 -0
index ac2368b..7e6d844 100644
@@ -1,4 +1,5 @@
 config-host.*
+config-target.*
 i386
 *-softmmu
 *-darwin-user
Makefile +1 -1
index 9169dd5..519b936 100644
@@ -192,7 +192,7 @@ check-qdict: check-qdict.o qdict.o qint.o qstring.o qemu-malloc.o
 
 clean:
 # avoid old build problems by removing potentially incorrect old files
-	rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
+	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
 	rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
 	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
 	rm -f qemu-img-cmds.h
Makefile.target +1 -1
index 9793b03..5fe9c6e 100644
@@ -1,7 +1,7 @@
 # -*- Mode: makefile -*-
 
 include ../config-host.mak
-include config.mak
+include config-target.mak
 include $(SRC_PATH)/rules.mak
 
 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
config.h new file +3 -0
new file mode 100644
index 0000000..516acee
@@ -0,0 +1,3 @@
+
+#include "config-host.h"
+#include "config-target.h"
configure +58 -58

285 lines not on this page · raw message

Signature · 1 line
1.6.2.5
#6 lore raw

PATCH v5 5/31 Move generation of config-target.h to Makefile from configure

In reply to Juan Quintela
---
 Makefile.target |    7 ++++++-
 configure       |   17 -----------------
 2 files changed, 6 insertions(+), 18 deletions(-)
Makefile.target +6 -1
index 5fe9c6e..56567ee 100644
@@ -26,7 +26,12 @@ LIBS+=-lm
 
 kvm.o kvm-all.o: QEMU_CFLAGS+=$(KVM_CFLAGS)
 
-all: $(PROGS)
+config-target.h: config-target.h-timestamp
+config-target.h-timestamp: config-target.mak
+
+all: config-target.h
+	$(call quiet-command, $(MAKE) $(PROGS),)
+
 # Dummy command so that make thinks it has done something
 	@true
 
configure +0 -17
index dfc2818..70363be 100755
@@ -2074,7 +2074,6 @@ fi
 for target in $target_list; do
 target_dir="$target"
 config_target_mak=$target_dir/config-target.mak
-config_target_h=$target_dir/config-target.h
 target_arch2=`echo $target | cut -d '-' -f 1`
 target_bigendian="no"
 case "$target_arch2" in
@@ -2109,10 +2108,6 @@ case "$target" in
     ;;
 esac
 
-#echo "Creating $config_target_mak, $config_target_h and $target_dir/Makefile"
-
-test -f $config_target_h && mv $config_target_h ${config_target_h}~
-
 mkdir -p $target_dir
 mkdir -p $target_dir/fpu
 mkdir -p $target_dir/tcg
@@ -2457,18 +2452,6 @@ fi
 echo "LDFLAGS+=$ldflags" >> $config_target_mak
 echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak
 
-echo "#include \"../config-host.h\"" > $config_target_h
-
-/bin/sh $source_path/create_config < $config_target_mak >> $config_target_h
-
-if test -f ${config_target_h}~ ; then
-  if cmp -s $config_target_h ${config_target_h}~ ; then
-    mv ${config_target_h}~ $config_target_h
-  else
-    rm ${config_target_h}~
-  fi
-fi
-
 done # for target in $targets
 
 # build tree in object directory if source path is different from current one
Signature · 1 line
1.6.2.5
#8 lore raw

PATCH v5 7/31 Generate config-devices.h

In reply to Juan Quintela

Generate config-devices.h for each target and config-all-devices.h for common library. We don't want to name both config-devices.h to avoid path problems

---
 Makefile        |    7 +++++--
 Makefile.target |    5 ++++-
 config.h        |   10 ++++++++++
 3 files changed, 19 insertions(+), 3 deletions(-)
Makefile +5 -2
index c3df3b2..1f71057 100644
@@ -40,15 +40,18 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
 
 include config-all-devices.mak
 
-build-all: config-host.h
+build-all: config-host.h config-all-devices.h
 	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)
 
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
 
+config-all-devices.h: config-all-devices.h-timestamp
+config-all-devices.h-timestamp: config-all-devices.mak
+
 SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
 
-subdir-%: config-host.h
+subdir-%: config-host.h config-all-devices.h
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
 
 $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
Makefile.target +4 -1
index 1f2f9bc..191d979 100644
@@ -30,7 +30,10 @@ kvm.o kvm-all.o: QEMU_CFLAGS+=$(KVM_CFLAGS)
 config-target.h: config-target.h-timestamp
 config-target.h-timestamp: config-target.mak
 
-all: config-target.h
+config-devices.h: config-devices.h-timestamp
+config-devices.h-timestamp: config-devices.mak
+
+all: config-target.h config-devices.h
 	$(call quiet-command, $(MAKE) $(PROGS),)
 
 # Dummy command so that make thinks it has done something
config.h +10 -0
index 516acee..07d79d4 100644
@@ -1,3 +1,13 @@
 
 #include "config-host.h"
 #include "config-target.h"
+
+/* We want to include different config files for specific targets
+   And for the common library.  They need a different name because
+   we don't want to rely in paths */
+
+#if defined(NEED_CPU_H)
+#include "config-devices.h"
+#else
+#include "config-all-devices.h"
+#endif
Signature · 1 line
1.6.2.5
#7 lore raw

PATCH v5 6/31 Add new config-devices.mak for each target

In reply to Juan Quintela

We generate config-devices.h from there automatically.
We need to do it in main Makefile, because we are going to need a main Makefile for them.

---
 .gitignore                                 |    2 ++
 Makefile                                   |    7 +++++++
 Makefile.hw                                |    1 +
 Makefile.target                            |    1 +
 configure                                  |    5 +++++
 default-configs/alpha-linux-user.mak       |    1 +
 default-configs/arm-linux-user.mak         |    1 +
 default-configs/arm-softmmu.mak            |    1 +
 default-configs/armeb-linux-user.mak       |    1 +
 default-configs/cris-linux-user.mak        |    1 +
 default-configs/cris-softmmu.mak           |    1 +
 default-configs/i386-bsd-user.mak          |    1 +
 default-configs/i386-darwin-user.mak       |    1 +
 default-configs/i386-linux-user.mak        |    1 +
 default-configs/i386-softmmu.mak           |    1 +
 default-configs/m68k-linux-user.mak        |    1 +
 default-configs/m68k-softmmu.mak           |    1 +
 default-configs/microblaze-linux-user.mak  |    1 +
 default-configs/microblaze-softmmu.mak     |    1 +
 default-configs/mips-linux-user.mak        |    1 +
 default-configs/mips-softmmu.mak           |    1 +
 default-configs/mips64-softmmu.mak         |    1 +
 default-configs/mips64el-softmmu.mak       |    1 +
 default-configs/mipsel-linux-user.mak      |    1 +
 default-configs/mipsel-softmmu.mak         |    1 +
 default-configs/ppc-darwin-user.mak        |    1 +
 default-configs/ppc-linux-user.mak         |    1 +
 default-configs/ppc-softmmu.mak            |    1 +
 default-configs/ppc64-linux-user.mak       |    1 +
 default-configs/ppc64-softmmu.mak          |    1 +
 default-configs/ppc64abi32-linux-user.mak  |    1 +
 default-configs/ppcemb-softmmu.mak         |    1 +
 default-configs/sh4-linux-user.mak         |    1 +
 default-configs/sh4-softmmu.mak            |    1 +
 default-configs/sh4eb-linux-user.mak       |    1 +
 default-configs/sh4eb-softmmu.mak          |    1 +
 default-configs/sparc-bsd-user.mak         |    1 +
 default-configs/sparc-linux-user.mak       |    1 +
 default-configs/sparc-softmmu.mak          |    1 +
 default-configs/sparc32plus-linux-user.mak |    1 +
 default-configs/sparc64-bsd-user.mak       |    1 +
 default-configs/sparc64-linux-user.mak     |    1 +
 default-configs/sparc64-softmmu.mak        |    1 +
 default-configs/x86_64-bsd-user.mak        |    1 +
 default-configs/x86_64-linux-user.mak      |    1 +
 default-configs/x86_64-softmmu.mak         |    1 +
 46 files changed, 57 insertions(+), 0 deletions(-)
 create mode 100644 default-configs/alpha-linux-user.mak
 create mode 100644 default-configs/arm-linux-user.mak
 create mode 100644 default-configs/arm-softmmu.mak
 create mode 100644 default-configs/armeb-linux-user.mak
 create mode 100644 default-configs/cris-linux-user.mak
 create mode 100644 default-configs/cris-softmmu.mak
 create mode 100644 default-configs/i386-bsd-user.mak
 create mode 100644 default-configs/i386-darwin-user.mak
 create mode 100644 default-configs/i386-linux-user.mak
 create mode 100644 default-configs/i386-softmmu.mak
 create mode 100644 default-configs/m68k-linux-user.mak
 create mode 100644 default-configs/m68k-softmmu.mak
 create mode 100644 default-configs/microblaze-linux-user.mak
 create mode 100644 default-configs/microblaze-softmmu.mak
 create mode 100644 default-configs/mips-linux-user.mak
 create mode 100644 default-configs/mips-softmmu.mak
 create mode 100644 default-configs/mips64-softmmu.mak
 create mode 100644 default-configs/mips64el-softmmu.mak
 create mode 100644 default-configs/mipsel-linux-user.mak
 create mode 100644 default-configs/mipsel-softmmu.mak
 create mode 100644 default-configs/ppc-darwin-user.mak
 create mode 100644 default-configs/ppc-linux-user.mak
 create mode 100644 default-configs/ppc-softmmu.mak
 create mode 100644 default-configs/ppc64-linux-user.mak
 create mode 100644 default-configs/ppc64-softmmu.mak
 create mode 100644 default-configs/ppc64abi32-linux-user.mak
 create mode 100644 default-configs/ppcemb-softmmu.mak
 create mode 100644 default-configs/sh4-linux-user.mak
 create mode 100644 default-configs/sh4-softmmu.mak
 create mode 100644 default-configs/sh4eb-linux-user.mak
 create mode 100644 default-configs/sh4eb-softmmu.mak
 create mode 100644 default-configs/sparc-bsd-user.mak
 create mode 100644 default-configs/sparc-linux-user.mak
 create mode 100644 default-configs/sparc-softmmu.mak
 create mode 100644 default-configs/sparc32plus-linux-user.mak
 create mode 100644 default-configs/sparc64-bsd-user.mak
 create mode 100644 default-configs/sparc64-linux-user.mak
 create mode 100644 default-configs/sparc64-softmmu.mak
 create mode 100644 default-configs/x86_64-bsd-user.mak
 create mode 100644 default-configs/x86_64-linux-user.mak
 create mode 100644 default-configs/x86_64-softmmu.mak
.gitignore +2 -0
index 7e6d844..cdd6aad 100644
@@ -1,3 +1,5 @@
+config-devices.*
+config-all-devices.*
 config-host.*
 config-target.*
 i386
Makefile +7 -0
index 519b936..c3df3b2 100644
@@ -33,6 +33,12 @@ DOCS=
 endif
 
 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
+SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
+
+config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
+	$(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep "=y$$" | sort -u > $@,"  GEN  $@")
+
+include config-all-devices.mak
 
 build-all: config-host.h
 	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)
@@ -203,6 +209,7 @@ clean:
 
 distclean: clean
 	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
+	rm -f config-all-devices.mak config-all-devices.h*
 	rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
 	for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
 	rm -rf $$d || exit 1 ; \
Makefile.hw +1 -0
index 830902b..2b4ef03 100644
@@ -1,6 +1,7 @@
 # Makefile for qemu target independent devices.
 
 include ../config-host.mak
+include ../config-all-devices.mak
 include config.mak
 include $(SRC_PATH)/rules.mak
 
Makefile.target +1 -0
index 56567ee..1f2f9bc 100644
@@ -1,6 +1,7 @@
 # -*- Mode: makefile -*-
 
 include ../config-host.mak
+include config-devices.mak
 include config-target.mak
 include $(SRC_PATH)/rules.mak
 
configure +5 -0
index 70363be..0cb4326 100755
@@ -2076,6 +2076,7 @@ target_dir="$target"
 config_target_mak=$target_dir/config-target.mak
 target_arch2=`echo $target | cut -d '-' -f 1`
 target_bigendian="no"
+
 case "$target_arch2" in
   armeb|m68k|microblaze|mips|mipsn32|mips64|ppc|ppcemb|ppc64|ppc64abi32|sh4eb|sparc|sparc64|sparc32plus)
   target_bigendian=yes
@@ -2116,6 +2117,10 @@ if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" -o "$targ
   mkdir -p $target_dir/nwfpe
 fi
 
+if test ! -f $target_dir/config-devices.mak ; then
+  cp $source_path/default-configs/${target}.mak $target_dir/config-devices.mak
+fi
+
 #
 # don't use ln -sf as not all "ln -sf" over write the file/link
 #
default-configs/alpha-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..7956e29
@@ -0,0 +1 @@
+# Default configuration for alpha-linux-user
default-configs/arm-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..413361a
@@ -0,0 +1 @@
+# Default configuration for arm-linux-user
default-configs/arm-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..372a549
@@ -0,0 +1 @@
+# Default configuration for arm-softmmu
default-configs/armeb-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..bf2ffe7
@@ -0,0 +1 @@
+# Default configuration for armeb-linux-user
default-configs/cris-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..e3aec7b
@@ -0,0 +1 @@
+# Default configuration for cris-linux-user
default-configs/cris-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..3726699
@@ -0,0 +1 @@
+# Default configuration for cris-softmmu
default-configs/i386-bsd-user.mak new file +1 -0
new file mode 100644
index 0000000..af1b31a
@@ -0,0 +1 @@
+# Default configuration for i386-bsd-user
default-configs/i386-darwin-user.mak new file +1 -0
new file mode 100644
index 0000000..19afd3d
@@ -0,0 +1 @@
+# Default configuration for i386-darwin-user
default-configs/i386-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..8657e68
@@ -0,0 +1 @@
+# Default configuration for i386-linux-user
default-configs/i386-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..15586a0
@@ -0,0 +1 @@
+# Default configuration for i386-softmmu
default-configs/m68k-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..06cd5ed
@@ -0,0 +1 @@
+# Default configuration for m68k-linux-user
default-configs/m68k-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..572b868
@@ -0,0 +1 @@
+# Default configuration for m68k-softmmu
default-configs/microblaze-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..566fdc0
@@ -0,0 +1 @@
+# Default configuration for microblaze-linux-user
default-configs/microblaze-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..c42009d
@@ -0,0 +1 @@
+# Default configuration for microblaze-softmmu
default-configs/mips-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..31df570
@@ -0,0 +1 @@
+# Default configuration for mips-linux-user
default-configs/mips-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..a9e89ec
@@ -0,0 +1 @@
+# Default configuration for mips-softmmu
default-configs/mips64-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..4211452
@@ -0,0 +1 @@
+# Default configuration for mips64-softmmu
default-configs/mips64el-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..8ca46a2
@@ -0,0 +1 @@
+# Default configuration for mips64el-softmmu
default-configs/mipsel-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..4d0e4af
@@ -0,0 +1 @@
+# Default configuration for mipsel-linux-user
default-configs/mipsel-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..fe8af41
@@ -0,0 +1 @@
+# Default configuration for mipsel-softmmu
default-configs/ppc-darwin-user.mak new file +1 -0
new file mode 100644
index 0000000..117f176
@@ -0,0 +1 @@
+# Default configuration for ppc-darwin-user
default-configs/ppc-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..6273df2
@@ -0,0 +1 @@
+# Default configuration for ppc-linux-user
default-configs/ppc-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..ba80ba2
@@ -0,0 +1 @@
+# Default configuration for ppc-softmmu
default-configs/ppc64-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..422d3fb
@@ -0,0 +1 @@
+# Default configuration for ppc64-linux-user
default-configs/ppc64-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..0b72c70
@@ -0,0 +1 @@
+# Default configuration for ppc64-softmmu
default-configs/ppc64abi32-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..1c657ec
@@ -0,0 +1 @@
+# Default configuration for ppc64abi32-linux-user
default-configs/ppcemb-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..951bfa0
@@ -0,0 +1 @@
+# Default configuration for ppcemb-softmmu
default-configs/sh4-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..a469e19
@@ -0,0 +1 @@
+# Default configuration for sh4-linux-user
default-configs/sh4-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..4466835
@@ -0,0 +1 @@
+# Default configuration for sh4-softmmu
default-configs/sh4eb-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..be08ca1
@@ -0,0 +1 @@
+# Default configuration for sh4eb-linux-user
default-configs/sh4eb-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..2f60e53
@@ -0,0 +1 @@
+# Default configuration for sh4eb-softmmu
default-configs/sparc-bsd-user.mak new file +1 -0
new file mode 100644
index 0000000..21e0950
@@ -0,0 +1 @@
+# Default configuration for sparc-bsd-user
default-configs/sparc-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..9c716d1
@@ -0,0 +1 @@
+# Default configuration for sparc-linux-user
default-configs/sparc-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..2e0e621
@@ -0,0 +1 @@
+# Default configuration for sparc-softmmu
default-configs/sparc32plus-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..432e880
@@ -0,0 +1 @@
+# Default configuration for sparc32plus-linux-user
default-configs/sparc64-bsd-user.mak new file +1 -0
new file mode 100644
index 0000000..b8b9eea
@@ -0,0 +1 @@
+# Default configuration for sparc64-bsd-user
default-configs/sparc64-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..bf1bdd6
@@ -0,0 +1 @@
+# Default configuration for sparc64-linux-user
default-configs/sparc64-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..fead2ea
@@ -0,0 +1 @@
+# Default configuration for sparc64-softmmu
default-configs/x86_64-bsd-user.mak new file +1 -0
new file mode 100644
index 0000000..73e5d34
@@ -0,0 +1 @@
+# Default configuration for x86_64-bsd-user
default-configs/x86_64-linux-user.mak new file +1 -0
new file mode 100644
index 0000000..bec1d9e
@@ -0,0 +1 @@
+# Default configuration for x86_64-linux-user
default-configs/x86_64-softmmu.mak new file +1 -0
new file mode 100644
index 0000000..ec98af2
@@ -0,0 +1 @@
+# Default configuration for x86_64-softmmu
Signature · 1 line
1.6.2.5
#9 lore raw

PATCH v5 8/31 Generate gdbstub-xml.c only when needed

In reply to Juan Quintela

First user of new config-devices.mak

---
 Makefile.target                           |   14 ++++++--------
 configure                                 |    2 +-
 default-configs/arm-linux-user.mak        |    2 ++
 default-configs/arm-softmmu.mak           |    2 ++
 default-configs/armeb-linux-user.mak      |    2 ++
 default-configs/m68k-linux-user.mak       |    2 ++
 default-configs/m68k-softmmu.mak          |    2 ++
 default-configs/ppc-darwin-user.mak       |    2 ++
 default-configs/ppc-linux-user.mak        |    2 ++
 default-configs/ppc-softmmu.mak           |    2 ++
 default-configs/ppc64-linux-user.mak      |    2 ++
 default-configs/ppc64-softmmu.mak         |    2 ++
 default-configs/ppc64abi32-linux-user.mak |    2 ++
 default-configs/ppcemb-softmmu.mak        |    2 ++
 14 files changed, 31 insertions(+), 9 deletions(-)
Makefile.target +6 -8
index 191d979..debe0e4 100644
@@ -91,7 +91,7 @@ ifdef CONFIG_LINUX_USER
 VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
 QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
 obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
-      elfload.o linuxload.o uaccess.o gdbstub.o gdbstub-xml.o
+      elfload.o linuxload.o uaccess.o gdbstub.o
 
 obj-$(TARGET_HAS_BFLT) += flatload.o
 obj-$(TARGET_HAS_ELFLOAD32) += elfload32.o
@@ -125,7 +125,7 @@ LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
 LIBS+=-lmx
 
 obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
-        gdbstub.o gdbstub-xml.o
+        gdbstub.o
 
 obj-i386-y += ioport-user.o
 
@@ -142,7 +142,7 @@ VPATH+=:$(SRC_PATH)/bsd-user
 QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
 
 obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
-        gdbstub.o gdbstub-xml.o uaccess.o
+        gdbstub.o uaccess.o
 
 obj-i386-y += ioport-user.o
 
@@ -155,7 +155,7 @@ endif #CONFIG_BSD_USER
 ifdef CONFIG_SOFTMMU
 
 obj-y = vl.o monitor.o pci.o isa_mmio.o machine.o \
-        gdbstub.o gdbstub-xml.o
+        gdbstub.o
 # virtio has to be here due to weird dependency between PCI and virtio-net.
 # need to fix this properly
 obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o virtio-pci.o
@@ -306,16 +306,14 @@ ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
 
 endif # CONFIG_SOFTMMU
 
+obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
+
 $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) $(ARLIBS)
 	$(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y))
 
 
 gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh
-ifeq ($(TARGET_XML_FILES),)
-	$(call quiet-command,rm -f $@ && echo > $@,"  GEN   $(TARGET_DIR)$@")
-else
 	$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES),"  GEN   $(TARGET_DIR)$@")
-endif
 
 qemu-options.h: $(SRC_PATH)/qemu-options.hx
 	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
configure +1 -1
index 0cb4326..5c09c05 100755
@@ -2302,8 +2302,8 @@ if test ! -z "$gdb_xml_files" ; then
   for x in $gdb_xml_files; do
     list="$list $source_path/gdb-xml/$x"
   done
+  echo "TARGET_XML_FILES=$list" >> $config_target_mak
 fi
-echo "TARGET_XML_FILES=$list" >> $config_target_mak
 
 case "$target_arch2" in
   arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|sparc|sparc64|sparc32plus)
default-configs/arm-linux-user.mak +2 -0
index 413361a..46d4aa2 100644
@@ -1 +1,3 @@
 # Default configuration for arm-linux-user
+
+CONFIG_GDBSTUB_XML=y
default-configs/arm-softmmu.mak +2 -0
index 372a549..2786138 100644
@@ -1 +1,3 @@
 # Default configuration for arm-softmmu
+
+CONFIG_GDBSTUB_XML=y
default-configs/armeb-linux-user.mak +2 -0
index bf2ffe7..41d0cc4 100644
@@ -1 +1,3 @@
 # Default configuration for armeb-linux-user
+
+CONFIG_GDBSTUB_XML=y
default-configs/m68k-linux-user.mak +2 -0
index 06cd5ed..f3487aa 100644
@@ -1 +1,3 @@
 # Default configuration for m68k-linux-user
+
+CONFIG_GDBSTUB_XML=y
default-configs/m68k-softmmu.mak +2 -0
index 572b868..0faeb2c 100644
@@ -1 +1,3 @@
 # Default configuration for m68k-softmmu
+
+CONFIG_GDBSTUB_XML=y
default-configs/ppc-darwin-user.mak +2 -0
index 117f176..153ed12 100644
@@ -1 +1,3 @@
 # Default configuration for ppc-darwin-user
+
+CONFIG_GDBSTUB_XML=y
default-configs/ppc-linux-user.mak +2 -0
index 6273df2..681a945 100644
@@ -1 +1,3 @@
 # Default configuration for ppc-linux-user
+
+CONFIG_GDBSTUB_XML=y
default-configs/ppc-softmmu.mak +2 -0
index ba80ba2..d28171b 100644
@@ -1 +1,3 @@
 # Default configuration for ppc-softmmu
+
+CONFIG_GDBSTUB_XML=y
default-configs/ppc64-linux-user.mak +2 -0
index 422d3fb..089c08f 100644
@@ -1 +1,3 @@
 # Default configuration for ppc64-linux-user
+
+CONFIG_GDBSTUB_XML=y
default-configs/ppc64-softmmu.mak +2 -0
index 0b72c70..fe66524 100644
@@ -1 +1,3 @@
 # Default configuration for ppc64-softmmu
+
+CONFIG_GDBSTUB_XML=y
default-configs/ppc64abi32-linux-user.mak +2 -0
index 1c657ec..f038ffd 100644
@@ -1 +1,3 @@
 # Default configuration for ppc64abi32-linux-user
+
+CONFIG_GDBSTUB_XML=y
default-configs/ppcemb-softmmu.mak +2 -0
index 951bfa0..bff13e6 100644
@@ -1 +1,3 @@
 # Default configuration for ppcemb-softmmu
+
+CONFIG_GDBSTUB_XML=y
Signature · 1 line
1.6.2.5
#10 lore raw

PATCH v5 9/31 Only compile usb_ohci when one target uses it

In reply to Juan Quintela
---
 Makefile.target                    |    2 +-
 default-configs/arm-softmmu.mak    |    1 +
 default-configs/ppc-softmmu.mak    |    1 +
 default-configs/ppc64-softmmu.mak  |    1 +
 default-configs/ppcemb-softmmu.mak |    1 +
 default-configs/sh4-softmmu.mak    |    2 ++
 default-configs/sh4eb-softmmu.mak  |    2 ++
 7 files changed, 9 insertions(+), 1 deletions(-)
Makefile.target +1 -1
index debe0e4..7a21164 100644
@@ -180,7 +180,7 @@ QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
 obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
 
 # USB layer
-obj-y += usb-ohci.o
+obj-$(CONFIG_USB_OHCI) += usb-ohci.o
 
 # PCI network cards
 obj-y += eepro100.o
default-configs/arm-softmmu.mak +1 -0
index 2786138..15e4373 100644
@@ -1,3 +1,4 @@
 # Default configuration for arm-softmmu
 
 CONFIG_GDBSTUB_XML=y
+CONFIG_USB_OHCI=y
default-configs/ppc-softmmu.mak +1 -0
index d28171b..cc4b83a 100644
@@ -1,3 +1,4 @@
 # Default configuration for ppc-softmmu
 
 CONFIG_GDBSTUB_XML=y
+CONFIG_USB_OHCI=y
default-configs/ppc64-softmmu.mak +1 -0
index fe66524..a4d08ff 100644
@@ -1,3 +1,4 @@
 # Default configuration for ppc64-softmmu
 
 CONFIG_GDBSTUB_XML=y
+CONFIG_USB_OHCI=y
default-configs/ppcemb-softmmu.mak +1 -0
index bff13e6..19ea261 100644
@@ -1,3 +1,4 @@
 # Default configuration for ppcemb-softmmu
 
 CONFIG_GDBSTUB_XML=y
+CONFIG_USB_OHCI=y
default-configs/sh4-softmmu.mak +2 -0
index 4466835..9c2445b 100644
@@ -1 +1,3 @@
 # Default configuration for sh4-softmmu
+
+CONFIG_USB_OHCI=y
default-configs/sh4eb-softmmu.mak +2 -0
index 2f60e53..fa54f10 100644
@@ -1 +1,3 @@
 # Default configuration for sh4eb-softmmu
+
+CONFIG_USB_OHCI=y
Signature · 1 line
1.6.2.5
#11 lore raw

PATCH v5 10/31 Only compile isa_mmio when one target uses it

In reply to Juan Quintela
---
 Makefile.target                      |    5 ++---
 default-configs/arm-softmmu.mak      |    1 +
 default-configs/mips-softmmu.mak     |    2 ++
 default-configs/mips64-softmmu.mak   |    2 ++
 default-configs/mips64el-softmmu.mak |    2 ++
 default-configs/mipsel-softmmu.mak   |    2 ++
 default-configs/ppc-softmmu.mak      |    1 +
 default-configs/ppc64-softmmu.mak    |    1 +
 default-configs/ppcemb-softmmu.mak   |    1 +
 default-configs/sparc64-softmmu.mak  |    2 ++
 10 files changed, 16 insertions(+), 3 deletions(-)
Makefile.target +2 -3
index 7a21164..94bc03b 100644
@@ -154,13 +154,12 @@ endif #CONFIG_BSD_USER
 # System emulator target
 ifdef CONFIG_SOFTMMU
 
-obj-y = vl.o monitor.o pci.o isa_mmio.o machine.o \
-        gdbstub.o
+obj-y = vl.o monitor.o pci.o machine.o gdbstub.o
 # virtio has to be here due to weird dependency between PCI and virtio-net.
 # need to fix this properly
 obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o virtio-pci.o
 obj-$(CONFIG_KVM) += kvm.o kvm-all.o
-
+obj-$(CONFIG_ISA_MMIO) += isa_mmio.o
 LIBS+=-lz
 
 sound-obj-y =
default-configs/arm-softmmu.mak +1 -0
index 15e4373..66834c2 100644
@@ -2,3 +2,4 @@
 
 CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
+CONFIG_ISA_MMIO=y
default-configs/mips-softmmu.mak +2 -0
index a9e89ec..0b5bb0d 100644
@@ -1 +1,3 @@
 # Default configuration for mips-softmmu
+
+CONFIG_ISA_MMIO=y
default-configs/mips64-softmmu.mak +2 -0
index 4211452..de64165 100644
@@ -1 +1,3 @@
 # Default configuration for mips64-softmmu
+
+CONFIG_ISA_MMIO=y
default-configs/mips64el-softmmu.mak +2 -0
index 8ca46a2..eb1bdc3 100644
@@ -1 +1,3 @@
 # Default configuration for mips64el-softmmu
+
+CONFIG_ISA_MMIO=y
default-configs/mipsel-softmmu.mak +2 -0
index fe8af41..6ace424 100644
@@ -1 +1,3 @@
 # Default configuration for mipsel-softmmu
+
+CONFIG_ISA_MMIO=y
default-configs/ppc-softmmu.mak +1 -0
index cc4b83a..93172b8 100644
@@ -2,3 +2,4 @@
 
 CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
+CONFIG_ISA_MMIO=y
default-configs/ppc64-softmmu.mak +1 -0
index a4d08ff..05eb3b6 100644
@@ -2,3 +2,4 @@
 
 CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
+CONFIG_ISA_MMIO=y
default-configs/ppcemb-softmmu.mak +1 -0
index 19ea261..4259fcf 100644
@@ -2,3 +2,4 @@
 
 CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
+CONFIG_ISA_MMIO=y
default-configs/sparc64-softmmu.mak +2 -0
index fead2ea..aaccf0b 100644
@@ -1 +1,3 @@
 # Default configuration for sparc64-softmmu
+
+CONFIG_ISA_MMIO=y
Signature · 1 line
1.6.2.5
#12 lore raw

PATCH v5 11/31 Only compile qdev_addr when one target uses it

In reply to Juan Quintela
---
 Makefile.hw                       |    3 ++-
 default-configs/sparc-softmmu.mak |    2 ++
 2 files changed, 4 insertions(+), 1 deletions(-)
Makefile.hw +2 -1
index 2b4ef03..ba2d390 100644
@@ -31,7 +31,8 @@ obj-y += ne2000.o
 # SCSI layer
 obj-y += lsi53c895a.o esp.o
 
-obj-y += dma-helpers.o sysbus.o qdev-addr.o isa-bus.o
+obj-y += dma-helpers.o sysbus.o isa-bus.o
+obj-$(CONFIG_QDEV_ADDR) += qdev-addr.o
 
 all: $(HWLIB)
 # Dummy command so that make thinks it has done something
default-configs/sparc-softmmu.mak +2 -0
index 2e0e621..dc51839 100644
@@ -1 +1,3 @@
 # Default configuration for sparc-softmmu
+
+CONFIG_QDEV_ADDR=y
Signature · 1 line
1.6.2.5
#13 lore raw

PATCH v5 12/31 Only compile nand when one target uses it

In reply to Juan Quintela
---
 Makefile.hw                      |    3 ++-
 default-configs/arm-softmmu.mak  |    1 +
 default-configs/cris-softmmu.mak |    2 ++
 3 files changed, 5 insertions(+), 1 deletions(-)
Makefile.hw +2 -1
index ba2d390..88b59b2 100644
@@ -16,7 +16,8 @@ obj-y += loader.o
 obj-y += virtio.o
 obj-y += fw_cfg.o
 obj-y += watchdog.o
-obj-y += nand.o ecc.o
+obj-y += ecc.o
+obj-$(CONFIG_NAND) += nand.o
 
 obj-y += m48t59.o escc.o
 
default-configs/arm-softmmu.mak +1 -0
index 66834c2..c15ac7f 100644
@@ -3,3 +3,4 @@
 CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
 CONFIG_ISA_MMIO=y
+CONFIG_NAND=y
default-configs/cris-softmmu.mak +2 -0
index 3726699..c429979 100644
@@ -1 +1,3 @@
 # Default configuration for cris-softmmu
+
+CONFIG_NAND=y
Signature · 1 line
1.6.2.5
#14 lore raw

PATCH v5 13/31 Only compile ecc when one target uses it

In reply to Juan Quintela
---
 Makefile.hw                       |    2 +-
 default-configs/arm-softmmu.mak   |    1 +
 default-configs/sparc-softmmu.mak |    1 +
 3 files changed, 3 insertions(+), 1 deletions(-)
Makefile.hw +1 -1
index 88b59b2..9358777 100644
@@ -16,7 +16,7 @@ obj-y += loader.o
 obj-y += virtio.o
 obj-y += fw_cfg.o
 obj-y += watchdog.o
-obj-y += ecc.o
+obj-$(CONFIG_ECC) += ecc.o
 obj-$(CONFIG_NAND) += nand.o
 
 obj-y += m48t59.o escc.o
default-configs/arm-softmmu.mak +1 -0
index c15ac7f..9ac6f31 100644
@@ -4,3 +4,4 @@ CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
 CONFIG_ISA_MMIO=y
 CONFIG_NAND=y
+CONFIG_ECC=y
default-configs/sparc-softmmu.mak +1 -0
index dc51839..25abbd9 100644
@@ -1,3 +1,4 @@
 # Default configuration for sparc-softmmu
 
 CONFIG_QDEV_ADDR=y
+CONFIG_ECC=y
Signature · 1 line
1.6.2.5
#16 lore raw

PATCH v5 15/31 Only compile escc when one target uses it

In reply to Juan Quintela
---
 Makefile.hw                        |    3 ++-
 default-configs/ppc-softmmu.mak    |    1 +
 default-configs/ppc64-softmmu.mak  |    1 +
 default-configs/ppcemb-softmmu.mak |    1 +
 default-configs/sparc-softmmu.mak  |    2 ++
 5 files changed, 7 insertions(+), 1 deletions(-)
Makefile.hw +2 -1
index 354d889..9e40439 100644
@@ -19,7 +19,8 @@ obj-y += watchdog.o
 obj-$(CONFIG_ECC) += ecc.o
 obj-$(CONFIG_NAND) += nand.o
 
-obj-y += m48t59.o escc.o
+obj-y += m48t59.o
+obj-$(CONFIG_ESCC) += escc.o
 
 # PCI watchdog devices
 obj-y += wdt_i6300esb.o
default-configs/ppc-softmmu.mak +1 -0
index 93172b8..783b066 100644
@@ -3,3 +3,4 @@
 CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
 CONFIG_ISA_MMIO=y
+CONFIG_ESCC=y
default-configs/ppc64-softmmu.mak +1 -0
index 05eb3b6..e04d2c5 100644
@@ -3,3 +3,4 @@
 CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
 CONFIG_ISA_MMIO=y
+CONFIG_ESCC=y
default-configs/ppcemb-softmmu.mak +1 -0
index 4259fcf..9b1ac09 100644
@@ -3,3 +3,4 @@
 CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
 CONFIG_ISA_MMIO=y
+CONFIG_ESCC=y
default-configs/sparc-softmmu.mak +2 -0
index efb31bc..bec73af 100644
@@ -3,3 +3,5 @@
 CONFIG_QDEV_ADDR=y
 CONFIG_ECC=y
 CONFIG_ESP=y
+CONFIG_ESCC=y
+
Signature · 1 line
1.6.2.5
#17 lore raw

PATCH v5 16/31 Only compile m48t59 when one target uses it

In reply to Juan Quintela
---
 Makefile.hw                         |    2 +-
 default-configs/ppc-softmmu.mak     |    1 +
 default-configs/ppc64-softmmu.mak   |    1 +
 default-configs/ppcemb-softmmu.mak  |    1 +
 default-configs/sparc-softmmu.mak   |    2 +-
 default-configs/sparc64-softmmu.mak |    1 +
 6 files changed, 6 insertions(+), 2 deletions(-)
Makefile.hw +1 -1
index 9e40439..f4b4469 100644
@@ -19,7 +19,7 @@ obj-y += watchdog.o
 obj-$(CONFIG_ECC) += ecc.o
 obj-$(CONFIG_NAND) += nand.o
 
-obj-y += m48t59.o
+obj-$(CONFIG_M48T59) += m48t59.o
 obj-$(CONFIG_ESCC) += escc.o
 
 # PCI watchdog devices
default-configs/ppc-softmmu.mak +1 -0
index 783b066..17dc12f 100644
@@ -4,3 +4,4 @@ CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
 CONFIG_ISA_MMIO=y
 CONFIG_ESCC=y
+CONFIG_M48T59=y
default-configs/ppc64-softmmu.mak +1 -0
index e04d2c5..d56f5c2 100644
@@ -4,3 +4,4 @@ CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
 CONFIG_ISA_MMIO=y
 CONFIG_ESCC=y
+CONFIG_M48T59=y
default-configs/ppcemb-softmmu.mak +1 -0
index 9b1ac09..cb460c1 100644
@@ -4,3 +4,4 @@ CONFIG_GDBSTUB_XML=y
 CONFIG_USB_OHCI=y
 CONFIG_ISA_MMIO=y
 CONFIG_ESCC=y
+CONFIG_M48T59=y
default-configs/sparc-softmmu.mak +1 -1
index bec73af..7a65137 100644
@@ -4,4 +4,4 @@ CONFIG_QDEV_ADDR=y
 CONFIG_ECC=y
 CONFIG_ESP=y
 CONFIG_ESCC=y
-
+CONFIG_M48T59=y
default-configs/sparc64-softmmu.mak +1 -0
index aaccf0b..a249141 100644
@@ -1,3 +1,4 @@
 # Default configuration for sparc64-softmmu
 
 CONFIG_ISA_MMIO=y
+CONFIG_M48T59=y
Signature · 1 line
1.6.2.5
#15 lore raw

PATCH v5 14/31 Only compile esp when one target uses it

In reply to Juan Quintela
---
 Makefile.hw                          |    3 ++-
 default-configs/mips-softmmu.mak     |    1 +
 default-configs/mips64-softmmu.mak   |    1 +
 default-configs/mips64el-softmmu.mak |    1 +
 default-configs/mipsel-softmmu.mak   |    1 +
 default-configs/sparc-softmmu.mak    |    1 +
 6 files changed, 7 insertions(+), 1 deletions(-)
Makefile.hw +2 -1
index 9358777..354d889 100644
@@ -30,7 +30,8 @@ obj-y += msix.o
 obj-y += ne2000.o
 
 # SCSI layer
-obj-y += lsi53c895a.o esp.o
+obj-y += lsi53c895a.o
+obj-$(CONFIG_ESP) += esp.o
 
 obj-y += dma-helpers.o sysbus.o isa-bus.o
 obj-$(CONFIG_QDEV_ADDR) += qdev-addr.o
default-configs/mips-softmmu.mak +1 -0
index 0b5bb0d..b452b9a 100644
@@ -1,3 +1,4 @@
 # Default configuration for mips-softmmu
 
 CONFIG_ISA_MMIO=y
+CONFIG_ESP=y
default-configs/mips64-softmmu.mak +1 -0
index de64165..2896675 100644
@@ -1,3 +1,4 @@
 # Default configuration for mips64-softmmu
 
 CONFIG_ISA_MMIO=y
+CONFIG_ESP=y
default-configs/mips64el-softmmu.mak +1 -0
index eb1bdc3..7fbd9a3 100644
@@ -1,3 +1,4 @@
 # Default configuration for mips64el-softmmu
 
 CONFIG_ISA_MMIO=y
+CONFIG_ESP=y
default-configs/mipsel-softmmu.mak +1 -0
index 6ace424..9e02e93 100644
@@ -1,3 +1,4 @@
 # Default configuration for mipsel-softmmu
 
 CONFIG_ISA_MMIO=y
+CONFIG_ESP=y
default-configs/sparc-softmmu.mak +1 -0
index 25abbd9..efb31bc 100644
@@ -2,3 +2,4 @@
 
 CONFIG_QDEV_ADDR=y
 CONFIG_ECC=y
+CONFIG_ESP=y
Signature · 1 line
1.6.2.5
#18 lore raw

PATCH v5 17/31 Only compile ptimer when one target uses it

In reply to Juan Quintela
---
 Makefile                               |    3 ++-
 default-configs/arm-softmmu.mak        |    1 +
 default-configs/cris-softmmu.mak       |    1 +
 default-configs/m68k-softmmu.mak       |    1 +
 default-configs/microblaze-softmmu.mak |    2 ++
 default-configs/sh4-softmmu.mak        |    1 +
 default-configs/sh4eb-softmmu.mak      |    1 +
 default-configs/sparc-softmmu.mak      |    1 +
 default-configs/sparc64-softmmu.mak    |    1 +
 9 files changed, 11 insertions(+), 1 deletions(-)
Makefile +2 -1
index 1f71057..e6ed42e 100644
@@ -96,7 +96,8 @@ obj-y = $(block-obj-y)
 obj-y += readline.o console.o
 
 obj-y += tcg-runtime.o host-utils.o
-obj-y += irq.o ptimer.o ioport.o
+obj-y += irq.o ioport.o
+obj-$(CONFIG_PTIMER) += ptimer.o
 obj-y += i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
 obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
 obj-y += tmp105.o lm832x.o eeprom93xx.o tsc2005.o
default-configs/arm-softmmu.mak +1 -0
index 9ac6f31..05b4b14 100644
@@ -5,3 +5,4 @@ CONFIG_USB_OHCI=y
 CONFIG_ISA_MMIO=y
 CONFIG_NAND=y
 CONFIG_ECC=y
+CONFIG_PTIMER=y
default-configs/cris-softmmu.mak +1 -0
index c429979..8711402 100644
@@ -1,3 +1,4 @@
 # Default configuration for cris-softmmu
 
 CONFIG_NAND=y
+CONFIG_PTIMER=y
default-configs/m68k-softmmu.mak +1 -0
index 0faeb2c..0a78375 100644
@@ -1,3 +1,4 @@
 # Default configuration for m68k-softmmu
 
 CONFIG_GDBSTUB_XML=y
+CONFIG_PTIMER=y
default-configs/microblaze-softmmu.mak +2 -0
index c42009d..c800c16 100644
@@ -1 +1,3 @@
 # Default configuration for microblaze-softmmu
+
+CONFIG_PTIMER=y
default-configs/sh4-softmmu.mak +1 -0
index 9c2445b..4f912ec 100644
@@ -1,3 +1,4 @@
 # Default configuration for sh4-softmmu
 
 CONFIG_USB_OHCI=y
+CONFIG_PTIMER=y
default-configs/sh4eb-softmmu.mak +1 -0
index fa54f10..93d0c76 100644
@@ -1,3 +1,4 @@
 # Default configuration for sh4eb-softmmu
 
 CONFIG_USB_OHCI=y
+CONFIG_PTIMER=y
default-configs/sparc-softmmu.mak +1 -0
index 7a65137..ac8e4de 100644
@@ -5,3 +5,4 @@ CONFIG_ECC=y
 CONFIG_ESP=y
 CONFIG_ESCC=y
 CONFIG_M48T59=y
+CONFIG_PTIMER=y
default-configs/sparc64-softmmu.mak +1 -0
index a249141..b4bb0b0 100644
@@ -2,3 +2,4 @@
 
 CONFIG_ISA_MMIO=y
 CONFIG_M48T59=y
+CONFIG_PTIMER=y
Signature · 1 line
1.6.2.5
#19 lore raw

PATCH v5 18/31 Only compile sd when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index e6ed42e..ae1aed5 100644
@@ -105,7 +105,8 @@ obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
 obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
 obj-y += usb-serial.o usb-net.o usb-bus.o
-obj-y += sd.o ssi-sd.o
+obj-y += ssi-sd.o
+obj-$(CONFIG_SD) += sd.o
 obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
 obj-y += bt-hci-csr.o
 obj-y += buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
default-configs/arm-softmmu.mak +1 -0
index 05b4b14..52b2dfa 100644
@@ -6,3 +6,4 @@ CONFIG_ISA_MMIO=y
 CONFIG_NAND=y
 CONFIG_ECC=y
 CONFIG_PTIMER=y
+CONFIG_SD=y
Signature · 1 line
1.6.2.5
#20 lore raw

PATCH v5 19/31 Only compile max7310 when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index ae1aed5..a92b30e 100644
@@ -98,7 +98,8 @@ obj-y += readline.o console.o
 obj-y += tcg-runtime.o host-utils.o
 obj-y += irq.o ioport.o
 obj-$(CONFIG_PTIMER) += ptimer.o
-obj-y += i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
+obj-$(CONFIG_MAX7310) += max7310.o
+obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o wm8750.o
 obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
 obj-y += tmp105.o lm832x.o eeprom93xx.o tsc2005.o
 obj-y += scsi-disk.o cdrom.o
default-configs/arm-softmmu.mak +1 -0
index 52b2dfa..88232c7 100644
@@ -7,3 +7,4 @@ CONFIG_NAND=y
 CONFIG_ECC=y
 CONFIG_PTIMER=y
 CONFIG_SD=y
+CONFIG_MAX7310=y
Signature · 1 line
1.6.2.5
#21 lore raw

PATCH v5 20/31 Only compile wm8750 when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index a92b30e..4daa0a7 100644
@@ -99,7 +99,8 @@ obj-y += tcg-runtime.o host-utils.o
 obj-y += irq.o ioport.o
 obj-$(CONFIG_PTIMER) += ptimer.o
 obj-$(CONFIG_MAX7310) += max7310.o
-obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o wm8750.o
+obj-$(CONFIG_WM8750) += wm8750.o
+obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o
 obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
 obj-y += tmp105.o lm832x.o eeprom93xx.o tsc2005.o
 obj-y += scsi-disk.o cdrom.o
default-configs/arm-softmmu.mak +1 -0
index 88232c7..6149b97 100644
@@ -8,3 +8,4 @@ CONFIG_ECC=y
 CONFIG_PTIMER=y
 CONFIG_SD=y
 CONFIG_MAX7310=y
+CONFIG_WM8750=y
Signature · 1 line
1.6.2.5
#22 lore raw

PATCH v5 21/31 Only compile twl92230 when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index 4daa0a7..e190cf8 100644
@@ -100,8 +100,9 @@ obj-y += irq.o ioport.o
 obj-$(CONFIG_PTIMER) += ptimer.o
 obj-$(CONFIG_MAX7310) += max7310.o
 obj-$(CONFIG_WM8750) += wm8750.o
+obj-$(CONFIG_TWL92230) += twl92230.o
 obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o
-obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
+obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o
 obj-y += tmp105.o lm832x.o eeprom93xx.o tsc2005.o
 obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
default-configs/arm-softmmu.mak +1 -0
index 6149b97..d439509 100644
@@ -9,3 +9,4 @@ CONFIG_PTIMER=y
 CONFIG_SD=y
 CONFIG_MAX7310=y
 CONFIG_WM8750=y
+CONFIG_TWL92230=y
Signature · 1 line
1.6.2.5
#23 lore raw

PATCH v5 22/31 Only compile tsc2005 when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index e190cf8..52e890b 100644
@@ -101,9 +101,10 @@ obj-$(CONFIG_PTIMER) += ptimer.o
 obj-$(CONFIG_MAX7310) += max7310.o
 obj-$(CONFIG_WM8750) += wm8750.o
 obj-$(CONFIG_TWL92230) += twl92230.o
+obj-$(CONFIG_TSC2005) += tsc2005.o
 obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o
 obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o
-obj-y += tmp105.o lm832x.o eeprom93xx.o tsc2005.o
+obj-y += tmp105.o lm832x.o eeprom93xx.o
 obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
 obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
default-configs/arm-softmmu.mak +1 -0
index d439509..740c3a8 100644
@@ -10,3 +10,4 @@ CONFIG_SD=y
 CONFIG_MAX7310=y
 CONFIG_WM8750=y
 CONFIG_TWL92230=y
+CONFIG_TSC2005=y
Signature · 1 line
1.6.2.5
#24 lore raw

PATCH v5 23/31 Only compile lm832x when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index 52e890b..50b6fa9 100644
@@ -102,9 +102,10 @@ obj-$(CONFIG_MAX7310) += max7310.o
 obj-$(CONFIG_WM8750) += wm8750.o
 obj-$(CONFIG_TWL92230) += twl92230.o
 obj-$(CONFIG_TSC2005) += tsc2005.o
+obj-$(CONFIG_LM832X) += lm832x.o
 obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o
 obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o
-obj-y += tmp105.o lm832x.o eeprom93xx.o
+obj-y += tmp105.o eeprom93xx.o
 obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
 obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
default-configs/arm-softmmu.mak +1 -0
index 740c3a8..d1e3924 100644
@@ -11,3 +11,4 @@ CONFIG_MAX7310=y
 CONFIG_WM8750=y
 CONFIG_TWL92230=y
 CONFIG_TSC2005=y
+CONFIG_LM832X=y
Signature · 1 line
1.6.2.5
#25 lore raw

PATCH v5 24/31 Only compile tmp105 when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index 50b6fa9..94e222b 100644
@@ -103,9 +103,10 @@ obj-$(CONFIG_WM8750) += wm8750.o
 obj-$(CONFIG_TWL92230) += twl92230.o
 obj-$(CONFIG_TSC2005) += tsc2005.o
 obj-$(CONFIG_LM832X) += lm832x.o
+obj-$(CONFIG_TMP105) += tmp105.o
 obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o
 obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o
-obj-y += tmp105.o eeprom93xx.o
+obj-y += eeprom93xx.o
 obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
 obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
default-configs/arm-softmmu.mak +1 -0
index d1e3924..6cbd8a3 100644
@@ -12,3 +12,4 @@ CONFIG_WM8750=y
 CONFIG_TWL92230=y
 CONFIG_TSC2005=y
 CONFIG_LM832X=y
+CONFIG_TMP105=y
Signature · 1 line
1.6.2.5
#26 lore raw

PATCH v5 25/31 Only compile stellaris_input when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index 94e222b..0953ba5 100644
@@ -104,8 +104,9 @@ obj-$(CONFIG_TWL92230) += twl92230.o
 obj-$(CONFIG_TSC2005) += tsc2005.o
 obj-$(CONFIG_LM832X) += lm832x.o
 obj-$(CONFIG_TMP105) += tmp105.o
+obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
 obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o
-obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o
+obj-y += ssd0303.o ssd0323.o ads7846.o
 obj-y += eeprom93xx.o
 obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
default-configs/arm-softmmu.mak +1 -0
index 6cbd8a3..dddc2a6 100644
@@ -13,3 +13,4 @@ CONFIG_TWL92230=y
 CONFIG_TSC2005=y
 CONFIG_LM832X=y
 CONFIG_TMP105=y
+CONFIG_STELLARIS_INPUT=y
Signature · 1 line
1.6.2.5
#27 lore raw

PATCH v5 26/31 Only compile sd0303 when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index 0953ba5..d70372b 100644
@@ -105,8 +105,9 @@ obj-$(CONFIG_TSC2005) += tsc2005.o
 obj-$(CONFIG_LM832X) += lm832x.o
 obj-$(CONFIG_TMP105) += tmp105.o
 obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
+obj-$(CONFIG_SSD0303) += ssd0303.o
 obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o
-obj-y += ssd0303.o ssd0323.o ads7846.o
+obj-y += ssd0323.o ads7846.o
 obj-y += eeprom93xx.o
 obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
default-configs/arm-softmmu.mak +1 -0
index dddc2a6..aed1ea3 100644
@@ -14,3 +14,4 @@ CONFIG_TSC2005=y
 CONFIG_LM832X=y
 CONFIG_TMP105=y
 CONFIG_STELLARIS_INPUT=y
+CONFIG_SD0303=y
Signature · 1 line
1.6.2.5
#28 lore raw

PATCH v5 27/31 Only compile sd0323 when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index d70372b..03d8c1b 100644
@@ -106,8 +106,9 @@ obj-$(CONFIG_LM832X) += lm832x.o
 obj-$(CONFIG_TMP105) += tmp105.o
 obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
 obj-$(CONFIG_SSD0303) += ssd0303.o
+obj-$(CONFIG_SSD0323) += ssd0323.o
 obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o
-obj-y += ssd0323.o ads7846.o
+obj-y += ads7846.o
 obj-y += eeprom93xx.o
 obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
default-configs/arm-softmmu.mak +1 -0
index aed1ea3..1d069b1 100644
@@ -15,3 +15,4 @@ CONFIG_LM832X=y
 CONFIG_TMP105=y
 CONFIG_STELLARIS_INPUT=y
 CONFIG_SD0303=y
+CONFIG_SD0323=y
Signature · 1 line
1.6.2.5
#29 lore raw

PATCH v5 28/31 Only compile ads7846 when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    2 +-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
Makefile +1 -1
index 03d8c1b..35949a0 100644
@@ -107,8 +107,8 @@ obj-$(CONFIG_TMP105) += tmp105.o
 obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
 obj-$(CONFIG_SSD0303) += ssd0303.o
 obj-$(CONFIG_SSD0323) += ssd0323.o
+obj-$(CONFIG_ADS7846) += ads7846.o
 obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o
-obj-y += ads7846.o
 obj-y += eeprom93xx.o
 obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
default-configs/arm-softmmu.mak +1 -0
index 1d069b1..f68273d 100644
@@ -16,3 +16,4 @@ CONFIG_TMP105=y
 CONFIG_STELLARIS_INPUT=y
 CONFIG_SD0303=y
 CONFIG_SD0323=y
+CONFIG_ADS7846=y
Signature · 1 line
1.6.2.5
#30 lore raw

PATCH v5 29/31 Only compile max111x when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index 35949a0..dbb1f02 100644
@@ -108,7 +108,8 @@ obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
 obj-$(CONFIG_SSD0303) += ssd0303.o
 obj-$(CONFIG_SSD0323) += ssd0323.o
 obj-$(CONFIG_ADS7846) += ads7846.o
-obj-y += i2c.o smbus.o smbus_eeprom.o max111x.o
+obj-$(CONFIG_MAX111X) += max111x.o
+obj-y += i2c.o smbus.o smbus_eeprom.o
 obj-y += eeprom93xx.o
 obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
default-configs/arm-softmmu.mak +1 -0
index f68273d..486409d 100644
@@ -17,3 +17,4 @@ CONFIG_STELLARIS_INPUT=y
 CONFIG_SD0303=y
 CONFIG_SD0323=y
 CONFIG_ADS7846=y
+CONFIG_MAX111X=y
Signature · 1 line
1.6.2.5
#31 lore raw

PATCH v5 30/31 Only compile ssi-sd when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    2 +-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
Makefile +1 -1
index dbb1f02..1c6a8d5 100644
@@ -115,7 +115,7 @@ obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
 obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
 obj-y += usb-serial.o usb-net.o usb-bus.o
-obj-y += ssi-sd.o
+obj-$(CONFIG_SSI_SD) += ssi-sd.o
 obj-$(CONFIG_SD) += sd.o
 obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
 obj-y += bt-hci-csr.o
default-configs/arm-softmmu.mak +1 -0
index 486409d..615288e 100644
@@ -18,3 +18,4 @@ CONFIG_SD0303=y
 CONFIG_SD0323=y
 CONFIG_ADS7846=y
 CONFIG_MAX111X=y
+CONFIG_SSI_SD=y
Signature · 1 line
1.6.2.5
#32 lore raw

PATCH v5 31/31 Only compile ssi when one target uses it

In reply to Juan Quintela
---
 Makefile                        |    3 ++-
 default-configs/arm-softmmu.mak |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -1
index 1c6a8d5..a031795 100644
@@ -115,6 +115,7 @@ obj-y += scsi-disk.o cdrom.o
 obj-y += scsi-generic.o scsi-bus.o
 obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
 obj-y += usb-serial.o usb-net.o usb-bus.o
+obj-$(CONFIG_SSI) += ssi.o
 obj-$(CONFIG_SSI_SD) += ssi-sd.o
 obj-$(CONFIG_SD) += sd.o
 obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
@@ -122,7 +123,7 @@ obj-y += bt-hci-csr.o
 obj-y += buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
 obj-y += qemu-char.o aio.o net-checksum.o savevm.o
 obj-y += msmouse.o ps2.o
-obj-y += qdev.o qdev-properties.o ssi.o
+obj-y += qdev.o qdev-properties.o
 obj-y += qint.o qstring.o qdict.o qemu-config.o
 
 obj-$(CONFIG_BRLAPI) += baum.o
default-configs/arm-softmmu.mak +1 -0
index 615288e..a30393d 100644
@@ -18,4 +18,5 @@ CONFIG_SD0303=y
 CONFIG_SD0323=y
 CONFIG_ADS7846=y
 CONFIG_MAX111X=y
+CONFIG_SSI=y
 CONFIG_SSI_SD=y
Signature · 1 line
1.6.2.5
#3 lore raw

[Qemu-devel] Re: [PATCH 02/31] Move generation of config-host.h to Makefile from configure

In reply to Juan Quintela
Quoted 3 lines · Juan Quintela

Use timestamp based appreach to avoid not needed recompilation. Add it to rules.mak

This patch somehow raises the build noise ratio:

make[1]: `qemu-io' is up to date.
make[1]: `qemu-img' is up to date.
make[1]: `qemu-doc.html' is up to date.
make[1]: `qemu-tech.html' is up to date.
make[1]: `qemu.1' is up to date.
make[1]: `qemu-img.1' is up to date.
make[1]: `qemu-nbd.8' is up to date.
...

I don't immediately see why, but I bet you are so deep into this that you can quickly find and fix the reason. :)

Thanks,
Jan

Quoted 126 lines

Many thanks to Paolo Bonzini for helpding the design, and the debug.

---
 Makefile      |   13 +++++++++----
 configure     |   20 +-------------------
 create_config |    2 ++
 rules.mak     |    9 +++++++++
 4 files changed, 21 insertions(+), 23 deletions(-)
Makefile +9 -4
index c552739..144b392 100644
@@ -29,7 +29,10 @@ else
 DOCS=
 endif
 
-build-all: $(TOOLS) $(DOCS) recurse-all
+SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
+
+build-all: config-host.h
+	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)
 
 config-host.mak: configure
 ifneq ($(wildcard config-host.mak),)
@@ -37,10 +40,12 @@ ifneq ($(wildcard config-host.mak),)
 	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
 endif
 
-SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
+config-host.h: config-host.h-timestamp
+config-host.h-timestamp: config-host.mak
+
 SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
 
-subdir-%:
+subdir-%: config-host.h
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
 
 $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
@@ -200,7 +205,7 @@ clean:
         done
 
 distclean: clean
-	rm -f config-host.mak config-host.h config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
+	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
 	rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
 	for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
 	rm -rf $$d || exit 1 ; \
configure +1 -19
index ed5d7d6..fd3cb24 100755
@@ -1800,13 +1800,8 @@ echo "-> Your SDL version is too old - please upgrade to have SDL support"
 fi
 
 config_host_mak="config-host.mak"
-config_host_h="config-host.h"
 config_host_ld="config-host.ld"
 
-#echo "Creating $config_host_mak and $config_host_h"
-
-test -f $config_host_h && mv $config_host_h ${config_host_h}~
-
 echo "# Automatically generated by configure - do not modify" > $config_host_mak
 printf "# Configured with:" >> $config_host_mak
 printf " '%s'" "$0" "$@" >> $config_host_mak
@@ -2064,18 +2059,6 @@ echo "LIBS+=$LIBS" >> $config_host_mak
 echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak
 echo "EXESUF=$EXESUF" >> $config_host_mak
 
-echo "/* Automatically generated by configure - do not modify */" > $config_host_h
-
-/bin/sh $source_path/create_config < $config_host_mak >> $config_host_h
-
-if test -f ${config_host_h}~ ; then
-  if cmp -s $config_host_h ${config_host_h}~ ; then
-    mv ${config_host_h}~ $config_host_h
-  else
-    rm ${config_host_h}~
-  fi
-fi
-
 # generate list of library paths for linker script
 
 $ld --verbose -v 2> /dev/null | grep SEARCH_DIR > ${config_host_ld}
@@ -2474,8 +2457,7 @@ fi
 echo "LDFLAGS+=$ldflags" >> $config_mak
 echo "QEMU_CFLAGS+=$cflags" >> $config_mak
 
-echo "/* Automatically generated by configure - do not modify */" > $config_h
-echo "#include \"../config-host.h\"" >> $config_h
+echo "#include \"../config-host.h\"" > $config_h
 
 /bin/sh $source_path/create_config < $config_mak >> $config_h
 
create_config +2 -0
index 5bc8fb6..30d0487 100755
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+echo "/* Automatically generated by create_config - do not modify */"
+
 while read line; do
 
 case $line in
rules.mak +9 -0
index b380903..ca95351 100644
@@ -35,3 +35,12 @@ quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
 
 cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
               >/dev/null 2>&1 && echo OK), $2, $3)
+
+# Generate timestamp files for .h include files
+
+%.h: %.h-timestamp
+	@test -f $@ || cp $< $@
+
+%.h-timestamp: %.mak
+	$(call quiet-command, $(SRC_PATH)/create_config < $< > $@, "  GEN   $*.h")
+	@cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h