X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fghc.mk;h=970adaa1a7feb3fc5e0dc0ac4661e3272888d037;hb=c2cd83e7d85c11e6a33e1cde263eb2312566d535;hp=4bb41182844a904db07e8cced3ec699e88f0b972;hpb=a2a67cd520b9841114d69a87a423dabcb3b4368e;p=ghc-hetmet.git diff --git a/rts/ghc.mk b/rts/ghc.mk index 4bb4118..970adaa 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 @@ -131,7 +128,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 @@ -189,7 +191,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 @@ -251,6 +253,9 @@ sm/Storage_CC_OPTS += -Wno-strict-prototypes # inlining warnings happen in Compact sm/Compact_CC_OPTS += -Wno-inline +# emits warnings about call-clobbered registers on x86_64 +StgCRun_CC_OPTS += -w + RetainerProfile_CC_OPTS += -w RetainerSet_CC_OPTS += -Wno-format # On Windows: @@ -369,9 +374,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