X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fghc.mk;h=0721e45eddb195f3eb0566ff124dfd694137f1ce;hb=a59f5d6552674928879cae0d225e6052876d5ca4;hp=0c224e9090764324c66e91fde50d9ae513922c59;hpb=4524b814bedcd7d8be9337a5101350d72122ce9d;p=ghc-hetmet.git diff --git a/rts/ghc.mk b/rts/ghc.mk index 0c224e9..0721e45 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -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