X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fbuilding%2Fbuilding.sgml;h=3163611a175129e35d2f452977a572768d155fc5;hb=c53eacfc26ad223d987327c387624d2108d1a2db;hp=4d25aa299868a6a5b3dd8ad4b917a4be47f5559d;hpb=dbe5cd5dfae18ed6ee73eb768b92ef857e14c87d;p=ghc-hetmet.git
diff --git a/docs/building/building.sgml b/docs/building/building.sgml
index 4d25aa2..3163611 100644
--- a/docs/building/building.sgml
+++ b/docs/building/building.sgml
@@ -58,7 +58,7 @@
the parser specifications. If you don't want to alter the
parser then this saves you having to find and install
happy. You will still need a working
- version of GHC (preferably version 4.08+) on your machine in
+ version of GHC (version 5.x or later) on your machine in
order to compile (most of) the sources, however.
@@ -137,6 +137,12 @@
Set your $CVSROOT environment variable to
:pserver:anoncvs@glass.cse.ogi.edu:/cvs
+ If you set $CVSROOT in a shell script, be sure not to
+ have any trailing spaces on that line, otherwise CVS will respond with
+ a perplexing message like
+
+ /cvs : no such repository
+
Run the command
@@ -1000,12 +1006,21 @@ $ cvs checkout nofib/spectral
sparc-sun-solaris2
sparc-sun-solaris2
- Fully supported (at least for Solaris 2.7),
+ Fully supported (at least for Solaris 2.7 and 2.6),
including native-code generator.
+ sparc-unknown-openbsd
+ sparc-unknown-openbsd
+
+ Supported, including native-code generator. The
+ same should also be true of NetBSD
+
+
+
+
hppa1.1-hp-hpux (HP-PA boxes running HPUX 9.x)
hppa1.1-hp-hpux
@@ -1080,8 +1095,8 @@ $ cvs checkout nofib/spectral
ia64-unknown-linux
ia64-unknown-linux
- GHC currently works unregisterised. A registerised
- port is in progress.
+ Supported, except there is no native code
+ generator.
@@ -1107,6 +1122,14 @@ $ cvs checkout nofib/spectral
+ mips64-sgi-irix6
+ mips-sgi-irix6
+
+ GHC currently works unregisterised.
+
+
+
+
powerpc-ibm-aix
powerpc-ibm-aix
@@ -1275,23 +1298,24 @@ $ cvs checkout nofib/spectral
- Autoconf
- pre-supposed: Autoconf
- Autoconf, pre-supposed
+ autoconf
+ pre-supposed: autoconf
+ autoconf, pre-supposed
- GNU Autoconf is needed if you intend to build from the
+ GNU autoconf is needed if you intend to build from the
CVS sources, it is not needed if you
just intend to build a standard source distribution.
- Version 2.52 or later of autoconf is required.
- NB. vesrion 2.13 will no longer work, as of GHC version
+ Version 2.52 or later of the autoconf package is required.
+ NB. version 2.13 will no longer work, as of GHC version
6.1.
- Autoconf builds the configure
- script from configure.ac and
- aclocal.m4. If you modify either of
- these files, you'll need autoconf to
- rebuild configure.
+ autoreconf (from the autoconf package)
+ recursively builds configure scripts from
+ the corresponding configure.ac and
+ aclocal.m4 files. If you modify one of
+ the latter files, you'll need autoreconf to
+ rebuild the corresponding configure.
@@ -1411,7 +1435,8 @@ $ cvs checkout nofib/spectral
want a completely standard build, then the following should
work:
-$ ./configure
+$ autoreconf
+$ ./configure
$ make
$ make install
@@ -1582,26 +1607,32 @@ $ make install
Change directory to
$(FPTOOLS_TOP) and
- issue the command
- autoconfautoconf
- (with no arguments). This GNU program converts
- $(FPTOOLS_TOP)/configure.ac
+ issue the command
+
+autoreconf
+
+ autoreconf
+ (with no arguments). This GNU program (recursively) converts
+ $(FPTOOLS_TOP)/configure.ac and
+ $(FPTOOLS_TOP)/aclocal.m4
to a shell script called
$(FPTOOLS_TOP)/configure.
+ If autoreconf bleats that it can't write the file configure,
+ then delete the latter and try again. Note that you must use autoreconf,
+ and not the old autoconf! If you erroneously use the latter, you'll get
+ a message like "No rule to make target 'mk/config.h.in'".
- Some projects, including GHC, have their own
- configure script. If there's an
- $(FPTOOLS_TOP)/<project>/configure.ac,
- then you need to run autoconf in that
- directory too.
-
- Both these steps are completely
- platform-independent; they just mean that the
- human-written file (configure.ac) can
- be short, although the resulting shell script,
- configure, and
- mk/config.h.in, are long.
+ Some projects, including GHC, have their own configure script.
+ autoreconf takes care of that, too, so all you have
+ to do is calling autoreconf in the top-level directory
+ $(FPTOOLS_TOP).
+
+ These steps are completely platform-independent; they just mean
+ that the human-written files (configure.ac and
+ aclocal.m4) can be short, although the resulting
+ files (the configure shell scripts and the C header
+ template mk/config.h.in) are long.
@@ -1705,13 +1736,6 @@ $ make install
-
- configure caches the results of
- its run in config.cache. Quite often
- you don't want that; you're running
- configure a second time because
- something has changed. In that case, simply delete
- config.cache.
@@ -1876,21 +1900,13 @@ $ cd /scratch/joe-bloggs/myfptools-sun4
Prepare for system configuration:
-$ autoconf
+$ autoreconf
(You can skip this step if you are starting from a
source distribution, and you already have
configure and
mk/config.h.in.)
-
- Some projects, including GHC itself, have their own
- configure scripts, so it is necessary to run autoconf again
- in the appropriate subdirectories. eg:
-
-
-$ (cd ghc; autoconf)
-
@@ -3829,7 +3845,13 @@ GhcStage2HcOpts = -O -fvia-C -keep-hc-files
change TARGETPLATFORM
- appropriately.
+ appropriately, and set the variables involving
+ TARGET to the correct values for
+ the target platform. This step is necessary because
+ currently configure doesn't cope
+ with specifying different values for the
+ --host and
+ --target flags.
copy LeadingUnderscore
@@ -3837,7 +3859,7 @@ GhcStage2HcOpts = -O -fvia-C -keep-hc-files
-
+
Copy
T/ghc/includes/config.h
@@ -4078,10 +4100,13 @@ Hello World!
To support GHCi, you need to port the dynamic linker
(fptools/ghc/rts/Linker.c). The linker
currently supports the ELF and PEi386 object file formats - if
- your platform uses one of these then you probably don't have
- to do anything except fiddle with the
- #ifdefs at the top of
- Linker.c to tell it about your OS.
+ your platform uses one of these then things will be
+ significantly easier. The majority of Unix platforms use the
+ ELF format these days. Even so, there are some
+ machine-specific parts of the ELF linker: for example, the
+ code for resolving particular relocation types is
+ machine-specific, so some porting of this code to your
+ architecture will probaly be necessary.
If your system uses a different object file format, then
you have to write a linker — good luck!
@@ -4413,14 +4438,34 @@ but you do need it to build GHC.
Install Cygwin from http://www.cygwin.com/.
The installation process is straightforward; we install it in c:/cygwin.
-During the installation dialogue, make sure that you select:
-cvs, openssh,
-autoconf,
-binutils (includes ld and (I think) ar),
-gcc,
-flex,
-make.
-
+During the installation dialogue, make sure that you select all of the following:
+
+
+ cvs,
+
+
+ openssh,
+
+
+ autoconf,
+
+
+ binutils (includes ld and (I think) ar),
+
+
+ gcc,
+
+
+ flex,
+
+
+ make.
+
+
+If you miss out any of these, strange things will happen to you. To see thse packages,
+click on the "View" button in the "Select Packages"
+stage of Cygwin's installation dialogue, until the view says "Full". The default view, which is
+"Category" isn't very helpful, and the "View" button is rather unobtrousive.
Now set the following user environment variables:
@@ -4440,7 +4485,7 @@ don't do this you get very weird messages when you type
Set SHELL to
-c:/cygwin/bin/sh. When you invoke a shell in Emacs, this
+c:/cygwin/bin/bash. When you invoke a shell in Emacs, this
SHELL is what you get.
@@ -4662,9 +4707,8 @@ you about Windows-specific wrinkles.
-Run autoconf both in fptools
-and in fptools/ghc. If you omit the latter step you'll
-get an error when you run ./configure:
+If you used autoconf instead of autoreconf,
+you'll get an error when you run ./configure:
...lots of stuff...
creating mk/config.h
@@ -4677,8 +4721,8 @@ configure: error: ./configure failed for ghc
- autoconf seems to create the file configure
-read-only. So if you need to run autoconf again (which I sometimes do for safety's sake),
+ autoreconf seems to create the file configure
+read-only. So if you need to run autoreconf again (which I sometimes do for safety's sake),
you get
/usr/bin/autoconf: cannot create configure: permission denied
@@ -4704,7 +4748,7 @@ can be really confusing.
- After autoconf run ./configure in
+ After autoreconf run ./configure in
fptools/ thus: