X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fbuilding%2Fbuilding.xml;h=ae22c81d286733017018997588e925bdbe67190f;hb=1013f2bbde5eb3e8bba4da6d851215963a93b239;hp=d8683c6ee801941d2d181324d78fde2aa146bd71;hpb=c61816ee7a22c49d249c6fc150cb3c15834679ea;p=ghc-hetmet.git diff --git a/docs/building/building.xml b/docs/building/building.xml index d8683c6..ae22c81 100644 --- a/docs/building/building.xml +++ b/docs/building/building.xml @@ -2752,8 +2752,8 @@ directive. - EXCLUDE_SRCS - EXCLUDE_SRCS + EXCLUDED_SRCS + EXCLUDED_SRCS Set to a list of source files (relative to the @@ -2771,7 +2771,7 @@ directive. EXTRA_SRCS - EXCLUDE_SRCS + EXTRA_SRCS Set to a list of extra source files (perhaps @@ -3540,20 +3540,19 @@ $ make install Bootstrapping GHC on a system without GHC already installed is achieved by taking the intermediate C files (known - as HC files) from a GHC compilation on a supported system to the - target machine, and compiling them using gcc to get a working - GHC. + as HC files) from another GHC compilation, compiling them using gcc to + get a working GHC. NOTE: GHC versions 5.xx were hard to bootstrap from C. We recommend using GHC 6.0.1 or later. HC files are platform-dependent, so you have to get a set - that were generated on similar hardware. There may be some - supplied on the GHC download page, otherwise you'll have to - compile some up yourself, or start from - unregisterised HC files - see . + that were generated on the same platform. There + may be some supplied on the GHC download page, otherwise you'll have to + compile some up yourself, or start from + unregisterised HC files - see . The following steps should result in a working GHC build with full libraries: @@ -3650,6 +3649,13 @@ $ make install Cross-compiling to produce an unregisterised GHC + NOTE! These instructions apply to GHC 6.4 and (hopefully) + later. If you need instructions for an earlier version of GHC, try + to get hold of the version of this document that was current at the + time. It should be available from the appropriate download page on + the GHC homepage. + In this section, we explain how to bootstrap GHC on a new platform, using unregisterised intermediate C files. We haven't put a great deal of effort into automating this @@ -3689,7 +3695,7 @@ $ ./configure --enable-hc-boot --enable-hc-boot-unregisterised $ cd T/ghc/includes -$ make config.h +$ make ghcconfig.h @@ -3714,13 +3720,16 @@ $ ./configure with the following contents: GhcUnregisterised = YES -GhcLibHcOpts = -O -H32m -keep-hc-files +GhcLibHcOpts = -O -fvia-C -keep-hc-files +GhcRtsHcOpts = -keep-hc-files GhcLibWays = SplitObjs = NO GhcWithNativeCodeGen = NO GhcWithInterpreter = NO -GhcStage1HcOpts = -O -H32m -fasm -GhcStage2HcOpts = -O -fvia-C -keep-hc-files +GhcStage1HcOpts = -O -fasm +GhcStage2HcOpts = -O -fvia-C -keep-hc-files +SRC_HC_OPTS += -H32m +GhcBootLibs = YES @@ -3746,7 +3755,7 @@ GhcStage2HcOpts = -O -fvia-C -keep-hc-files Copy - T/ghc/includes/config.h + T/ghc/includes/ghcconfig.h to H/ghc/includes. Note that we are building on the host machine, using the @@ -3757,9 +3766,9 @@ GhcStage2HcOpts = -O -fvia-C -keep-hc-files - Touch config.h, just to make + Touch ghcconfig.h, just to make sure it doesn't get replaced during the build: -$ touch H/ghc/includes/config.h +$ touch H/ghc/includes/ghcconfig.h @@ -3776,15 +3785,17 @@ $ make boot && make -$ cd H/ghc +$ cd H/ghc/compiler $ make boot stage=2 && make stage=2 - + -$ cd H/ghc/utils +$ cd H/ghc/lib +$ make clean +$ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files' +$ cd H/ghc/utils $ make clean -$ make -k HC=H/ghc/compiler/stage1/ghc-inplace \ - EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files' +$ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files'