qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Thoughts around dtrace linking...


From: Lee Essen
Subject: [Qemu-devel] Thoughts around dtrace linking...
Date: Wed, 21 Mar 2012 10:45:11 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]