tools: build debug qemu-xen in debug tools builds
authorMatthew Daley <mattjd@gmail.com>
Tue, 3 Sep 2013 13:12:59 +0000 (01:12 +1200)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 9 Sep 2013 13:41:49 +0000 (14:41 +0100)
When building tools in debug mode (debug=y), pass --enable-debug when
configuring qemu-xen to enable some debug support (namely, to prevent
symbols from being stripped).

Signed-off-by: Matthew Daley <mattjd@gmail.com>
tools/Makefile

index 0531f48a84f5baa972003b4186ca6c58475512f8..066df66487ee82064ff2b55240b058e0af866a34 100644 (file)
@@ -173,6 +173,12 @@ qemu-xen-dir-force-update:
                $(GIT) reset --hard $(QEMU_UPSTREAM_REVISION); \
        fi
 
+ifeq ($(debug),y)
+QEMU_XEN_ENABLE_DEBUG := --enable-debug
+else
+QEMU_XEN_ENABLE_DEBUG :=
+endif
+
 subdir-all-qemu-xen-dir: qemu-xen-dir-find
        if test -d $(QEMU_UPSTREAM_URL) ; then \
                source=$(QEMU_UPSTREAM_URL); \
@@ -181,6 +187,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
        fi; \
        cd qemu-xen-dir; \
        $$source/configure --enable-xen --target-list=i386-softmmu \
+               $(QEMU_XEN_ENABLE_DEBUG) \
                --prefix=$(PREFIX) \
                --source-path=$$source \
                --extra-cflags="-I$(XEN_ROOT)/tools/include \