On 11/11/2009 23:02, Matthias Kilian wrote:
On Mon, Nov 09, 2009 at 10:53:18AM +0000, Simon Marlow wrote:
ifeq "$(BootingFromHc)" "YES"
-SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER
-D__GLASGOW_HASKELL__=$(ProjectVersionInt)
+SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -DNO_REGS -DUSE_MINIINTERPRETER
-D__GLASGOW_HASKELL__=$(ProjectVersionInt)
endif
I have a bad feeling about this: it looks like the wrong place to put a
-I option. Do you have a record of the failure that you get without
that option? Perhaps we can find a better place to put it.
Would it be ok to move the -I$(GHC_INCLUDE_DIR) portion to ghc/ghc.mk?
For example, add this one to the BootingFromHC section of ghc/ghc.mk:
ghc_CC_OPTS += -I$(GHC_INCLUDE_DIR)
I take it back, I think I understand why it is needed now. In fact, you
had it in exactly the right place before!
In a normal build we use GHC to compile C files, which passes a number
of its own options to the C compiler, one of which is a -I flag pointing
to the GHC header files. So when bootstrapping we have to provide a
similar flag.
I'll add it to the top-level ghc.mk, along with a comment to explain why.
Cheers,
Simon
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc