Go to the previous, next section.

Installing GNU CC

Here is the procedure for installing GNU CC on a Unix system.

See below for VMS systems, and modified procedures needed on other systems including HP, Sun, 3b1, SCO Unix and Unos.

The following section says how to compile in a separate directory on Unix; here we assume you compile in the same directory that contains the source files.

You cannot install GNU C by itself on MSDOS; it will not compile under any MSDOS compiler except itself. You need to get the complete compilation package DJGPP, which includes binaries as well as sources, and includes all the necessary compilation tools and libraries.

  1. If you have built GNU CC previously in the same directory for a different target machine, do `make distclean' to delete all files that might be invalid. One of the files this deletes is `Makefile'; if `make distclean' complains that `Makefile' does not exist, it probably means that the directory is already suitably clean.

  2. On a System V release 4 system, make sure `/usr/bin' precedes `/usr/ucb' in PATH. The cc command in `/usr/ucb' uses libraries which have bugs.

  3. Specify the host and target machine configurations. You do this by running the file `configure' with appropriate arguments.

    If you are building a compiler to produce code for the machine it runs on, specify just one machine type, with the `--target' option; the host type will default to be the same as the target. (For information on building a cross-compiler, see section Building and Installing a Cross-Compiler.) Here is an example:

    configure --target=sparc-sun-sunos4.1
    

    If you run `configure' without specifying configuration arguments, `configure' tries to guess the type of host you are on, and uses that configuration type for both host and target. So you don't need to specify a configuration, for building a native compiler, unless `configure' cannot figure out what your configuration is.

    A configuration name may be canonical or it may be more or less abbreviated.

    A canonical configuration name has three parts, separated by dashes. It looks like this: `cpu-company-system'. (The three parts may themselves contain dashes; `configure' can figure out which dashes serve which purpose.) For example, `m68k-sun-sunos4.1' specifies a Sun 3.

    You can also replace parts of the configuration by nicknames or aliases. For example, `sun3' stands for `m68k-sun', so `sun3-sunos4.1' is another way to specify a Sun 3. You can also use simply `sun3-sunos', since the version of SunOS is assumed by default to be version 4. `sun3-bsd' also works, since `configure' knows that the only BSD variant on a Sun 3 is SunOS.

    You can specify a version number after any of the system types, and some of the CPU types. In most cases, the version is irrelevant, and will be