Changes between Version 19 and Version 20 of Building/Porting


Ignore:
Timestamp:
May 18, 2009 8:05:42 AM (5 years ago)
Author:
simonmar
Comment:

tweaks to new porting docs

Legend:

Unmodified
Added
Removed
Modified
  • Building/Porting

    v19 v20  
    8181The first step in porting to a new platform is to get an 
    8282''unregisterised'' build working.  An unregisterised build is one that 
    83 compiles via vanilla C only. Tist costs about a factor of two in 
     83compiles via vanilla C only. This costs about a factor of two in 
    8484performance, but since unregisterised compilation is usually just a step 
    8585on the way to a full registerised port, we don't mind too much. 
     
    125125 
    126126{{{ 
    127 $ cd <T> 
    128 $ sh boot 
    129 $ ./configure --enable-hc-boot 
     127<T>$ sh boot 
     128<T>$ ./configure --enable-hc-boot 
    130129}}} 
    131130 
     
    134133 
    135134{{{ 
    136 $ make bootstrapping-files 
     135<T>$ make bootstrapping-files 
    137136}}} 
    138137 
    139138'''On the host machine''' 
    140139 
    141 Unpack a source tree (same released version, with the extra libs).  Call this directory `<H>`. 
    142  
    143 {{{ 
    144 $ cd <H> 
    145 $ sh boot 
    146 $ ./configure 
     140Unpack a source tree (exactly the same version as before).  Call this directory `<H>`. 
     141 
     142{{{ 
     143<H>$ sh boot 
     144<H>$ ./configure 
    147145}}} 
    148146 
     
    182180 
    183181{{{ 
    184 $ make 
     182<H>$ make 
    185183}}} 
    186184 
     
    189187 
    190188{{{ 
    191 $ cd <H> 
    192 $ rm -f list mkfiles boot.tar.gz 
    193 $ find . -name "*.hc" >> list 
    194 $ find . -name "*_stub.*" >> list 
    195 $ find . -name package-data.mk >> list 
    196 $ find . -name package.conf >> list 
    197 $ find . -name package.conf.inplace >> list 
    198 $ echo compiler/main/Config.hs >> list 
    199 $ find . -name .depend | sed -e 's/^/mkdir -p `dirname /' -e 's/$/`/' >> mkfiles 
    200 $ find . -name .depend | sed "s/^/touch /" >> mkfiles 
    201 $ echo mkfiles >> list 
    202 $ tar -zcf boot.tar.gz -T list 
     189<H>$ rm -f list mkfiles boot.tar.gz 
     190<H>$ find . -name "*.hc" >> list 
     191<H>$ find . -name "*_stub.*" >> list 
     192<H>$ find . -name package-data.mk >> list 
     193<H>$ find . -name package.conf >> list 
     194<H>$ find . -name package.conf.inplace >> list 
     195<H>$ echo compiler/main/Config.hs >> list 
     196<H>$ find . -name .depend | sed -e 's/^/mkdir -p `dirname /' -e 's/$/`/' >> mkfiles 
     197<H>$ find . -name .depend | sed "s/^/touch /" >> mkfiles 
     198<H>$ echo mkfiles >> list 
     199<H>$ tar -zcf boot.tar.gz -T list 
    203200}}} 
    204201 
     
    206203 
    207204{{{ 
    208 $ cd <T> 
    209 $ cp /bin/pwd utils/ghc-pwd/ghc-pwd 
    210 }}} 
    211  
    212 {{{ 
    213 $ sh boot 
    214 $ ./configure --enable-hc-boot 
     205<T>$ cp /bin/pwd utils/ghc-pwd/ghc-pwd 
     206}}} 
     207 
     208{{{ 
     209<T>$ sh boot 
     210<T>$ ./configure --enable-hc-boot 
    215211}}} 
    216212 
     
    218214 
    219215{{{ 
    220 $ tar --touch -zxf boot.tar.gz 
    221 $ sh mkfiles 
     216<T>$ tar --touch -zxf boot.tar.gz 
     217<T>$ sh mkfiles 
    222218}}} 
    223219 
     
    240236 
    241237{{{ 
    242 $ for c in libraries/*/configure; do ( cd `dirname $c`; ./configure ); done 
    243 }}} 
    244  
    245 {{{ 
    246 $ sed -i .bak "s#<H>#<T>#g" */*/package-data.mk */*/*/package-data.mk 
    247 $ touch -r compiler/stage2/package-data.mk */*/package-data.mk */*/*/package-data.mk 
     238<T>$ for c in libraries/*/configure; do ( cd `dirname $c`; ./configure ); done 
     239}}} 
     240 
     241{{{ 
     242<T>$ sed -i .bak "s#<H>#<T>#g" */*/package-data.mk */*/*/package-data.mk 
     243<T>$ touch -r compiler/stage2/package-data.mk */*/package-data.mk */*/*/package-data.mk 
    248244}}} 
    249245 
     
    252248 
    253249{{{ 
    254 $ make bootstrapping-files 
    255 }}} 
    256  
    257 {{{ 
    258 $ make all_ghc_stage2 2>&1 | tee log 
     250<T>$ make bootstrapping-files 
     251}}} 
     252 
     253{{{ 
     254<T>$ make all_ghc_stage2 2>&1 | tee log 
    259255}}} 
    260256