X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Fbootstrap.mk;h=af84565457bcb2f74479c2777315569df6e54af0;hb=0287b1b5e18e16f75064331d8d6de35528e9c1fb;hp=d9a5cbfdd95e6f3a717e14e99532520847179e33;hpb=dae341f50ad832bbc6b0edb1fc460248380ed68e;p=ghc-hetmet.git diff --git a/mk/bootstrap.mk b/mk/bootstrap.mk index d9a5cbf..af84565 100644 --- a/mk/bootstrap.mk +++ b/mk/bootstrap.mk @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: bootstrap.mk,v 1.32 2005/01/27 11:55:37 simonmar Exp $ +# $Id: bootstrap.mk,v 1.33 2005/01/27 13:00:14 simonmar Exp $ # # Makefile rules for booting from .hc files without a driver. # @@ -61,9 +61,6 @@ endif ifeq "$(BootingFromUnregisterisedHc)" "YES" PLATFORM_HC_BOOT_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER -SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER -# Add these flags to SRC_CC_OPTS too, because they need to be passed to the plain .c -# files in ghc/rts. endif PLATFORM_CC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt) @@ -72,6 +69,12 @@ HC_BOOT_CC_OPTS = $(PLATFORM_HC_BOOT_CC_OPTS) $(PLATFORM_CC_OPTS) $(CC_OPTS) SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/ghc/includes -I$(FPTOOLS_TOP_ABS)/libraries/base/include -I$(FPTOOLS_TOP_ABS)/libraries/unix/include -I$(FPTOOLS_TOP_ABS)/libraries/parsec/include +# C code compiled with UseGhcForCc=YES assumes the existence of certain CPP +# symbols defined by GHC (eg. __GLASGOW_HASKELL__), so we better make sure +# they're defined. We can't test $(UseGhcForCc) here though - it isn't defined +# yet, so we use lazy expansion. +SRC_CC_OPTS += $(if $(findstring YES,$(UseGhcForCc)), $(PLATFORM_HC_BOOT_CC_OPTS) $(PLATFORM_CC_OPTS)) + ifeq "$(GhcWithInterpreter)" "YES" SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/libraries/readline/include endif