X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FMakefile;h=6a75b87bcc9ff1100bc7dcc5d54701b88e9e374d;hb=d3ee5202a141534d8c2799b94929461e0dfeda3f;hp=8b344b0aad82ee0e797633a60f708fe98904b1c5;hpb=02928be07aa6446c53f05c44fecfb8845f5cd460;p=ghc-hetmet.git diff --git a/ghc/rts/Makefile b/ghc/rts/Makefile index 8b344b0..6a75b87 100644 --- a/ghc/rts/Makefile +++ b/ghc/rts/Makefile @@ -20,7 +20,7 @@ TOP=.. # set of suffix rules for compiling C code, using $(HC) rather than $(CC) # and prepending "-optc" to $(CC_OPTS). NB. must be done before including # boilerplate.mk below. -UseGhcForCc = $(shell if (test "x$(BootingFromHc)" = "xYES"); then echo NO; else echo YES; fi) +UseGhcForCc = YES include $(TOP)/mk/boilerplate.mk @@ -110,16 +110,17 @@ ifeq "$(way)" "mp" SRC_HC_OPTS += -I$$PVM_ROOT/include endif -ifeq "$(BootingFromHc)" "YES" -# use the normal $(CC) when booting from .hc files -SRC_CC_OPTS += $(HC_OPTS) -endif - -# Currently, you only get 'threads support' in the normal -# way. +# You get 'threads support' in the normal +# and profiling ways. ifeq "$(GhcRtsThreaded)" "YES" ifeq "$(way)" "" SRC_CC_OPTS += -DTHREADED_RTS +SRC_HC_OPTS += -optc-DTHREADED_RTS +PACKAGE_CPP_OPTS += -DTHREADED_RTS +endif +ifeq "$(way)" "p" +SRC_CC_OPTS += -DTHREADED_RTS +SRC_HC_OPTS += -optc-DTHREADED_RTS PACKAGE_CPP_OPTS += -DTHREADED_RTS endif endif @@ -175,12 +176,11 @@ SRC_MKDEPENDC_OPTS += -I. -I../includes AUTO_APPLY = AutoApply.hc -gen_apply : GenApply.hs - $(GHC) -o $@ -I$(GHC_INCLUDE_DIR) GenApply.hs - +ifneq "$(BootingFromHc)" "YES" $(AUTO_APPLY): $(GHC_GENAPPLY) @$(RM) $@ $(GHC_GENAPPLY) >$@ +endif EXTRA_SRCS += $(AUTO_APPLY) @@ -219,16 +219,9 @@ endif ifneq "$(HaveLibGmp)" "YES" ifneq "$(HaveFrameworkHaskellSupport)" "YES" -ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" boot :: - cd gmp && ./configure --enable-shared=no \ + cd gmp && CC=$(WhatGccIsCalled) ./configure --enable-shared=no \ --host=`echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g'` -else -# Pass --target to configure of GMP, so that building for mingwin under -# cygwin works properly (when the host is not the same as the target) -boot :: - cd gmp && CC=$(WhatGccIsCalled) ./configure --enable-shared=no --target=$(HOSTPLATFORM) -endif # Slight cheatage here to pass host as target, but x-compilation isn't supported by ghc.