supported method, and you may encounter difficulties. Full
instructions are in <xref linkend="sec-porting-ghc"/>.</para>
- <para>Which version of GHC you need will depend on the
- packages you intend to build. GHC itself will normally
- build using one of several older versions of itself - check
- the announcement or release notes for details.</para>
+ <para>GHC can be built using either an earlier released
+ version of GHC (currently 5.04 and later are supported), or
+ bootstrapped using a GHC built from exactly the same
+ sources. Note that this means you cannot in general build
+ GHC using an arbitrary development snapshot, or a build from
+ say last week. It might work, it might not - we don't
+ guarantee anything. To be on the safe side, start your
+ build using the most recently released stable version of
+ GHC.</para>
</listitem>
</varlistentry>
$ ./configure --enable-hc-boot --enable-hc-boot-unregisterised</screen>
<para>You might need to update
- <filename>configure.in</filename> to recognise the new
+ <filename>configure.ac</filename> to recognise the new
platform, and re-generate
<filename>configure</filename> with
<literal>autoreconf</literal>.</para>
</listitem>
<listitem>
-<screen>$ cd <replaceable>T</replaceable>/ghc/includes
+<screen>$ cd <replaceable>T</replaceable>/includes
$ make</screen>
</listitem>
</itemizedlist>
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O -fvia-C -keep-hc-files
SRC_HC_OPTS += -H32m
-GhcBootLibs = YES</programlisting>
+GhcBootLibs = YES
+GhcWithSMP = NO</programlisting>
</listitem>
<listitem>
<listitem>
<para>Copy
- <filename><replaceable>T</replaceable>/ghc/includes/ghcautoconf.h</filename>, <filename><replaceable>T</replaceable>/ghc/includes/DerivedConstants.h</filename>, and <filename><replaceable>T</replaceable>/ghc/includes/GHCConstants.h</filename>
+ <filename><replaceable>T</replaceable>/includes/ghcautoconf.h</filename>, <filename><replaceable>T</replaceable>/includes/DerivedConstants.h</filename>, and <filename><replaceable>T</replaceable>/includes/GHCConstants.h</filename>
to
- <filename><replaceable>H</replaceable>/ghc/includes</filename>.
+ <filename><replaceable>H</replaceable>/includes</filename>.
Note that we are building on the host machine, using the
target machine's configuration files. This
is so that the intermediate C files generated here will
<listitem>
<para>Touch the generated configuration files, just to make
sure they don't get replaced during the build:</para>
-<screen>$ cd <filename><replaceable>H</replaceable></filename>/ghc/includes
+<screen>$ cd <filename><replaceable>H</replaceable></filename>/includes
$ touch ghcautoconf.h DerivedConstants.h GHCConstants.h mkDerivedConstants.c
$ touch mkDerivedConstantsHdr mkDerivedConstants.o mkGHCConstants mkGHCConstants.o</screen>
-
- <para>Note: it has been reported that these files still get
- overwritten during the next stage. We have installed a fix
- for this in GHC 6.4.2, but if you are building a version
- before that you need to watch out for these files getting
- overwritte by the <literal>Makefile</literal> in
- <literal>ghc/includes</literal>. If your system supports
- it, you might be able to prevent it by making them
- immutable:</para>
-<screen>$ chflags uchg ghc/includes/{ghcautoconf.h,DerivedConstants.h,GHCConstants.h}</screen>
</listitem>
<listitem>
<para>Now build the compiler:</para>
-<screen>$ cd <replaceable>H</replaceable>/glafp-utils && make boot && make
-$ cd <replaceable>H</replaceable>/ghc && make boot && make</screen>
- <para>Don't worry if the build falls over in the RTS, we
- don't need the RTS yet.</para>
+<screen>$ cd <replaceable>H</replaceable>/utils/mkdependC && make boot && make
+$ cd <replaceable>H</replaceable>/includes && make boot && make
+$ cd <replaceable>H</replaceable>/compat && make boot && make
+$ cd <replaceable>H</replaceable>/utils && make boot && make
+$ cd <replaceable>H</replaceable>/compiler && make boot && make
+$ cd <replaceable>H</replaceable>/rts && make boot && make</screen>
+ <para>Don't worry if the build falls over in the RTS, we
+ don't need the RTS yet.</para>
</listitem>
<listitem>
</listitem>
<listitem>
-<screen>$ cd <replaceable>H</replaceable>/ghc/compiler
+<screen>$ cd <replaceable>H</replaceable>/compiler
$ make boot stage=2 && make stage=2</screen>
</listitem>
$ make clean
$ rm .depend
$ make boot UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files'
-$ cd <replaceable>H</replaceable>/ghc/utils
+$ cd <replaceable>H</replaceable>/utils
$ make clean
$ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files'</screen>
</listitem>