qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] trace: rebuild generated-events.o when configuration changes
@ 2013-03-08 14:52 Stefan Hajnoczi
  2013-03-11 14:18 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-03-08 14:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: vilanova, Stefan Hajnoczi

Make sure to rebuild generated-events.o when ./configure options change.
This prevents linker errors when a stale generated-events.o gets linked
with code compiled against fresh headers.  For example, try building
with ./configure --enable-trace-backend=stderr followed by ./configure
--enable-trace-backend=dtrace.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 trace/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/trace/Makefile.objs b/trace/Makefile.objs
index 156aa25..a043072 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -11,7 +11,7 @@ $(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events
 		< $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
 	@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
 
-$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp
+$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
 $(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events
 	$(call quiet-command,$(TRACETOOL) \
 		--format=events-c \
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] trace: rebuild generated-events.o when configuration changes
  2013-03-08 14:52 [Qemu-devel] [PATCH] trace: rebuild generated-events.o when configuration changes Stefan Hajnoczi
@ 2013-03-11 14:18 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-03-11 14:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: vilanova

On Fri, Mar 08, 2013 at 03:52:15PM +0100, Stefan Hajnoczi wrote:
> Make sure to rebuild generated-events.o when ./configure options change.
> This prevents linker errors when a stale generated-events.o gets linked
> with code compiled against fresh headers.  For example, try building
> with ./configure --enable-trace-backend=stderr followed by ./configure
> --enable-trace-backend=dtrace.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  trace/Makefile.objs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-11 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-08 14:52 [Qemu-devel] [PATCH] trace: rebuild generated-events.o when configuration changes Stefan Hajnoczi
2013-03-11 14:18 ` Stefan Hajnoczi

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).