qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Thoughts around dtrace linking...
@ 2012-03-21 10:45 Lee Essen
  2012-03-21 13:01 ` Andreas Färber
  0 siblings, 1 reply; 9+ messages in thread
From: Lee Essen @ 2012-03-21 10:45 UTC (permalink / raw)
  To: qemu-devel, Stefan Hajnoczi

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

Hi,

I've been trying to find a sensible way to solve the Solaris/Illumos 
dtrace requirement to pass all the objs to the dtrace command so that 
the resultant object file contains all the symbols needed to properly 
link the relevant binary.

The easiest way to do this is just prior to linking the binary, so 
something like this (in rules.mak):

    LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS)
    $(LDFLAGS) -o $@ $(sort $(1)) $(LIBS),"  LINK  $(TARGET_DIR)$@")

    DTRACE = $(call quiet-command,dtrace $(CONFIG_DTRACE_FLAGS) -o
    $(1)-dtrace.o -G -s $(2) $(3), "  GEN $(TARGET_DIR)$(1)-dtrace.o")

    %$(EXESUF): %.o
       $(call DTRACE,$*,trace-dtrace.dtrace,$^)
       $(call LINK,$^ $*-dtrace.o)

Obviously with the relevant tests around it to check the trace backend, 
and also an adjustment in Makefile.target to cause the right thing to 
happen for each target.

Or, is there a better way?
How compatible is this with FreeBSD - it doesn't sound like it's needed 
at all?

Regards,

Lee.


[-- Attachment #2: Type: text/html, Size: 1426 bytes --]

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

end of thread, other threads:[~2012-03-26 15:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21 10:45 [Qemu-devel] Thoughts around dtrace linking Lee Essen
2012-03-21 13:01 ` Andreas Färber
2012-03-21 13:37   ` Lee Essen
2012-03-22 16:28   ` Stefan Hajnoczi
2012-03-22 17:00     ` Lee Essen
2012-03-23  8:08       ` Stefan Hajnoczi
2012-03-23 14:11         ` Lee Essen
2012-03-26 10:14           ` Stefan Hajnoczi
2012-03-26 15:28             ` Lee Essen

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