-* Explain about files/bootstrap-main.c and files/capi-wrappers-*.c
- in this guide, and fix the upstream to throw them away.
-* Build more bootstrapping HC archives to support more platforms.
-
-How to build an HC archive
---------------------------
-
-It's basically the same as the `Porting Guide
-<http://hackage.haskell.org/trac/ghc/wiki/Building/Porting>`_, plus
-some minor tweaks.
-
-Extract the source archive and duplicate the source tree, one for
-``-target`` and one for ``-host``::
-
- $ tar jxf ghc-{VERSION}-src.tar.bz2
- $ cp -r ghc-{VERSION} ghc-{VERSION}-target
- $ mv ghc-{VERSION} ghc-{VERSION}-host
-
-Build some configuration files::
-
- $ cd ghc-{VERSION}-target
- $ ./configure --enable-hc-boot
- $ echo "INTEGER_LIBRARY = integer-simple" > mk/build.mk
- $ gmake bootstrapping-files
- $ cd ..
-
-Run ``./configure`` on the host tree::
-
- $ cd ghc-{VERSION}-host
- $ ./configure \
- --with-iconv-includes=/usr/pkg/include \
- --with-iconv-libraries=/usr/pkg/lib
-
-Then create ``ghc-{VERSION}-host/mk/build.mk`` with the following
-contents::
-
- PORTING_HOST = YES
- GhcUnregisterised = YES
- GhcLibHcOpts = -O -fvia-C -keep-hc-files
- GhcRtsHcOpts = -keep-hc-files
- GhcLibWays = v
- GhcRTSWays =
- SplitObjs = NO
- GhcWithNativeCodeGen = NO
- GhcWithInterpreter = NO
- GhcStage1HcOpts = -O
- GhcStage2HcOpts = -O -fvia-C -keep-hc-files
- SRC_HC_OPTS += -H32m
- GhcWithSMP = NO
- utils/ghc-pkg_dist-install_v_HC_OPTS += -keep-hc-files
-
- INTEGER_LIBRARY = integer-simple
- libraries/terminfo_CONFIGURE_OPTS += \
- --configure-option=--with-curses-includes=/usr/pkg/include \
- --configure-option=--with-curses-libraries=/usr/pkg/lib
-
-Copy some configuration files from the ``-target`` tree::
-
- $ cp -r ../ghc-{VERSION}-target/includes/dist-{ghcconstants,derivedconstants} includes/
- $ cp ../ghc-{VERSION}-target/includes/ghcautoconf.h includes/
-
-Build it::
-
- $ gmake
-
-Create an intermediate tarball::