-@c Copyright (C) 1988, 89, 92-99, 2000 Free Software Foundation, Inc.
+@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@c The text of this file appears in the file INSTALL
@c in the GCC distribution, as well as in the GCC manual.
-Note most of this information is out of date and superseded by the EGCS
-install procedures. It is provided for historical reference only.
+Note most of this information is out of date and superseded by the
+online GCC install procedures @uref{http://gcc.gnu.org/install/}. It is
+provided for historical reference only.
@ifclear INSTALLONLY
@node Installation
@cindex Bison parser generator
@cindex parser generator, Bison
@item
-Make sure the Bison parser generator is installed. (This is
-unnecessary if the Bison output files @file{c-parse.c} and
-@file{cexp.c} are more recent than @file{c-parse.y} and @file{cexp.y}
-and you do not plan to change the @samp{.y} files.)
+Make sure the Bison parser generator is installed. (This is unnecessary
+if the Bison output file @file{c-parse.c} is more recent than
+@file{c-parse.y},and you do not plan to change the @samp{.y} file.)
Bison versions older than Sept 8, 1988 will produce incorrect output
for @file{c-parse.c}.
This will slow down the compiler and may only work properly if you
are building the compiler with GNU C.
-The @file{configure} script searches subdirectories of the source
-directory for other compilers that are to be integrated into GNU CC.
-The GNU compiler for C++, called G++ is in a subdirectory named
-@file{cp}. @file{configure} inserts rules into @file{Makefile} to build
-all of those compilers.
-
-Here we spell out what files will be set up by @code{configure}. Normally
-you need not be concerned with these files.
-
-@itemize @bullet
-@item
-@ifset INTERNALS
-A file named @file{config.h} is created that contains a @samp{#include}
-of the top-level config file for the machine you will run the compiler
-on (@pxref{Config}). This file is responsible for defining information
-about the host machine. It includes @file{tm.h}.
-@end ifset
-@ifclear INTERNALS
-A file named @file{config.h} is created that contains a @samp{#include}
-of the top-level config file for the machine you will run the compiler
-on (@pxref{Config,,The Configuration File, gcc.info, Using and Porting
-GCC}). This file is responsible for defining information about the host
-machine. It includes @file{tm.h}.
-@end ifclear
-
-The top-level config file is located in the subdirectory @file{config}.
-Its name is always @file{xm-@var{something}.h}; usually
-@file{xm-@var{machine}.h}, but there are some exceptions.
-
-If your system does not support symbolic links, you might want to
-set up @file{config.h} to contain a @samp{#include} command which
-refers to the appropriate file.
-
-@item
-A file named @file{tconfig.h} is created which includes the top-level config
-file for your target machine. This is used for compiling certain
-programs to run on that machine.
-
-@item
-A file named @file{tm.h} is created which includes the
-machine-description macro file for your target machine. It should be in
-the subdirectory @file{config} and its name is often
-@file{@var{machine}.h}.
-@end itemize
-
@cindex Native Language Support
@cindex NLS
@item --enable-nls
@itemx --disable-nls
The @samp{--enable-nls} option enables Native Language Support (NLS),
which lets GCC output diagnostics in languages other than American
-English. No translations are available yet, so the main users of this
-option now are those translating GCC's diagnostics who want to test
-their work. Once translations become available, Native Language Support
-will become enabled by default. The @samp{--disable-nls} option
-disables NLS.
+English. Native Language Support is enabled by default if not doing a
+canadian cross build. The @samp{--disable-nls} option disables NLS.
@cindex @code{gettext}
@item --with-included-gettext
-If NLS is enabled, the GCC build procedure normally attempts to use the
-host's @code{gettext} libraries, and falls back on GCC's copy of the GNU
-@code{gettext} library only if the host libraries do not suffice. The
-@samp{--with-included-gettext} option causes the build procedure to
-prefer its copy of GNU @code{gettext}.
+If NLS is enbled, the @samp{--with-included-gettext} option causes the build
+procedure to prefer its copy of GNU @code{gettext}. This is the default. If
+you want the GCC build procedure to prefer the host's @code{gettext}
+libraries, use @samp{--without-included-gettext}.
@cindex @code{catgets}
@item --with-catgets
@code{gettext} library. The @samp{--with-catgets} option causes the
build procedure to use the host's @code{catgets} in this situation.
+@cindex @code{maintainer-mode}
+@item --enable-maintainer-mode
+The build rules that regenerate the GCC master message catalog
+@code{gcc.pot} are normally disabled. This is because it can only be rebuilt
+if the complete source tree is present. If you have changed the sources and
+want to rebuild the catalog, configuring with
+@samp{--enable-maintainer-mode} will enable this. Note that you need a
+special version of the @code{gettext} tools to do so.
+
@cindex Windows32 Registry support
@item --enable-win32-registry
@itemx --enable-win32-registry=@var{KEY}
@samp{LANGUAGES=c} specifies that only the C compiler should be
compiled. The makefile normally builds compilers for all the supported
-languages; currently, C, C++ and Objective C. However, C is the only
-language that is sure to work when you build with other non-GNU C
-compilers. In addition, building anything but C at this stage is a
-waste of time.
+languages; currently, C, C++, Objective C, Java, FORTRAN, and CHILL.
+However, C is the only language that is sure to work when you build with
+other non-GNU C compilers. In addition, building anything but C at this
+stage is a waste of time.
In general, you can specify the languages to build by typing the
argument @samp{LANGUAGES="@var{list}"}, where @var{list} is one or more
-words from the list @samp{c}, @samp{c++}, and @samp{objective-c}. If
-you have any additional GNU compilers as subdirectories of the GNU CC
-source directory, you may also specify their names in this list.
+words from the list @samp{c}, @samp{c++}, @samp{objective-c},
+@samp{java}, @samp{f77}, and @samp{CHILL}. If you have any additional
+GNU compilers as subdirectories of the GNU CC source directory, you may
+also specify their names in this list.
Ignore any warnings you may see about ``statement not reached'' in
@file{insn-emit.c}; they are normal. Also, warnings about ``unknown
escape sequence'' are normal in @file{genopinit.c} and perhaps some
other files. Likewise, you should ignore warnings about ``constant is
so large that it is unsigned'' in @file{insn-emit.c} and
-@file{insn-recog.c}, a warning about a comparison always being zero
-in @file{enquire.o}, and warnings about shift counts exceeding type
-widths in @file{cexp.y}. Any other compilation errors may represent bugs in
+@file{insn-recog.c}, and a warning about a comparison always being zero
+in @file{enquire.o}. Any other compilation errors may represent bugs in
the port to your machine or operating system, and
@ifclear INSTALLONLY
should be investigated and reported (@pxref{Bugs}).
compiler.)
@item
-@cindex C++ runtime library
-@cindex @code{libstdc++}
-If you're going to use C++, you need to install the C++ runtime library.
-This includes all I/O functionality, special class libraries, etc.
-
-The standard C++ runtime library for GNU CC is called @samp{libstdc++}.
-An obsolescent library @samp{libg++} may also be available, but it's
-necessary only for older software that hasn't been converted yet; if
-you don't know whether you need @samp{libg++} then you probably don't
-need it.
-
-Here's one way to build and install @samp{libstdc++} for GNU CC:
-
-@itemize @bullet
-@item
-Build and install GNU CC, so that invoking @samp{gcc} obtains the GNU CC
-that was just built.
-
-@item
-Obtain a copy of a compatible @samp{libstdc++} distribution. For
-example, the @samp{libstdc++-2.8.0.tar.gz} distribution should be
-compatible with GCC 2.8.0. GCC distributors normally distribute
-@samp{libstdc++} as well.
-
-@item
-Set the @samp{CXX} environment variable to @samp{gcc} while running the
-@samp{libstdc++} distribution's @file{configure} command. Use the same
-@file{configure} options that you used when you invoked GCC's
-@file{configure} command.
-
-@item
-Invoke @samp{make} to build the C++ runtime.
-
-@item
-Invoke @samp{make install} to install the C++ runtime.
-
-@end itemize
-
-To summarize, after building and installing GNU CC, invoke the following
-shell commands in the topmost directory of the C++ library distribution.
-For @var{configure-options}, use the same options that
-you used to configure GNU CC.
-
-@example
-$ CXX=gcc ./configure @var{configure-options}
-$ make
-$ make install
-@end example
-
-@item
GNU CC includes a runtime library for Objective-C because it is an
integral part of the language. You can find the files associated with
the library in the subdirectory @file{objc}. The GNU Objective-C
@c gmicro, fx80, spur and tahoe omitted since they don't work.
1750a, a29k, alpha, arm, avr, c@var{n}, clipper, dsp16xx, elxsi, fr30, h8300,
hppa1.0, hppa1.1, i370, i386, i486, i586, i686, i786, i860, i960, m32r,
-m68000, m68k, m88k, mcore, mips, mipsel, mips64, mips64el, mn10200, mn10300,
-ns32k, pdp11, powerpc, powerpcle, romp, rs6000, sh, sparc, sparclite,
-sparc64, v850, vax, we32k.
+m68000, m68k, m6811, m6812, m88k, mcore, mips, mipsel, mips64, mips64el,
+mn10200, mn10300, ns32k, pdp11, powerpc, powerpcle, romp, rs6000, sh, sparc,
+sparclite, sparc64, v850, vax, we32k.
@end quotation
Here are the recognized company names. As you can see, customary
@quotation
386bsd, aix, acis, amigaos, aos, aout, aux, bosx, bsd, clix, coff, ctix, cxux,
-dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, genix, gnu, linux-gnu,
-hiux, hpux, iris, irix, isc, luna, lynxos, mach, minix, msdos, mvs,
+dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, genix, gnu, linux,
+linux-gnu, hiux, hpux, iris, irix, isc, luna, lynxos, mach, minix, msdos, mvs,
netbsd, newsos, nindy, ns, osf, osfrose, ptx, riscix, riscos, rtu, sco, sim,
solaris, sunos, sym, sysv, udi, ultrix, unicos, uniplus, unos, vms, vsta,
vxworks, winnt, xenix.
number is most needed for @samp{sysv3} and @samp{sysv4}, which are often
treated differently.
+@samp{linux-gnu} is the canonical name for the GNU/Linux target; however
+GNU CC will also accept @samp{linux}. The version of the kernel in use is
+not relevant on these systems. A suffix such as @samp{libc1} or @samp{aout}
+distinguishes major versions of the C library; all of the suffixed versions
+are obsolete.
+
If you specify an impossible combination such as @samp{i860-dg-vms},
then you may get an error message from @file{configure}, or it may
ignore part of the information and do the best it can with the rest.
The MIL-STD-1750A cross configuration produces output for
@code{as1750}, an assembler/linker available under the GNU Public
License for the 1750A. @code{as1750} can be obtained at
-@emph{ftp://ftp.fta-berlin.de/pub/crossgcc/1750gals/}.
+@uref{ftp://ftp.fta-berlin.de/pub/crossgcc/1750gals/}.
A similarly licensed simulator for
the 1750A is available from same address.
@item arm-*-elf
This configuration is intended for embedded systems.
-@item arm-*-linux-gnuaout
+@item arm-*-linux*aout
Any of the ARM-family processors running the Linux-based GNU system with
the @file{a.out} binary format. This is an obsolete configuration.
-@item arm-*-linux-gnu
-@itemx arm-*-linux-gnuoldld
+@item arm-*-linux
+@itemx arm-*-linux-gnu
+@itemx arm-*-linux*oldld
Any of the ARM-family processors running the Linux-based GNU system with
the @file{ELF} binary format. You must use version 2.9.1.0.22 or later
of the GNU/Linux binutils, which you can download from
-@file{ftp.varesearch.com:/pub/support/hjl/binutils}.
+@uref{ftp://ftp.varesearch.com/pub/support/hjl/binutils/}.
These two configurations differ only in the required version of GNU
binutils. For binutils 2.9.1.0.x, use @samp{arm-*-linux-gnuoldld}. For
assembler shipped with RISC iX does not support stabs debugging
information; a new version of the assembler, with stabs support
included, is now available from Acorn and via ftp
-@file{ftp.acorn.com:/pub/riscix/as+xterm.tar.Z}. To enable stabs
+@uref{ftp://ftp.acorn.com/pub/riscix/as+xterm.tar.Z}. To enable stabs
debugging, pass @samp{--with-gnu-as} to configure.
You will need to install GNU @file{sed} before you can run configure.
@item avr
ATMEL AVR-family micro controllers. These are used in embedded
applications. There are no standard Unix configurations.
-Supports following MCU's:
- - AT90S23xx
- - ATtiny22
- - AT90S44xx
- - AT90S85xx
- - ATmega603/603L
- - ATmega103/103L
+@xref{AVR Options}, for the list of supported MCU types.
@item decstation-*
MIPS-based DECstations can support three different personalities:
@item elxsi-elxsi-bsd
The Elxsi's C compiler has known limitations that prevent it from
-compiling GNU C. Please contact @code{mrs@@cygnus.com} for more details.
+compiling GNU C. Please contact @email{mrs@@cygnus.com} for more details.
@item dsp16xx
A port to the AT&T DSP1610 family of processors.
first three arguments in function calls in registers. Structures are no
longer a multiple of 2 bytes.
-@item hppa*-*-*
-There are several variants of the HP-PA processor which run a variety
-of operating systems. GNU CC must be configured to use the correct
-processor type and operating system, or GNU CC will not function correctly.
-The easiest way to handle this problem is to @emph{not} specify a target
-when configuring GNU CC, the @file{configure} script will try to automatically
-determine the right processor type and operating system.
-
-@samp{-g} does not work on HP-UX, since that system uses a peculiar
-debugging format which GNU CC does not know about. However, @samp{-g}
-will work if you also use GAS and GDB in conjunction with GCC. We
-highly recommend using GAS for all HP-PA configurations.
-
-You should be using GAS-2.6 (or later) along with GDB-4.16 (or later). These
-can be retrieved from all the traditional GNU ftp archive sites.
-
-On some versions of HP-UX, you will need to install GNU @file{sed}.
-
-You will need to be install GAS into a directory before @code{/bin},
-@code{/usr/bin}, and @code{/usr/ccs/bin} in your search path. You
-should install GAS before you build GNU CC.
-
-To enable debugging, you must configure GNU CC with the @samp{--with-gnu-as}
-option before building.
-
@item i370-*-*
This port is very preliminary and has many known bugs. We hope to
have a higher-quality port for this machine soon.
-@item i386-*-linux-gnuoldld
+@item i386-*-linux*oldld
Use this configuration to generate @file{a.out} binaries on Linux-based
GNU systems if you do not have gas/binutils version 2.5.2 or later
installed. This is an obsolete configuration.
-@item i386-*-linux-gnuaout
+@item i386-*-linux*aout
Use this configuration to generate @file{a.out} binaries on Linux-based
GNU systems. This configuration is being superseded. You must use
gas/binutils version 2.5.2 or later.
-@item i386-*-linux-gnu
+@item i386-*-linux
+@itemx i386-*-linux-gnu
Use this configuration to generate ELF binaries on Linux-based GNU
systems. You must use gas/binutils version 2.5.2 or later.
Use this configuration for SCO release 3.2 version 4.
@item i386-*-sco3.2v5*
-Use this for the SCO OpenServer Release family including 5.0.0, 5.0.2,
-5.0.4, 5.0.5, Internet FastStart 1.0, and Internet FastStart 1.1.
-
-GNU CC can generate COFF binaries if you specify @samp{-mcoff} or ELF
-binaries, the default. A full @samp{make bootstrap} is recommended
-so that an ELF compiler that builds ELF is generated.
-
-You must have TLS597 from @uref{ftp://ftp.sco.com/TLS} installed for ELF
-C++ binaries to work correctly on releases before 5.0.4.
-
-The native SCO assembler that is provided with the OS at no charge
-is normally required. If, however, you must be able to use the GNU
-assembler (perhaps you have complex asms) you must configure this
-package @samp{--with-gnu-as}. To do this, install (cp or symlink)
-gcc/as to your copy of the GNU assembler. You must use a recent version
-of GNU binutils; version 2.9.1 seems to work well. If you select this
-option, you will be unable to build COFF images. Trying to do so will
-result in non-obvious failures. In general, the "--with-gnu-as" option
-isn't as well tested as the native assembler.
-
-@emph{NOTE:} If you are building C++, you must follow the instructions
-about invoking @samp{make bootstrap} because the native OpenServer
-compiler may build a @file{cc1plus} that will not correctly parse many
-valid C++ programs. You must do a @samp{make bootstrap} if you are
-building with the native compiler.
+Use this for the SCO OpenServer Release 5 family of operating systems.
@item i386-*-isc
It may be a good idea to link with GNU malloc instead of the malloc that
See @ref{Sun Install}, for information on installing GNU CC on Sun
systems.
-@item i[345]86-*-winnt3.5
-This version requires a GAS that has not yet been released. Until it
-is, you can get a prebuilt binary version via anonymous ftp from
-@file{cs.washington.edu:pub/gnat} or @file{cs.nyu.edu:pub/gnat}. You
-must also use the Microsoft header files from the Windows NT 3.5 SDK.
-Find these on the CDROM in the @file{/mstools/h} directory dated 9/4/94. You
-must use a fixed version of Microsoft linker made especially for NT 3.5,
-which is also is available on the NT 3.5 SDK CDROM. If you do not have
-this linker, can you also use the linker from Visual C/C++ 1.0 or 2.0.
-
-Installing GNU CC for NT builds a wrapper linker, called @file{ld.exe},
-which mimics the behaviour of Unix @file{ld} in the specification of
-libraries (@samp{-L} and @samp{-l}). @file{ld.exe} looks for both Unix
-and Microsoft named libraries. For example, if you specify
-@samp{-lfoo}, @file{ld.exe} will look first for @file{libfoo.a}
-and then for @file{foo.lib}.
-
-You may install GNU CC for Windows NT in one of two ways, depending on
-whether or not you have a Unix-like shell and various Unix-like
-utilities.
-
-@enumerate
-@item
-If you do not have a Unix-like shell and few Unix-like utilities, you
-will use a DOS style batch script called @file{configure.bat}. Invoke
-it as @code{configure winnt} from an MSDOS console window or from the
-program manager dialog box. @file{configure.bat} assumes you have
-already installed and have in your path a Unix-like @file{sed} program
-which is used to create a working @file{Makefile} from @file{Makefile.in}.
-
-@file{Makefile} uses the Microsoft Nmake program maintenance utility and
-the Visual C/C++ V8.00 compiler to build GNU CC. You need only have the
-utilities @file{sed} and @file{touch} to use this installation method,
-which only automatically builds the compiler itself. You must then
-examine what @file{fixinc.winnt} does, edit the header files by hand and
-build @file{libgcc.a} manually.
-
-@item
-The second type of installation assumes you are running a Unix-like
-shell, have a complete suite of Unix-like utilities in your path, and
-have a previous version of GNU CC already installed, either through
-building it via the above installation method or acquiring a pre-built
-binary. In this case, use the @file{configure} script in the normal
-fashion.
-@end enumerate
-
@item i860-intel-osf1
This is the Paragon.
@ifset INSTALLONLY
@item m68000-hp-bsd
HP 9000 series 200 running BSD. Note that the C compiler that comes
-with this system cannot compile GNU CC; contact @code{law@@cygnus.com}
+with this system cannot compile GNU CC; contact @email{law@@cygnus.com}
to get binaries of GNU CC for bootstrapping.
@item m68k-altos
raises some of the arbitrary limits found in the original.
@item m68k-att-sysv
-AT&T 3b1, a.k.a. 7300 PC. Special procedures are needed to compile GNU
-CC with this machine's standard C compiler, due to bugs in that
-compiler. You can bootstrap it more easily with
-previous versions of GNU CC if you have them.
-
-Installing GNU CC on the 3b1 is difficult if you do not already have
-GNU CC running, due to bugs in the installed C compiler. However,
-the following procedure might work. We are unable to test it.
-
-@enumerate
-@item
-Comment out the @samp{#include "config.h"} line near the start of
-@file{cccp.c} and do @samp{make cpp}. This makes a preliminary version
-of GNU cpp.
-
-@item
-Save the old @file{/lib/cpp} and copy the preliminary GNU cpp to that
-file name.
-
-@item
-Undo your change in @file{cccp.c}, or reinstall the original version,
-and do @samp{make cpp} again.
-
-@item
-Copy this final version of GNU cpp into @file{/lib/cpp}.
-
-@findex obstack_free
-@item
-Replace every occurrence of @code{obstack_free} in the file
-@file{tree.c} with @code{_obstack_free}.
-
-@item
-Run @code{make} to get the first-stage GNU CC.
-
-@item
-Reinstall the original version of @file{/lib/cpp}.
-
-@item
-Now you can compile GNU CC with itself and install it in the normal
-fashion.
-@end enumerate
+AT&T 3b1, a.k.a. 7300 PC. This version of GNU CC cannot
+be compiled with the system C compiler, which is too buggy.
+You will need to get a previous version of GCC and use it to
+bootstrap. Binaries are available from the OSU-CIS archive, at
+@uref{ftp://archive.cis.ohio-state.edu/pub/att7300/}.
@item m68k-bull-sysv
Bull DPX/2 series 200 and 300 with BOS-2.00.45 up to BOS-2.01. GNU CC works
the configure script or use GNU assembler with dbx-in-coff encapsulation
by providing @samp{--with-gnu-as --stabs}. For any problem with native
assembler or for availability of the DPX/2 port of GAS, contact
-@code{F.Pierresteguy@@frcl.bull.fr}.
+@email{F.Pierresteguy@@frcl.bull.fr}.
@item m68k-crds-unox
Use @samp{configure unos} for building on Unos.
See @ref{Sun Install}, for information on installing GNU CC on Sun
systems.
+@item m6811-elf
+Motorola 68HC11 family micro controllers. These are used in embedded
+applications. There are no standard Unix configurations.
+
+@item m6812-elf
+Motorola 68HC12 family micro controllers. These are used in embedded
+applications. There are no standard Unix configurations.
+
@item m88k-*-svr3
Motorola m88k running the AT&T/Unisoft/Motorola V.3 reference port.
These systems tend to use the Green Hills C, revision 1.8.5, as the
@item mips-mips-bsd
MIPS machines running the MIPS operating system in BSD mode. It's
possible that some old versions of the system lack the functions
-@code{memcpy}, @code{memcmp}, and @code{memset}. If your system lacks
-these, you must remove or undo the definition of
+@code{memcpy}, @code{memmove}, @code{memcmp}, and @code{memset}. If your
+system lacks these, you must remove or undo the definition of
@code{TARGET_MEM_FUNCTIONS} in @file{mips-bsd.h}.
The MIPS C compiler needs to be told to increase its table size
You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
-@item powerpc-*-linux-gnu
+@item powerpc-*-linux
+@itemx powerpc-*-linux-gnu
PowerPC system in big endian mode, running the Linux-based GNU system.
You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
@code{fixincludes} on the header files in @file{$(tooldir)/include}.
(If the cross compilation header files need to be fixed, they must be
installed before GNU CC is built. If the cross compilation header files
-are already suitable for ANSI C and GNU CC, nothing special need be
+are already suitable for ISO C and GNU CC, nothing special need be
done).
@code{GPLUSPLUS_INCLUDE_DIR} means the same thing for native and cross. It