Patchwork [07/30] Generate gdbstub-xml.c only when needed

login
register
mail settings
Submitter Juan Quintela
Date Aug. 27, 2009, 7:17 p.m.
Message ID <3eafc6ded7261ffd280035097f10fe1dc13d493e.1251399960.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/32285/
State Superseded
Headers show

Comments

Juan Quintela - Aug. 27, 2009, 7:17 p.m.
First user of new config-devices.mak

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 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       |    4 +++-
 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 ++
 default-configs/sh4-softmmu.mak           |    1 +
 15 files changed, 33 insertions(+), 10 deletions(-)

Patch

diff --git a/Makefile.target b/Makefile.target
index 4ce6a3d..c4b8f5d 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -88,7 +88,7 @@  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
@@ -121,7 +121,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

@@ -138,7 +138,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

@@ -151,7 +151,7 @@  endif #CONFIG_BSD_USER
 ifdef CONFIG_SOFTMMU

 obj-y = vl.o monitor.o pci.o loader.o isa_mmio.o machine.o \
-        gdbstub.o gdbstub-xml.o msix.o ioport.o qemu-config.o
+        gdbstub.o msix.o ioport.o qemu-config.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
@@ -298,16 +298,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)$@")
diff --git a/configure b/configure
index 27822f9..8de7143 100755
--- a/configure
+++ b/configure
@@ -2007,8 +2007,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)
diff --git a/default-configs/arm-linux-user.mak b/default-configs/arm-linux-user.mak
index 413361a..46d4aa2 100644
--- a/default-configs/arm-linux-user.mak
+++ b/default-configs/arm-linux-user.mak
@@ -1 +1,3 @@ 
 # Default configuration for arm-linux-user
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 372a549..2786138 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -1 +1,3 @@ 
 # Default configuration for arm-softmmu
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/armeb-linux-user.mak b/default-configs/armeb-linux-user.mak
index bf2ffe7..41d0cc4 100644
--- a/default-configs/armeb-linux-user.mak
+++ b/default-configs/armeb-linux-user.mak
@@ -1 +1,3 @@ 
 # Default configuration for armeb-linux-user
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/m68k-linux-user.mak b/default-configs/m68k-linux-user.mak
index 06cd5ed..58f3eab 100644
--- a/default-configs/m68k-linux-user.mak
+++ b/default-configs/m68k-linux-user.mak
@@ -1 +1,3 @@ 
-# Default configuration for m68k-linux-user
+# Default configuration for x86_64-softmmu
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/m68k-softmmu.mak b/default-configs/m68k-softmmu.mak
index 572b868..0faeb2c 100644
--- a/default-configs/m68k-softmmu.mak
+++ b/default-configs/m68k-softmmu.mak
@@ -1 +1,3 @@ 
 # Default configuration for m68k-softmmu
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/ppc-darwin-user.mak b/default-configs/ppc-darwin-user.mak
index 117f176..153ed12 100644
--- a/default-configs/ppc-darwin-user.mak
+++ b/default-configs/ppc-darwin-user.mak
@@ -1 +1,3 @@ 
 # Default configuration for ppc-darwin-user
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/ppc-linux-user.mak b/default-configs/ppc-linux-user.mak
index 6273df2..681a945 100644
--- a/default-configs/ppc-linux-user.mak
+++ b/default-configs/ppc-linux-user.mak
@@ -1 +1,3 @@ 
 # Default configuration for ppc-linux-user
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index ba80ba2..d28171b 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -1 +1,3 @@ 
 # Default configuration for ppc-softmmu
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/ppc64-linux-user.mak b/default-configs/ppc64-linux-user.mak
index 422d3fb..089c08f 100644
--- a/default-configs/ppc64-linux-user.mak
+++ b/default-configs/ppc64-linux-user.mak
@@ -1 +1,3 @@ 
 # Default configuration for ppc64-linux-user
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
index 0b72c70..fe66524 100644
--- a/default-configs/ppc64-softmmu.mak
+++ b/default-configs/ppc64-softmmu.mak
@@ -1 +1,3 @@ 
 # Default configuration for ppc64-softmmu
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/ppc64abi32-linux-user.mak b/default-configs/ppc64abi32-linux-user.mak
index 1c657ec..f038ffd 100644
--- a/default-configs/ppc64abi32-linux-user.mak
+++ b/default-configs/ppc64abi32-linux-user.mak
@@ -1 +1,3 @@ 
 # Default configuration for ppc64abi32-linux-user
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak
index 951bfa0..bff13e6 100644
--- a/default-configs/ppcemb-softmmu.mak
+++ b/default-configs/ppcemb-softmmu.mak
@@ -1 +1,3 @@ 
 # Default configuration for ppcemb-softmmu
+
+CONFIG_GDBSTUB_XML=y
diff --git a/default-configs/sh4-softmmu.mak b/default-configs/sh4-softmmu.mak
index 4466835..303fdbe 100644
--- a/default-configs/sh4-softmmu.mak
+++ b/default-configs/sh4-softmmu.mak
@@ -1 +1,2 @@ 
 # Default configuration for sh4-softmmu
+