From: Prerna Saxena <prerna@linux.vnet.ibm.com>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: Mahesh <mahesh@linux.vnet.ibm.com>,
Ananth Narayan <ananth@linux.vnet.ibm.com>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [Tracing][PATCH] Compilation fixes
Date: Thu, 5 Aug 2010 17:35:35 +0530 [thread overview]
Message-ID: <20100805173535.0abc18c8@zephyr> (raw)
Fix to ensure rebuild is properly triggered when switching trace backends
using ./configure.
Also, when using the 'ust' backend, check if the relevant headers are
available at host.
Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
Makefile | 4 ++--
configure | 20 +++++++++++++++++---
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 8831174..3bd41ce 100644
--- a/Makefile
+++ b/Makefile
@@ -132,10 +132,10 @@ bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
iov.o: iov.c iov.h
-trace.h: $(SRC_PATH)/trace-events
+trace.h: $(SRC_PATH)/trace-events config-host.mak
$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN $@")
-trace.c: $(SRC_PATH)/trace-events
+trace.c: $(SRC_PATH)/trace-events config-host.mak
$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN $@")
trace.o: trace.c $(GENERATED_HEADERS)
diff --git a/configure b/configure
index fe1b027..ee9f1e3 100755
--- a/configure
+++ b/configure
@@ -2011,6 +2011,23 @@ if test "$?" -ne 0 ; then
exit 1
fi
+##########################################
+# For 'ust' backend, test if ust headers are present
+if test "$trace_backend" = "ust"; then
+ cat > $TMPC << EOF
+#include <ust/tracepoint.h>
+#include <ust/marker.h>
+int main(void) { return 0; }
+EOF
+ if compile_prog "" "" ; then
+ LIBS="-lust $LIBS"
+ else
+ echo "ERROR: Trace backend 'ust' does not have relevant headers available"
+ echo " on the host. Pls choose a different backend."
+ exit 1
+ fi
+fi
+##########################################
# End of CC checks
# After here, no more $cc or $ld runs
@@ -2392,9 +2409,6 @@ echo "TRACE_BACKEND=$trace_backend" >> $config_host_mak
if test "$trace_backend" = "simple"; then
echo "CONFIG_SIMPLE_TRACE=y" >> $config_host_mak
fi
-if test "$trace_backend" = "ust"; then
- LIBS="-lust $LIBS"
-fi
# Set the appropriate trace file.
if test "$trace_backend" = "simple"; then
trace_file="\"$trace_file-%u\""
--
1.6.2.5
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India
next reply other threads:[~2010-08-05 15:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-05 12:05 Prerna Saxena [this message]
2010-08-05 14:45 ` [Qemu-devel] Re: [Tracing][PATCH] Compilation fixes Stefan Hajnoczi
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=20100805173535.0abc18c8@zephyr \
--to=prerna@linux.vnet.ibm.com \
--cc=ananth@linux.vnet.ibm.com \
--cc=mahesh@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.