X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fghc.mk;h=aee33695a533c94bf4ebaad18006bcf2db780a7a;hb=3ad5c4bbe8b3f40a2a105722c7c1b0abb0c99c66;hp=c3d7eb6e6bfaaa538581d7318cf924db069d1107;hpb=aea784af873f089a40af71849d83f59008562a58;p=ghc-hetmet.git diff --git a/rts/ghc.mk b/rts/ghc.mk index c3d7eb6..aee3369 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,22 @@ 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) +# Hack: we define every way-related option here, so that we get (hopefully) +# a superset of the dependencies. To do this properly, we should generate +# a different set of dependencies for each way. Further hack: PROFILING an + +# 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" + +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 +401,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