Changes between Version 17 and Version 18 of Building/Using


Ignore:
Timestamp:
Mar 30, 2009 3:00:55 PM (6 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Building/Using

    v17 v18  
    109109 
    110110 `--build=<platform>`:: 
    111   Specifies the "build platform" (see [wiki:Building/BuildSystem#Platformsettings]). 
     111  Specifies the "build platform" (see [wiki:Building/Architecture#Idiom:platformnames platform names]). 
    112112  This is usually only necessary on Windows, where you should set it 
    113113  to `--build=i386-unknown-mingw32`. 
    114114 
    115115 `--host=<platform>`:: 
    116   Set the "host platform" (see [wiki:Building/BuildSystem#Platformsettings]). 
     116  Set the "host platform" (see [wiki:Building/Architecture#Idiom:platformnames platform names]). 
    117117  Usually not necessary. 
    118118 
    119119 `--target=<platform>`:: 
    120   Set the "target platform" (see [wiki:Building/BuildSystem#Platformsettings]). 
     120  Set the "target platform" (see [wiki:Building/Architecture#Idiom:platformnames platform names]). 
    121121  Usually not necessary. 
    122122 
     
    324324without being installed first. 
    325325 
     326=== Order of the build === 
     327 
     328Here is a high level view of what happens when you build GHC: 
     329 
     330 * First, we build a few packages that GHC itself depends on, such as 
     331   `Cabal`, and `filepath`, using your installed GHC.  These packages 
     332   are under `libraries`, and each is built in a subdirectory 
     333   `dist-boot`; for example the bootstrap build of Cabal will be in 
     334   `libraries/Cabal/dist-boot`. 
     335 
     336 * Then we build GHC against these packages, still using your 
     337   installed GHC.  This is called the "stage 1" compiler (see 
     338   [wiki:Building/Architecture#Idiom:stages stages]).  You can run the 
     339   stage 1 compiler by invoking `inplace/bin/ghc-stage1`.  The stage 1 
     340   build of GHC happens in `compiler/stage1`. 
     341 
     342 * The stage 1 compiler is now used to build all the packages in the 
     343   `libraries` subdirectory, and the runtime system in `rts`. 
     344 
     345 * Finally, the stage 1 compiler is used to build GHC itself again, 
     346   this time against the libraries we just built.  This GHC is called 
     347   stage 2, and can be invokes as `inplace/bin/ghc-stage2`. 
     348 
     349There's an optional final stage, using the stage 2 compiler to build a 
     350stage 3 compiler, but this isn't strictly necessary, and is only used 
     351to check that the stage 2 compiler is working properly. 
     352 
     353 
    326354=== What to do after `make` has finished === 
    327355 
     
    356384 * or just [wiki:ReportABug] 
    357385 
    358 == Components of the build == 
    359  
    360 Here is a high level view of what happens when you build GHC: 
    361  
    362  * First, we build a few packages that GHC itself depends on, such as 
    363    `Cabal`, and `filepath`, using your installed GHC.  These packages 
    364    are under `libraries`, and each is built in a subdirectory 
    365    `dist-boot`; for example the bootstrap build of Cabal will be in 
    366    `libraries/Cabal/dist-boot`. 
    367  
    368  * Then we build GHC against these packages, still using your 
    369    installed GHC.  This is called the "stage 1" compiler (see 
    370    [wiki:Building/Architecture#Idiom:stages stages]).  You can run the 
    371    stage 1 compiler by invoking `inplace/bin/ghc-stage1`.  The stage 1 
    372    build of GHC happens in `compiler/stage1`. 
    373  
    374  * The stage 1 compiler is now used to build all the packages in the 
    375    `libraries` subdirectory, and the runtime system in `rts`. 
    376  
    377  * Finally, the stage 1 compiler is used to build GHC itself again, 
    378    this time against the libraries we just built.  This GHC is called 
    379    stage 2, and can be invokes as `inplace/bin/ghc-stage2`. 
    380  
    381 There's an optional final stage, using the stage 2 compiler to build a 
    382 stage 3 compiler, but this isn't strictly necessary, and is only used 
    383 to check that the stage 2 compiler is working properly. 
    384386 
    385387 
     
    419421 
    420422Each subdirectory of the source tree has a 
    421 [wiki:BuildSystem/Architecture#Idiom:stubmakefiles stub makefile], 
     423[wiki:Building/Architecture#Idiom:stubmakefiles stub makefile], 
    422424most of which follow this pattern: 
    423425