From: Simon Marlow Date: Thu, 12 Nov 2009 09:45:14 +0000 (+0000) Subject: HC bootstrapping fix: add -I$(GHC_INCLUDE_DIR) to SRC_CC_OPTS X-Git-Tag: 2009-11-15~7 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=51b5bc7d63cd9decadba83e1da874a9768f2ccaf HC bootstrapping fix: add -I$(GHC_INCLUDE_DIR) to SRC_CC_OPTS And add a comment explaining why these options are here --- diff --git a/ghc.mk b/ghc.mk index 2901291..755b9ae 100644 --- a/ghc.mk +++ b/ghc.mk @@ -1060,7 +1060,13 @@ publish-sdist : endif ifeq "$(BootingFromHc)" "YES" -SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER -D__GLASGOW_HASKELL__=$(ProjectVersionInt) +# In a normal build we use GHC to compile C files (see +# rules/c-suffix-rules.mk), which passes a number of its own options +# to the C compiler. So when bootstrapping we have to provide these +# flags explicitly to C compilations. +SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER +SRC_CC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt) +SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) endif # -----------------------------------------------------------------------------