qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 2/2] Add support for Solaris dtrace -m32/-m64 flags


From: Lee Essen
Subject: [Qemu-devel] [PATCH 2/2] Add support for Solaris dtrace -m32/-m64 flags
Date: Tue, 27 Mar 2012 07:30:25 +0000

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 <address@hidden>
---
 Makefile.objs |    2 +-
 configure     |    8 ++++++++
 rules.mak     |    4 ++--
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index a2b3fe4..c834c43 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -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
diff --git a/configure b/configure
index 14ef738..107279a 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/rules.mak b/rules.mak
index 501e5cd..0c1a6f6 100644
--- a/rules.mak
+++ b/rules.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
-- 
1.7.6.3




reply via email to

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