projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
988c661
)
[project @ 2005-01-27 13:00:14 by simonmar]
author
simonmar
<unknown>
Thu, 27 Jan 2005 13:01:13 +0000
(13:01 +0000)
committer
simonmar
<unknown>
Thu, 27 Jan 2005 13:01:13 +0000
(13:01 +0000)
bootstrapping wibbles
ghc/mk/config.mk.in
patch
|
blob
|
history
mk/bootstrap.mk
patch
|
blob
|
history
diff --git
a/ghc/mk/config.mk.in
b/ghc/mk/config.mk.in
index
27cfbd7
..
c11aae1
100644
(file)
--- a/
ghc/mk/config.mk.in
+++ b/
ghc/mk/config.mk.in
@@
-51,7
+51,13
@@
ghc_ge_504 = YES
ghc_ge_601 = YES
ghc_ge_603 = YES
else
ghc_ge_601 = YES
ghc_ge_603 = YES
else
+ifeq "$(BootingFromHc)" "YES"
+ghc_ge_504 = YES
+ghc_ge_601 = YES
+ghc_ge_603 = YES
+else
ghc_ge_504 = $(shell if (test $(GhcCanonVersion) -ge 504); then echo YES; else echo NO; fi)
ghc_ge_601 = $(shell if (test $(GhcCanonVersion) -ge 601); then echo YES; else echo NO; fi)
ghc_ge_603 = $(shell if (test $(GhcCanonVersion) -ge 603); then echo YES; else echo NO; fi)
endif
ghc_ge_504 = $(shell if (test $(GhcCanonVersion) -ge 504); then echo YES; else echo NO; fi)
ghc_ge_601 = $(shell if (test $(GhcCanonVersion) -ge 601); then echo YES; else echo NO; fi)
ghc_ge_603 = $(shell if (test $(GhcCanonVersion) -ge 603); then echo YES; else echo NO; fi)
endif
+endif
\ No newline at end of file
diff --git
a/mk/bootstrap.mk
b/mk/bootstrap.mk
index
d9a5cbf
..
af84565
100644
(file)
--- 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.
#
#
# 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
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)
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
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
ifeq "$(GhcWithInterpreter)" "YES"
SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/libraries/readline/include
endif