RE: Preparing a Registered hc-file-bundle (Was Bootstrapping with HCfiles)

On 13 December 2005 11:05, Andrew Walrond wrote:
On the HOST -----------------
Unpack src tree, and cd into it.
Configure with necessary options $ ./configure --prefix=...
Section 10.2.1'Cross-compiling to produce an unregisterised GHC' in the build manual suggests creating an mk/build.mk with following contents: GhcUnregisterised = YES GhcLibHcOpts = -O -fvia-C -keep-hc-files GhcRtsHcOpts = -keep-hc-files GhcLibWays = SplitObjs = NO GhcWithNativeCodeGen = NO GhcWithInterpreter = NO GhcStage1HcOpts = -O GhcStage2HcOpts = -O -fvia-C -keep-hc-files SRC_HC_OPTS += -H32m GhcBootLibs = YES Reading between the lines somewhat, for a full registered version we might need something like GhcUnregisterised = NO GhcLibHcOpts = -O -fvia-C -keep-hc-files GhcRtsHcOpts = -keep-hc-files GhcLibWays = SplitObjs = NO GhcWithNativeCodeGen = YES GhcWithInterpreter = YES GhcStage1HcOpts = -O GhcStage2HcOpts = -O -fvia-C -keep-hc-files SRC_HC_OPTS += -H32m GhcBootLibs = YES Advice on this bit gratefully received!
This should be fine, except that you can leave out some of it - you probably want the default settings for GhcWithNativeCodeGen and GhcWithInterpreter, and the GhcUnregisterised should default to NO.
The manual next suggests copying some target generated include files into the host ghc source, but since they are the same I guess we can ignore that bit.
Now building exactly as described in the manual:
$ pushd glafp-utils && make boot && make && popd $ pushd ghc && make boot && make && popd
Manual suggests the build might fail in RTS, but probably not for our registered version ?
$ pushd libraries && make boot && make && popd $ pushd ghc/compiler && make boot stage=2 && make stage=2 &&
building the RTS should work, yes. popd
$ pushd ghc/lib/compat $ make clean $ rm .depend $ make boot UseStage1=YES $ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C
-keep-hc-files'
$ popd $ pushd ghc/utils $ make clean $ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files' $ popd $ make hc-file-bundle Project=Ghc
That should provide us with our hc-file-bundle, *-hc.tar.gz
On the TARGET --------------------
Unpack src tree, unpack the hc file bundle on top of it. Cd into the src tree.
Now it should be a simple matter of $ distrib/hc-build --prefix=dir $ make install
Looks good! Cheers, Simon
participants (1)
-
Simon Marlow