Commit dff6ab2d authored by sof's avatar sof

[project @ 2002-01-15 05:39:14 by sof]

updates & fixes to hc-bootstrapping story; from Thomas Nordin
parent 90d750cd
......@@ -294,12 +294,18 @@ hc-file-bundle : project-check
$(ProjectNameShort)-$(ProjectVersion)/ghc/driver \
$(ProjectNameShort)-$(ProjectVersion)/ghc/lib \
$(ProjectNameShort)-$(ProjectVersion)/hslibs \
-name "*.hc" -o -name "*_hsc.[ch]" -o -name "*_stub.[ch]" > hc-files-to-go
\( -name "*.hc" -o -name "*_hsc.[ch]" -o -name "*_stub.[ch]" \) -print > hc-files-to-go
find $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler \
$(ProjectNameShort)-$(ProjectVersion)/ghc/driver \
$(ProjectNameShort)-$(ProjectVersion)/ghc/lib \
$(ProjectNameShort)-$(ProjectVersion)/hslibs \
-name "*.hsc" | sed 's/hsc$$/hs/g' >> hc-files-to-go
-name "*.hsc" -print | sed 's/hsc$$/hs/g' >> hc-files-to-go
echo $(ProjectNameShort)-$(ProjectVersion)/ghc/lib/std/PrelPrimopWrappers.hs >> hc-files-to-go
echo $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler/*.hs-incl >> hc-files-to-go
echo $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler/rename/ParseIface.hs >> hc-files-to-go
echo $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler/parser/Parser.hs >> hc-files-to-go
echo $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler/main/ParsePkgConf.hs >> hc-files-to-go
echo $(ProjectNameShort)-$(ProjectVersion)/hslibs/hssource/HsParser.hs >> hc-files-to-go
tar czf $(ProjectNameShort)-$(ProjectVersion)-$(TARGETPLATFORM)-hc.tar.gz `cat hc-files-to-go`
CLEAN_FILES += hc-files-to-go *-hc.tar.gz
......
......@@ -9,6 +9,7 @@
# useful with --prefix).
configopts="$*" # e.g., --enable-hc-boot-unregisterised
PWD=`pwd`
# check for GNU make
#
......@@ -34,6 +35,11 @@ END
touch ghc/compiler/rename/ParseIface.hs
touch ghc/compiler/parser/Parser.hs
touch ghc/compiler/main/ParsePkgConf.hs
touch hslibs/hssource/HsParser.hs
# We don't have genprimopcode yet so don't try to use it
touch ghc/compiler/prelude/primops.txt
touch ghc/lib/std/PrelPrimopWrappers.hs
echo "*** Building hsc..."
./configure --enable-hc-boot $configopts
......@@ -63,12 +69,12 @@ PRIMOP_BITS=primop-data-decl.hs-incl \
# The reconfigure step updates a few files, which can lead to
# unnecessary recompilations. Touch a bunch of things here to avoid
# having to recompile stuff that we've already built.
(cd ghc/compiler; touch $PRIMOP_BITS prelude/PrimOp.o main/Config.{hs,o} ghc-*)
(cd ghc/compiler; touch $PRIMOP_BITS prelude/PrimOp.o main/Config.hs main/Config.o ghc-*)
# Remove the old libraries. Don't use make clean, because we don't
# want to delete the .hs files generated from the .hsc files, because
# we don't have hsc2hs built yet.
/usr/bin/find ghc/lib/std hslibs | grep '\.\(o\|a\)' | /usr/bin/xargs rm -f
find ghc/lib/std hslibs | grep '\.\(o\|a\)' | xargs rm -f
# Do includes and RTS now
$MAKE -C ghc/includes boot && $MAKE -C ghc/includes all
......
#-----------------------------------------------------------------------------
# $Id: Makefile,v 1.55 2001/10/19 09:33:28 sewardj Exp $
# $Id: Makefile,v 1.56 2002/01/15 05:39:15 sof Exp $
#
# This is the Makefile for the runtime-system stuff.
# This stuff is written in C (and cannot be written in Haskell).
......@@ -105,6 +105,7 @@ SRC_MKDEPENDC_OPTS += -I. -I../includes
ifeq "$(BootingFromHc)" "YES"
# use the normal $(CC) when booting from .hc files
SRC_CC_OPTS += $(HC_OPTS)
SRC_CC_OPTS += -I../includes -I. -Iparallel -DCOMPILING_RTS
else
# otherwise, use $(GHC_INPLACE) as the C compiler.
CC=$(GHC_INPLACE)
......
# -----------------------------------------------------------------------------
# $Id: bootstrap.mk,v 1.17 2001/09/25 18:08:48 ken Exp $
# $Id: bootstrap.mk,v 1.18 2002/01/15 05:39:15 sof Exp $
#
# Makefile rules for booting from .hc files without a driver.
#
......@@ -66,6 +66,13 @@ SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/ghc/includes -I$(FPTOOLS_TOP_ABS)/ghc/lib/st
# -----------------------------------------------------------------------------
# Linking: we have to give all the libraries explicitly.
ifeq "$(LeadingUnderscore)" "YES"
UNDERSCORE=_
else
UNDERSCORE=
endif
HC_BOOT_LD_OPTS = \
-L$(FPTOOLS_TOP_ABS)/ghc/rts \
-L$(FPTOOLS_TOP_ABS)/ghc/rts/gmp \
......@@ -81,38 +88,38 @@ HC_BOOT_LD_OPTS = \
-L$(FPTOOLS_TOP_ABS)/hslibs/util/cbits \
-L$(FPTOOLS_TOP_ABS)/hslibs/text \
-L$(FPTOOLS_TOP_ABS)/hslibs/text/cbits \
-u "PrelBase_Izh_static_info" \
-u "PrelBase_Czh_static_info" \
-u "PrelFloat_Fzh_static_info" \
-u "PrelFloat_Dzh_static_info" \
-u "PrelPtr_Ptr_static_info" \
-u "PrelWord_Wzh_static_info" \
-u "PrelInt_I8zh_static_info" \
-u "PrelInt_I16zh_static_info" \
-u "PrelInt_I32zh_static_info" \
-u "PrelInt_I64zh_static_info" \
-u "PrelWord_W8zh_static_info" \
-u "PrelWord_W16zh_static_info" \
-u "PrelWord_W32zh_static_info" \
-u "PrelWord_W64zh_static_info" \
-u "PrelStable_StablePtr_static_info" \
-u "PrelBase_Izh_con_info" \
-u "PrelBase_Czh_con_info" \
-u "PrelFloat_Fzh_con_info" \
-u "PrelFloat_Dzh_con_info" \
-u "PrelPtr_Ptr_con_info" \
-u "PrelStable_StablePtr_con_info" \
-u "PrelBase_False_closure" \
-u "PrelBase_True_closure" \
-u "PrelPack_unpackCString_closure" \
-u "PrelIOBase_stackOverflow_closure" \
-u "PrelIOBase_heapOverflow_closure" \
-u "PrelIOBase_NonTermination_closure" \
-u "PrelIOBase_BlockedOnDeadMVar_closure" \
-u "PrelWeak_runFinalizzerBatch_closure" \
-u "__stginit_Prelude" \
-u "PrelMain_mainIO_closure" \
-u "__stginit_PrelMain"
-u "$(UNDERSCORE)PrelBase_Izh_static_info" \
-u "$(UNDERSCORE)PrelBase_Czh_static_info" \
-u "$(UNDERSCORE)PrelFloat_Fzh_static_info" \
-u "$(UNDERSCORE)PrelFloat_Dzh_static_info" \
-u "$(UNDERSCORE)PrelPtr_Ptr_static_info" \
-u "$(UNDERSCORE)PrelWord_Wzh_static_info" \
-u "$(UNDERSCORE)PrelInt_I8zh_static_info" \
-u "$(UNDERSCORE)PrelInt_I16zh_static_info" \
-u "$(UNDERSCORE)PrelInt_I32zh_static_info" \
-u "$(UNDERSCORE)PrelInt_I64zh_static_info" \
-u "$(UNDERSCORE)PrelWord_W8zh_static_info" \
-u "$(UNDERSCORE)PrelWord_W16zh_static_info" \
-u "$(UNDERSCORE)PrelWord_W32zh_static_info" \
-u "$(UNDERSCORE)PrelWord_W64zh_static_info" \
-u "$(UNDERSCORE)PrelStable_StablePtr_static_info" \
-u "$(UNDERSCORE)PrelBase_Izh_con_info" \
-u "$(UNDERSCORE)PrelBase_Czh_con_info" \
-u "$(UNDERSCORE)PrelFloat_Fzh_con_info" \
-u "$(UNDERSCORE)PrelFloat_Dzh_con_info" \
-u "$(UNDERSCORE)PrelPtr_Ptr_con_info" \
-u "$(UNDERSCORE)PrelStable_StablePtr_con_info" \
-u "$(UNDERSCORE)PrelBase_False_closure" \
-u "$(UNDERSCORE)PrelBase_True_closure" \
-u "$(UNDERSCORE)PrelPack_unpackCString_closure" \
-u "$(UNDERSCORE)PrelIOBase_stackOverflow_closure" \
-u "$(UNDERSCORE)PrelIOBase_heapOverflow_closure" \
-u "$(UNDERSCORE)PrelIOBase_NonTermination_closure" \
-u "$(UNDERSCORE)PrelIOBase_BlockedOnDeadMVar_closure" \
-u "$(UNDERSCORE)PrelWeak_runFinalizzerBatch_closure" \
-u "$(UNDERSCORE)__stginit_Prelude" \
-u "$(UNDERSCORE)PrelMain_mainIO_closure" \
-u "$(UNDERSCORE)__stginit_PrelMain"
HC_BOOT_LIBS = -lHStext -lHStext_cbits -lHSutil -lHSposix -lHSposix_cbits -lHSconcurrent -lHSlang -lHSlang_cbits -lHSstd -lHSstd_cbits -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment