@@ -384,7 +384,7 @@ trace.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
trace.o: trace.c $(GENERATED_HEADERS)
trace-dtrace.h: trace-dtrace.dtrace
- $(call quiet-command,dtrace -o $@ -h -s $<, " GEN trace-dtrace.h")
+ $(call quiet-command,dtrace $(CONFIG_DTRACE_FLAGS) -o $@ -h -s $<, " GEN trace-dtrace.h")
# Normal practice is to name DTrace probe file with a '.d' extension
# but that gets picked up by QEMU's Makefile as an external dependency
@@ -3319,6 +3319,14 @@ if test "$trace_backend" = "dtrace"; then
echo "CONFIG_TRACE_DTRACE=y" >> $config_host_mak
if test "$trace_backend_stap" = "yes" ; then
echo "CONFIG_TRACE_SYSTEMTAP=y" >> $config_host_mak
+ else
+ if test "$solaris" = "yes"; then
+ if test "$cpu" = "x86_64" -o "$cpu" = "sparc64"; then
+ echo "CONFIG_DTRACE_FLAGS=-64" >> $config_host_mak
+ else
+ echo "CONFIG_DTRACE_FLAGS=-32" >> $config_host_mak
+ fi
+ fi
fi
fi
echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
@@ -34,9 +34,9 @@ endif
LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(sort $(1)) $(LIBS)," LINK $(TARGET_DIR)$@")
ifdef CONFIG_SOLARIS
-DTRACE = $(call quiet-command,dtrace -o $(1) -G -s $(2) $(3), " GEN $(TARGET_DIR)$(1)")
+DTRACE = $(call quiet-command,dtrace $(CONFIG_DTRACE_FLAGS) -o $(1) -G -s $(2) $(3), " GEN $(TARGET_DIR)$(1)")
else
-DTRACE = $(call quiet-command,dtrace -o $(1) -G -s $(2), " GEN $(TARGET_DIR)$(1)")
+DTRACE = $(call quiet-command,dtrace $(CONFIG_DTRACE_FLAGS) -o $(1) -G -s $(2), " GEN $(TARGET_DIR)$(1)")
endif
%$(EXESUF): %.o
Solaris requires a -m32/-m64 flag to determin if building for 32bit or 64bit environments. This patch add a CONFIG_DTRACE_FLAGS variable to configure and then makes use of that in the relevant Makefiles and rules.mak Signed-off-by: Lee Essen <lee.essen@nowonline.co.uk> --- Makefile.objs | 2 +- configure | 8 ++++++++ rules.mak | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-)