summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonmar <unknown>2003-09-02 10:23:30 +0000
committersimonmar <unknown>2003-09-02 10:23:30 +0000
commit9d252eebc4df2d4f1e4703faebb6369060c0633c (patch)
tree549c3b3d1930c73fc3bd4a36a8257d8897a1a493
parent1457be81f01a30adb734727f4c843f39bcb82037 (diff)
downloadhaskell-9d252eebc4df2d4f1e4703faebb6369060c0633c.tar.gz
[project @ 2003-09-02 10:23:30 by simonmar]
Hopefully make this work when GhcWithInterpter=YES, without breaking the case when GhcWithInterpreter=NO (the latter is usually the case when doing an unregisterised bootstrap).
-rw-r--r--mk/bootstrap.mk27
1 files changed, 24 insertions, 3 deletions
diff --git a/mk/bootstrap.mk b/mk/bootstrap.mk
index 55fd6d1253..69c7411cb7 100644
--- a/mk/bootstrap.mk
+++ b/mk/bootstrap.mk
@@ -1,5 +1,5 @@
# -----------------------------------------------------------------------------
-# $Id: bootstrap.mk,v 1.26 2003/07/24 13:40:05 simonmar Exp $
+# $Id: bootstrap.mk,v 1.27 2003/09/02 10:23:30 simonmar Exp $
#
# Makefile rules for booting from .hc files without a driver.
#
@@ -70,6 +70,10 @@ 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
+ifeq "$(GhcWithInterpreter)" "YES"
+SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/libraries/readline/include
+endif
+
# -----------------------------------------------------------------------------
# Linking: we have to give all the libraries explicitly.
@@ -88,7 +92,17 @@ HC_BOOT_LD_OPTS = \
$(DASH_L_GHC_RTS_GMP_DIR) \
-L$(FPTOOLS_TOP_ABS)/libraries/base \
-L$(FPTOOLS_TOP_ABS)/libraries/base/cbits \
- -L$(FPTOOLS_TOP_ABS)/libraries/haskell98 \
+ -L$(FPTOOLS_TOP_ABS)/libraries/haskell98
+
+ifeq "$(GhcWithInterpreter)" "YES"
+HC_BOOT_LD_OPTS += \
+ -L$(FPTOOLS_TOP_ABS)/libraries/haskell-src \
+ -L$(FPTOOLS_TOP_ABS)/libraries/readline \
+ -L$(FPTOOLS_TOP_ABS)/libraries/unix \
+ -L$(FPTOOLS_TOP_ABS)/libraries/unix/cbits
+endif
+
+HC_BOOT_LD_OPTS += \
-u "$(UNDERSCORE)GHCziBase_Izh_static_info" \
-u "$(UNDERSCORE)GHCziBase_Czh_static_info" \
-u "$(UNDERSCORE)GHCziFloat_Fzh_static_info" \
@@ -121,7 +135,14 @@ HC_BOOT_LD_OPTS = \
-u "$(UNDERSCORE)GHCziWeak_runFinalizzerBatch_closure" \
-u "$(UNDERSCORE)__stginit_Prelude"
-HC_BOOT_LIBS = -lHShaskell98 -lHSbase -lHSbase_cbits -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS)
+
+HC_BOOT_LIBS =
+
+ifeq "$(GhcWithInterpreter)" "YES"
+HC_BOOT_LIBS += -lHSreadline -lHShaskell-src -lHSunix -lHSunix_cbits
+endif
+
+HC_BOOT_LIBS += -lHShaskell98 -lHSbase -lHSbase_cbits -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS)
ifeq "$(GhcLibsWithReadline)" "YES"
HC_BOOT_LIBS += $(patsubst %, -l%, $(LibsReadline))