X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fghc.mk;h=bffdaaedf173c4849432171f665d17375d004d63;hb=b84ba676034763b3082bbd9405794a4fde499d14;hp=c3d7eb6e6bfaaa538581d7318cf924db069d1107;hpb=aea784af873f089a40af71849d83f59008562a58;p=ghc-hetmet.git diff --git a/rts/ghc.mk b/rts/ghc.mk index c3d7eb6..bffdaae 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -70,6 +70,11 @@ rts/dist/build/sm/Scav_thr.c : rts/sm/Scav.c | $$(dir $$@)/. rts_H_FILES = $(wildcard includes/*.h) $(wildcard rts/*.h) +ifeq "$(HaveDtrace)" "YES" +DTRACEPROBES_H = rts/dist/build/RtsProbes.h +rts_H_FILES += $(DTRACEPROBES_H) +endif + # collect the -l flags that we need to link the rts dyn lib. rts/libs.depend : $(GHC_PKG_INPLACE) "$(GHC_PKG_INPLACE)" field rts extra-libraries \ @@ -362,9 +367,15 @@ rts_dist_C_SRCS = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS) rts_dist_S_SRCS = $(rts_S_SRCS) rts_dist_C_FILES = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS) $(rts_S_SRCS) +ifeq "$(HaveDtrace)" "YES" + +rts_dist_MKDEPENDC_OPTS += -Irts/dist/build + +endif + $(eval $(call build-dependencies,rts,dist)) -$(rts_dist_depfile_c_asm) : libffi/dist-install/build/ffi.h +$(rts_dist_depfile_c_asm) : libffi/dist-install/build/ffi.h $(DTRACEPROBES_H) #----------------------------------------------------------------------------- # libffi stuff @@ -383,6 +394,20 @@ $(DYNWRAPPER_PROG): $(DYNWRAPPER_SRC) "$(HC)" -cpp -optc-include -optcdyn-wrapper-patchable-behaviour.h $(INPLACE_EXTRA_FLAGS) $< -o $@ # ----------------------------------------------------------------------------- +# compile dtrace probes if dtrace is supported + +ifeq "$(HaveDtrace)" "YES" + +rts_CC_OPTS += -DDTRACE +rts_HC_OPTS += -DDTRACE + +DTRACEPROBES_SRC = rts/RtsProbes.d +$(DTRACEPROBES_H): $(DTRACEPROBES_SRC) | $(dir $@)/. + "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C -h -o $@ -s $< + +endif + +# ----------------------------------------------------------------------------- # build the static lib containing the C main symbol rts/dist/build/libHSrtsmain.a : rts/dist/build/Main.o