tweak newArray# documentation again
[ghc-hetmet.git] / rts / ghc.mk
index 0c224e9..0721e45 100644 (file)
@@ -69,7 +69,7 @@ rts/dist/build/sm/Scav_thr.c : rts/sm/Scav.c | $$(dir $$@)/.
 
 rts_H_FILES = $(wildcard includes/*.h) $(wildcard rts/*.h)
 
-ifeq "$(HaveDtrace)" "YES"
+ifeq "$(USE_DTRACE)" "YES"
 DTRACEPROBES_H = rts/dist/build/RtsProbes.h
 rts_H_FILES += $(DTRACEPROBES_H)
 endif
@@ -434,7 +434,7 @@ rts_dist_C_FILES = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS) $(rts_S_SRCS)
 # TICKY_TICKY can't be used together, so we omit TICKY_TICKY for now.
 rts_dist_MKDEPENDC_OPTS += -DPROFILING -DTHREADED_RTS -DDEBUG
 
-ifeq "$(HaveDtrace)" "YES"
+ifeq "$(USE_DTRACE)" "YES"
 
 rts_dist_MKDEPENDC_OPTS += -Irts/dist/build
 
@@ -455,14 +455,19 @@ rts_LD_OPTS     += -Llibffi/build/include
 # -----------------------------------------------------------------------------
 # compile dtrace probes if dtrace is supported
 
-ifeq "$(HaveDtrace)" "YES"
+ifeq "$(USE_DTRACE)" "YES"
 
 rts_CC_OPTS            += -DDTRACE
 rts_HC_OPTS            += -DDTRACE
 
+# Apple's dtrace (the only one supported by ghc at the moment) uses
+# gcc as its preprocessor. If gcc isn't at /usr/bin/gcc, or we need
+# to force it to use a different gcc, we need to give the path in
+# the option cpppath.
+
 DTRACEPROBES_SRC = rts/RtsProbes.d
 $(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $(dir $@)/.
-       "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C -h -o $@ -s $<
+       "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C -x cpppath=$(WhatGccIsCalled) -h -o $@ -s $<
 
 endif