Allow returning something of type void in a function that returns void
[delight/core.git] / INSTALL
blob5c5004463e88692cf9a19ecdb5ffa6ddbff1e425
1 Build Instructions
3 Required source packages
5     * The "core" package of a recent GCC 3.4.x, 4.0.x, or 4.1.x release.
6     * The GDC source package.
7       
8 Required software
10     * The usual GCC requirements (http://gcc.gnu.org/install/prerequisites.html)
11     * An existing C++ compiler (even if you use "make bootstrap").  G++
12       3.x, 4.0.1, and later versions are known to work.  G++ 2.x and
13       4.0.0 are known to not work.
15     For runtime requirements, see the README document.
17 Directories
19     * <srcdir> -- Location of the GCC sources
20     * <builddir> -- Build directory for GCC
21     * <prefix> -- Install directory for GCC
23 Building the Compiler and Runtime Library
25    1. Unpack the GCC archive.  This creates <srcdir>.
26    2. Change the the <srcdir>/gcc directory.
27    3. Unpack the GDC archive.  This will create a subdirectory named "d".
28    4. Change back to <srcdir> and run the setup script:
30       ./gcc/d/setup-gcc.sh
32       If the source was obtained from Subversion, use
33       --d-language-version to specify which version of the D language
34       to use:
36       ./gcc/d/setup-gcc.sh --d-language-version=2
38       Note that this creates a file in the d/ source directory.
40    5. Build GCC using the normal install instructions.  The only difference is
41       that "d" is added to the --enable-languages option.
43       If you need to specify a compiler to build GCC other than the
44       system's default, change the PATH, or use the "CC" and "CXX"
45       environment variables. Example:
47       CC=gcc3 CXX=g++3 <srcdir>/configure --prefix=/usr/local/gcc-3.4 --enable-languages=c,d,c++
49       Remember to always use "gmake" if GNU Make is not the system's default.
51    6. Install with "make install". 
54 Building a Cross Compiler
56 (This section is not complete)
58 Building a cross compiler takes some extra effort now (except for
59 MinGW.)  It will become more automated as people contribute
60 information for various targets.
62 You will need to create two files (three for a unix target) that are
63 normally generated during a native build.  The files are frag-gen,
64 frag-math, and (for unix) frag-unix.  Here are some ways to create the
65 files:
67     * Do a native build and see what is required.  The files will be
68       in <builddir>/<target>/libphobos.
69     * Look at the existing files in
70       <srcdir>/gcc/d/phobos/config/mingw.
71     * Once you have a C cross-compiler, just compile gen_config1.c,
72       gen_math.c, gen_unix.c, run them on the target, and copy the
73       files back to your build system.
75 Once you have the files, put them in a directory and configure with
76 the option --enable-phobos-config-dir=<dir>.
79 Runtime Library Notes
81     * To run the unit tests, run "make check-target-libphobos".
82           o On some targets, std.math tests will fail because there is
83             no 80-bit real (or library support for it.)
84           o On some targets, std.conv tests will fail because the
85             floating point conversion functions do not work as
86             expected.
87           o On FreeBSD and Linux, the test of the "%A" format will fail due
88             to a library bug.