Changes between Version 4 and Version 5 of Building/Architecture


Ignore:
Timestamp:
Mar 30, 2009 2:43:26 PM (5 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Building/Architecture

    v4 v5  
    122122Stage 1 does not support interactive execution (GHCi) and Template Haskell.  The reason being that when running byte code we must dynamically link the packages, and only in stage 2 and later can we guarantee that the packages we dynamically link are compatible with those that GHC was built against (because they are the very same packages). 
    123123 
     124 
    124125=== Idiom: distdir === 
    125126 
     
    397398The moral of the story is, avoid white space unless you're sure it'll be OK! 
    398399 
     400=== Idiom: platform names === 
     401 
     402There are three platforms of interest when building GHC: 
     403 
     404 * `$(BUILDPLATFORM)`: The ''build'' platform.[[br]] 
     405   The platform on which we are doing this build. 
     406 
     407 * `$(HOSTPLATFORM)`: The ''host'' platform.[[br]] 
     408   The platform on which these binaries will run. 
     409 
     410 * `$(TARGETPLATFORM)`: The ''target'' platform.[[br]] 
     411   The platform for which this compiler will generate code. 
     412       
     413These platforms are set when running the 
     414{{{configure}}} script, using the 
     415{{{--build}}}, {{{--host}}}, and 
     416{{{--target}}} options.  The {{{mk/project.mk}}} 
     417file, which is generated by `configure` from [http://darcs.haskell.org/mk/project.mk.in project.mk.in], defines several symbols related to the platform settings. 
     418 
     419We don't currently support build and host being different, because 
     420the build process creates binaries that are both run during the build, 
     421and also installed. 
     422 
     423If host and target are different, then we are building a 
     424cross-compiler.  For GHC, this means a compiler 
     425which will generate intermediate .hc files to port to the target 
     426architecture for bootstrapping.  The libraries and stage 2 compiler 
     427will be built as HC files for the target system (see [wiki:Building/Porting Porting GHC] for details). 
     428 
     429More details on when to use BUILD, HOST or TARGET can be found in 
     430the comments in [http://darcs.haskell.org/mk/project.mk.in project.mk.in]. 
    399431 
    400432