[project @ 2005-02-14 17:00:31 by simonmar]
[ghc-hetmet.git] / docs / building / building.xml
index d8683c6..ae22c81 100644 (file)
@@ -2752,8 +2752,8 @@ directive.
              </varlistentry>
 
              <varlistentry>
-               <term><literal>EXCLUDE_SRCS</literal>
-                  <indexterm><primary><literal>EXCLUDE_SRCS</literal></primary></indexterm>
+               <term><literal>EXCLUDED_SRCS</literal>
+                  <indexterm><primary><literal>EXCLUDED_SRCS</literal></primary></indexterm>
                 </term>
                <listitem>
                  <para>Set to a list of source files (relative to the
@@ -2771,7 +2771,7 @@ directive.
 
              <varlistentry>
                <term><literal>EXTRA_SRCS</literal>
-                  <indexterm><primary><literal>EXCLUDE_SRCS</literal></primary></indexterm>
+                  <indexterm><primary><literal>EXTRA_SRCS</literal></primary></indexterm>
                 </term>
                  <listitem>
                  <para>Set to a list of extra source files (perhaps
@@ -3540,20 +3540,19 @@ $ make install</screen>
 
       <para>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.</para>
+      as HC files) from another GHC compilation, compiling them using gcc to
+       get a working GHC.</para>
 
       <para><emphasis>NOTE: GHC versions 5.xx were hard to bootstrap
       from C.  We recommend using GHC 6.0.1 or
       later.</emphasis></para>
 
       <para>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
-      <emphasis>unregisterised</emphasis> HC files - see <xref
-      linkend="unregisterised-porting"/>.</para>
+       that were generated on <emphasis>the same platform</emphasis>.  There
+       may be some supplied on the GHC download page, otherwise you'll have to
+       compile some up yourself, or start from
+       <emphasis>unregisterised</emphasis> HC files - see <xref
+         linkend="unregisterised-porting"/>.</para>
 
       <para>The following steps should result in a working GHC build
       with full libraries:</para>
@@ -3650,6 +3649,13 @@ $ make install</screen>
       <sect3>
        <title>Cross-compiling to produce an unregisterised GHC</title>
 
+       <para>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 <ulink
+           url="http://www.haskell.org/ghc/">GHC&nbsp;homepage</ulink>.</para>  
+
        <para>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</screen>
   
            <listitem>
 <screen>$ cd <replaceable>T</replaceable>/ghc/includes
-$ make config.h</screen>
+$ make ghcconfig.h</screen>
            </listitem>
          </itemizedlist>
          </listitem>
@@ -3714,13 +3720,16 @@ $ ./configure</screen>
              with the following contents:</para>
 
 <programlisting>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</programlisting>
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O -fvia-C -keep-hc-files
+SRC_HC_OPTS += -H32m
+GhcBootLibs = YES</programlisting>
            </listitem>
 
            <listitem>
@@ -3746,7 +3755,7 @@ GhcStage2HcOpts = -O -fvia-C -keep-hc-files</programlisting>
 
            <listitem>
              <para>Copy
-             <filename><replaceable>T</replaceable>/ghc/includes/config.h</filename>
+             <filename><replaceable>T</replaceable>/ghc/includes/ghcconfig.h</filename>
              to
              <filename><replaceable>H</replaceable>/ghc/includes</filename>.
              Note that we are building on the host machine, using the
@@ -3757,9 +3766,9 @@ GhcStage2HcOpts = -O -fvia-C -keep-hc-files</programlisting>
            </listitem>
 
              <listitem>
-               <para>Touch <literal>config.h</literal>, just to make
+               <para>Touch <literal>ghcconfig.h</literal>, just to make
                sure it doesn't get replaced during the build:</para>
-<screen>$ touch <replaceable>H</replaceable>/ghc/includes/config.h</screen>
+<screen>$ touch <replaceable>H</replaceable>/ghc/includes/ghcconfig.h</screen>
              </listitem>
 
            <listitem>
@@ -3776,15 +3785,17 @@ $ make boot &amp;&amp; make</screen>
            </listitem>
 
            <listitem>
-<screen>$ cd <replaceable>H</replaceable>/ghc
+<screen>$ cd <replaceable>H</replaceable>/ghc/compiler
 $ make boot stage=2 &amp;&amp; make stage=2</screen>
            </listitem>
-           
+
            <listitem>
-<screen>$ cd <replaceable>H</replaceable>/ghc/utils
+<screen>$ cd <replaceable>H</replaceable>/ghc/lib
+$ make clean
+$ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files'
+$ cd <replaceable>H</replaceable>/ghc/utils
 $ make clean
-$ make -k HC=<replaceable>H</replaceable>/ghc/compiler/stage1/ghc-inplace \
-               EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files'</screen>
+$ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files'</screen>
            </listitem>
            
            <listitem>