X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fghc.mk;h=79b84caf70a43997b1fe92117684825b61da1137;hb=d46df548da44cff511cd0d656a1ec92c4551d653;hp=e0ff69021cb9e8270823b0a0c7eda20de735d2b0;hpb=c97259cd34b45eb5c06e93e82042dcca784609a6;p=ghc-hetmet.git diff --git a/rts/ghc.mk b/rts/ghc.mk index e0ff690..79b84ca 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -23,9 +23,6 @@ ALL_RTS_LIBS = $(foreach way,$(rts_WAYS),rts/dist/build/libHSrts$($(way)_libsuf) rts/dist/build/libHSrtsmain.a all_rts : $(ALL_RTS_LIBS) -# The per-dir options -$(eval $(call distdir-opts,rts,dist)) - # ----------------------------------------------------------------------------- # Defining the sources @@ -65,11 +62,9 @@ rts_AUTO_APPLY_CMM = rts/dist/build/AutoApply.cmm $(rts_AUTO_APPLY_CMM): $(GENAPPLY_INPLACE) "$(GENAPPLY_INPLACE)" >$@ -rts/dist/build/sm/Evac_thr.c : rts/sm/Evac.c - "$(MKDIRHIER)" $(dir $@) +rts/dist/build/sm/Evac_thr.c : rts/sm/Evac.c | $$(dir $$@)/. cp $< $@ -rts/dist/build/sm/Scav_thr.c : rts/sm/Scav.c - "$(MKDIRHIER)" $(dir $@) +rts/dist/build/sm/Scav_thr.c : rts/sm/Scav.c | $$(dir $$@)/. cp $< $@ rts_H_FILES = $(wildcard includes/*.h) $(wildcard rts/*.h) @@ -131,7 +126,12 @@ $(foreach way,$(rts_WAYS),$(eval $(call build-rts-way,$(way)))) # Flags for compiling every file # We like plenty of warnings. -WARNING_OPTS += -Wall -Wextra +WARNING_OPTS += -Wall +ifeq "$(GccLT34)" "YES" +WARNING_OPTS += -W +else +WARNING_OPTS += -Wextra +endif WARNING_OPTS += -Wstrict-prototypes WARNING_OPTS += -Wmissing-prototypes WARNING_OPTS += -Wmissing-declarations @@ -171,12 +171,6 @@ ifeq "$(UseLibFFIForAdjustors)" "YES" rts_CC_OPTS += -DUSE_LIBFFI_FOR_ADJUSTORS endif -ifeq "$(Windows)" "YES" -# SDM: when compiled with -fasm the RTS currently has bogus references to -# __imp_base_ things, so working around for now: -rts_HC_OPTS += -fvia-C -endif - ifneq "$(DYNAMIC_RTS)" "YES" rts_HC_OPTS += -static else @@ -189,7 +183,7 @@ rts_HC_OPTS += $(addprefix -optc, $(MACOSX_DEPLOYMENT_CC_OPTS)) rts_LD_OPTS += $(addprefix -optl, $(MACOSX_DEPLOYMENT_LD_OPTS)) # Otherwise the stack-smash handler gets triggered. -ifeq "$(TargetOS_CPP)" "openbsd" +ifneq "$(findstring $(TargetOS_CPP), darwin openbsd)" "" rts_HC_OPTS += -optc-fno-stack-protector endif @@ -313,13 +307,14 @@ endif # a different set of dependencies for each way. Further hack: PROFILING and # TICKY_TICKY can't be used together, so we omit TICKY_TICKY for now. rts_MKDEPENDC_OPTS += -DPROFILING -DTHREADED_RTS -DDEBUG +rts_MKDEPENDC_OPTS += -Irts/sm rts_WAYS_DASHED = $(subst $(space),,$(patsubst %,-%,$(strip $(rts_WAYS)))) rts_dist_depfile = rts/dist/build/.depend$(rts_WAYS_DASHED) -rts_dist_C_SRCS = $(rts_C_SRCS) +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_S_SRCS) +rts_dist_C_FILES = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS) $(rts_S_SRCS) $(eval $(call build-dependencies,rts,dist)) @@ -372,9 +367,9 @@ install : install_rts .PHONY: install_rts install_rts: - $(INSTALL_DIR) $(DESTDIR)$(libdir) - $(INSTALL_DIR) $(DESTDIR)$(libdir)/include - "$(CP)" $(ALL_RTS_LIBS) $(DESTDIR)$(libdir) + $(INSTALL_DIR) $(DESTDIR)$(ghclibdir) + $(INSTALL_DIR) $(DESTDIR)$(ghclibdir)/include + "$(CP)" $(ALL_RTS_LIBS) $(DESTDIR)$(ghclibdir) # ----------------------------------------------------------------------------- # cleaning