xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, wei.liu2@citrix.com,
	xen-devel@lists.xen.org, stefano.stabellini@eu.citrix.com
Cc: Anthony PERARD <anthony.perard@citrix.com>,
	Paul Durrant <paul.durrant@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH] tools: probe for existence of qemu-xen trace backends.
Date: Wed, 10 Feb 2016 12:42:34 +0000	[thread overview]
Message-ID: <1455108154-12084-1-git-send-email-ian.campbell@citrix.com> (raw)

QEMU upstream commit ed7f5f1d8db0 ("trace: convert stderr backend to
log") renamed the stderr trace backend to log, which breaks the xen
build when pointed at a QEMU tree after that point:

./configure of QEMU fail with:
"ERROR: invalid trace backends
        Please choose supported trace backends."

These changes are not (yet) present in qemu-xen-unstable.git and in
any case we want to support QEMU before and after this change. Use the
tracetool.py provided by QEMU to probe for supported trace backends.

This is now done unconditionally (not depending on debug=y), which is
simpler to arrange here but also follows upstream QEMU which in
baf86d6b3ca0 ("trace: switch default backend to "log"") switched the
default from "nop" to "log", so we would have got log in debug=no
builds from then on anyway.

Tested with current qemu-xen-unstable (f165e581d9a6) and current QEMU
upstream master (f075c89f0a9c), the latter picked up via:
    QEMU_UPSTREAM_URL := /path/to/qemu-xen.git
which therefore tested the out of tree build aspect of this change.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Paul Durrant <paul.durrant@citrix.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tools/Makefile b/tools/Makefile
index 5688a7c..76a2235 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -228,7 +228,7 @@ qemu-xen-dir-force-update: qemu-xen-dir-find
 	fi
 
 ifeq ($(debug),y)
-QEMU_XEN_ENABLE_DEBUG := --enable-debug --enable-trace-backend=stderr
+QEMU_XEN_ENABLE_DEBUG := --enable-debug
 else
 QEMU_XEN_ENABLE_DEBUG :=
 endif
@@ -240,8 +240,16 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 		source=.; \
 	fi; \
 	cd qemu-xen-dir; \
+	if $$source/scripts/tracetool.py --check-backends --backends log ; then \
+		enable_trace_backend='--enable-trace-backend=log'; \
+	elif $$source/scripts/tracetool.py --check-backends --backends stderr ; then \
+		enable_trace_backend='--enable-trace-backend=stderr'; \
+	else \
+		enable_trace_backend='' ; \
+	fi ; \
 	$$source/configure --enable-xen --target-list=i386-softmmu \
 		$(QEMU_XEN_ENABLE_DEBUG) \
+		$$enable_trace_backend \
 		--prefix=$(LIBEXEC) \
 		--libdir=$(LIBEXEC_LIB) \
 		--includedir=$(LIBEXEC_INC) \
-- 
2.1.4

             reply	other threads:[~2016-02-10 12:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 12:42 Ian Campbell [this message]
2016-02-10 14:14 ` [PATCH] tools: probe for existence of qemu-xen trace backends Stefano Stabellini
2016-02-10 14:18   ` Anthony PERARD
2016-02-10 14:27     ` Ian Campbell
2016-02-10 14:37       ` Ian Campbell
2016-02-10 14:44         ` Stefano Stabellini
2016-02-10 14:59           ` Ian Campbell
2016-02-10 14:37       ` Stefano Stabellini
2016-02-10 14:43       ` Ian Campbell
2016-02-10 14:51         ` Stefano Stabellini
2016-02-10 15:06           ` Ian Campbell
2016-02-10 15:42             ` Stefano Stabellini
2016-02-10 15:53               ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455108154-12084-1-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=paul.durrant@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).