@end ifset
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-@c 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+@c 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@c *** Converted to texinfo by Dean Wakerley, dean@wakerley.com
+@c IMPORTANT: whenever you modify this file, run `install.texi2html' to
+@c test the generation of HTML documents for the gcc.gnu.org web pages.
+@c
+@c Do not use @footnote{} in this file as it breaks install.texi2html!
+
@c Include everything if we're not making html
@ifnothtml
@set indexhtml
@c Part 2 Summary Description and Copyright
@copying
Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@sp 1
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
files are not included in the CVS repository. They are included in
releases.
-@item Texinfo version 4.2 (or later)
+@item Texinfo version 4.4 (or later)
Necessary for running @command{makeinfo} when modifying @file{*.texi}
files to test your changes.
your environment before running configure. Otherwise the configuration
scripts may fail.
+@ignore
Note that the bootstrap compiler and the resulting GCC must be link
compatible, else the bootstrap will fail with linker errors about
incompatible object file formats. Several multilibed targets are
@ifhtml
@uref{specific.html,,host/target specific installation notes}.
@end ifhtml
+@end ignore
To configure GCC:
result if the compiler finds the GNU assembler but has not been
configured with @option{--with-gnu-as}.) If you have more than one
assembler installed on your system, you may want to use this option in
-connection with @option{--with-as=@var{pathname}}.
+connection with @option{--with-as=@var{pathname}} or
+@option{--with-build-time-tools=@var{pathname}}.
The following systems are the only ones where it makes a difference
whether you use the GNU assembler. On any other system,
(and specify @option{--with-gnu-ld}).
@item @anchor{with-as}--with-as=@var{pathname}
-Specify that the
-compiler should use the assembler pointed to by @var{pathname}, rather
-than the one found by the standard rules to find an assembler, which
-are:
+Specify that the compiler should use the assembler pointed to by
+@var{pathname}, rather than the one found by the standard rules to find
+an assembler, which are:
@itemize @bullet
@item
-Check the @file{@var{libexec}/gcc/@var{target}/@var{version}}
-directory, where @var{libexec} defaults to
-@file{@var{exec-prefix}/libexec} and @var{exec-prefix} defaults to
-@var{prefix} which defaults to @file{/usr/local} unless overridden by
-the @option{--prefix=@var{pathname}} switch described
-above. @var{target} is the target system triple, such as
-@samp{sparc-sun-solaris2.7}, and @var{version} denotes the GCC
-version, such as 3.0.
+Unless GCC is being built with a cross compiler, check the
+@file{@var{libexec}/gcc/@var{target}/@var{version}} directory.
+@var{libexec} defaults to @file{@var{exec-prefix}/libexec};
+@var{exec-prefix} defaults to @var{prefix}, which
+defaults to @file{/usr/local} unless overridden by the
+@option{--prefix=@var{pathname}} switch described above. @var{target}
+is the target system triple, such as @samp{sparc-sun-solaris2.7}, and
+@var{version} denotes the GCC version, such as 3.0.
+
@item
-Check operating system specific directories (e.g.@: @file{/usr/ccs/bin} on
+If the target system is the same that you are building on, check
+operating system specific directories (e.g.@: @file{/usr/ccs/bin} on
Sun Solaris 2).
+
+@item
+Check in the @env{PATH} for a tool whose name is prefixed by the
+target system triple.
+
+@item
+Check in the @env{PATH} for a tool whose name is not prefixed by the
+target system triple, if the host and target system triple are
+the same (in other words, we use a host tool if it can be used for
+the target as well).
@end itemize
-Note that these rules do not check for the value of @env{PATH}. You may
-want to use @option{--with-as} if no assembler is installed in the
-directories listed above, or if you have multiple assemblers installed
-and want to choose one that is not found by the above rules.
+
+You may want to use @option{--with-as} if no assembler
+is installed in the directories listed above, or if you have multiple
+assemblers installed and want to choose one that is not found by the
+above rules.
@item @anchor{with-gnu-ld}--with-gnu-ld
Same as @uref{#with-gnu-as,,@option{--with-gnu-as}}
Novell Kernel Services thread support.
@end table
+@item --enable-tls
+Specify that the target supports TLS (Thread Local Storage). Usually
+configure can correctly determine if TLS is supported. In cases where
+it guesses incorrectly, TLS can be explicitly enabled or disabled with
+@option{--enable-tls} or @option{--disable-tls}. This can happen if
+the assembler supports TLS but the C library does not, or if the
+assumptions made by the configure test are incorrect.
+
+@item --disable-tls
+Specify that the target does not support TLS.
+This is an alias for @option{--enable-tls=no}.
+
@item --with-cpu=@var{cpu}
Specify which cpu variant the compiler should generate code for by default.
@var{cpu} will be used as the default value of the @option{-mcpu=} switch.
grep language= */config-lang.in
@end smallexample
Currently, you can use any of the following:
-@code{all}, @code{ada}, @code{c}, @code{c++}, @code{f95}, @code{java},
+@code{all}, @code{ada}, @code{c}, @code{c++}, @code{fortran}, @code{java},
@code{objc}, @code{obj-c++}, @code{treelang}.
Building the Ada compiler has special requirements, see below.
If you do not pass this flag, or specify the option @code{all}, then all
default languages available in the @file{gcc} sub-tree will be configured.
Ada, Objective-C++, and treelang are not default languages; the rest are.
-Re-defining @code{LANGUAGES} when calling @samp{make bootstrap}
-@strong{does not} work anymore, as those language sub-directories might
-not have been configured!
+Re-defining @code{LANGUAGES} when calling @samp{make} @strong{does not}
+work anymore, as those language sub-directories might not have been
+configured!
@item --disable-libada
Specify that the run-time libraries and tools used by GNAT should not
Specify that the run-time libraries for stack smashing protection
should not be built.
+@item --disable-libgcc-math
+Specify that the run-time libraries for arch and gcc specific math
+functions should not be built.
+
+@item --disable-libgomp
+Specify that the run-time libraries used by GOMP should not be built.
+
@item --with-dwarf2
Specify that the compiler should
use DWARF 2 debugging information as the default.
All support for systems which have been obsoleted in one release of GCC
is removed entirely in the next major release, unless someone steps
forward to maintain the port.
+
+@item --enable-decimal-float
+@itemx --disable-decimal-float
+Enable (or disable) support for the C decimal floating point
+extension. This is enabled by default only on PowerPC GNU/Linux
+systems. Other systems may also support it, but require the user to
+specifically enable it.
+
@end table
@subheading Cross-Compiler-Specific Options
libraries. These libraries will be copied into the @file{gcc} install
directory. If the directory list is omitted, this option has no
effect.
+
@item --with-newlib
Specifies that @samp{newlib} is
being used as the target C library. This causes @code{__eprintf} to be
omitted from @file{libgcc.a} on the assumption that it will be provided by
@samp{newlib}.
+
+@item --with-build-time-tools=@var{dir}
+Specifies where to find the set of target tools (assembler, linker, etc.)
+that will be used while building GCC itself. This option can be useful
+if the directory layouts are different between the system you are building
+GCC on, and the system where you will deploy it.
+
+For example, on a @option{ia64-hp-hpux} system, you may have the GNU
+assembler and linker in @file{/usr/bin}, and the native tools in a
+different path, and build a toolchain that expects to find the
+native tools in @file{/usr/bin}.
+
+When you use this option, you should ensure that @var{dir} includes
+@command{ar}, @command{as}, @command{ld}, @command{nm},
+@command{ranlib} and @command{strip} if necessary, and possibly
+@command{objdump}. Otherwise, GCC may use an inconsistent set of
+tools.
@end table
-@subheading Fortran-specific Option
+@subheading Fortran-Specific Options
The following options apply to the build of the Fortran front end.
not need Bison installed to build them.
When building from CVS or snapshots, or if you modify Texinfo
-documentation, you need version 4.2 or later of Texinfo installed if you
+documentation, you need version 4.4 or later of Texinfo installed if you
want Info documentation to be regenerated. Releases contain Info
documentation pre-built for the unmodified documentation in the release.
@section Building a native compiler
-For a native build issue the command @samp{make bootstrap}. This
-will build the entire GCC system, which includes the following steps:
+For a native build, the command @samp{make} will trigger a 3-stage
+bootstrap of the compiler. This will build the entire GCC system
+and ensure that it compiles itself correctly, by doing the
+following steps:
@itemize @bullet
@item
-Build host tools necessary to build the compiler such as texinfo, bison,
+Build tools necessary to build the compiler such as texinfo, bison,
gperf.
@item
-Build target tools for use by the compiler such as binutils (bfd,
-binutils, gas, gprof, ld, and opcodes)
-if they have been individually linked
-or moved into the top level GCC source tree before configuring.
-
-@item
-Perform a 3-stage bootstrap of the compiler.
+Perform a 3-stage bootstrap of the compiler. This includes building
+three times the target tools for use by the compiler such as binutils
+(bfd, binutils, gas, gprof, ld, and opcodes) if they have been
+individually linked or moved into the top level GCC source tree before
+configuring.
@item
Perform a comparison test of the stage2 and stage3 compilers.
@end itemize
If you are short on disk space you might consider @samp{make
-bootstrap-lean} instead. This is identical to @samp{make
-bootstrap} except that object files from the stage1 and
+bootstrap-lean} instead. The sequence of compilation is the
+same described above, but object files from the stage1 and
stage2 of the 3-stage bootstrap of the compiler are deleted as
soon as they are no longer needed.
If you wish to use non-default GCC flags when compiling the stage2 and
stage3 compilers, set @code{BOOT_CFLAGS} on the command line when doing
-@samp{make bootstrap}. Non-default optimization flags are less well
+@samp{make}. Non-default optimization flags are less well
tested here than the default of @samp{-g -O2}, but should still work.
In a few cases, you may find that you need to specify special flags such
as @option{-msoft-float} here to complete the bootstrap; or, if the
stage1 compiler that were miscompiled, or by using @samp{make
bootstrap4} to increase the number of stages of bootstrap.
-Note that using non-standard @code{CFLAGS} can cause bootstrap to fail in
-@file{libiberty}, if these trigger a warning with the new compiler. For
-example using @samp{-O2 -g -mcpu=i686} on @code{i686-pc-linux-gnu} will
-cause bootstrap failure as @option{-mcpu=} is deprecated in 3.4.0 and above.
+Note that using non-standard @code{CFLAGS} can cause bootstrap to fail
+if these trigger a warning with the new compiler. For example using
+@samp{-O2 -g -mcpu=i686} on @code{i686-pc-linux-gnu} will cause bootstrap
+failure as @option{-mcpu=} is deprecated in 3.4.0 and above.
If you used the flag @option{--enable-languages=@dots{}} to restrict
the compilers to be built, only those you've actually enabled will be
built. This will of course only build those runtime libraries, for
which the particular compiler has been built. Please note,
-that re-defining @env{LANGUAGES} when calling @samp{make bootstrap}
+that re-defining @env{LANGUAGES} when calling @samp{make}
@strong{does not} work anymore!
If the comparison of stage2 and stage3 fails, this normally indicates
always appear ``different''. If you encounter this problem, you will
need to disable comparison in the @file{Makefile}.)
+If you do not want to bootstrap your compiler, you can configure with
+@option{--disable-bootstrap}. In particular cases, you may want to
+bootstrap your compiler even if the target system is not the same as
+the one you are building on: for example, you could build a
+@code{powerpc-unknown-linux-gnu} toolchain on a
+@code{powerpc64-unknown-linux-gnu} host. In this case, pass
+@option{--enable-bootstrap} to the configure script.
+
+
@section Building a cross compiler
We recommend reading the
@section Building in parallel
-You can use @samp{make bootstrap MAKE="make -j 2" -j 2}, or just
-@samp{make -j 2 bootstrap} for GNU Make 3.79 and above, instead of
-@samp{make bootstrap} to build GCC in parallel.
-You can also specify a bigger number, and in most cases using a value
-greater than the number of processors in your machine will result in
-fewer and shorter I/O latency hits, thus improving overall throughput;
-this is especially true for slow drives and network filesystems.
+GNU Make 3.79 and above, which is necessary to build GCC, support
+building in parallel. To activate this, you can use @samp{make -j 2}
+instead of @samp{make}. You can also specify a bigger number, and
+in most cases using a value greater than the number of processors in
+your machine will result in fewer and shorter I/O latency hits, thus
+improving overall throughput; this is especially true for slow drives
+and network filesystems.
@section Building the Ada compiler
In order to build GNAT, the Ada compiler, you need a working GNAT
-compiler (GNAT version 3.14 or later, or GCC version 3.1 or later),
-including GNAT tools such as @command{gnatmake} and @command{gnatlink},
-since the Ada front end is written in Ada (with some
-GNAT-specific extensions), and GNU make.
+compiler (GNAT version 3.14 or later, or GCC version 3.1 or later).
+This includes GNAT tools such as @command{gnatmake} and
+@command{gnatlink}, since the Ada front end is written in Ada and
+uses some GNAT-specific extensions.
+
+In order to build a cross compiler, it is suggested to install
+the new compiler as native first, and then use it to build the cross
+compiler.
@command{configure} does not test whether the GNAT installation works
and has a sufficiently recent version; if too old a GNAT version is
It is possible to use profile feedback to optimize the compiler itself. This
should result in a faster compiler binary. Experiments done on x86 using gcc
3.3 showed approximately 7 percent speedup on compiling C programs. To
-bootstrap compiler with profile feedback, use @code{make profiledbootstrap}.
+bootstrap the compiler with profile feedback, use @code{make profiledbootstrap}.
When @samp{make profiledbootstrap} is run, it will first build a @code{stage1}
compiler. This compiler is used to build a @code{stageprofile} compiler
probabilities. Then runtime libraries are compiled with profile collected.
Finally a @code{stagefeedback} compiler is built using the information collected.
-Unlike @samp{make bootstrap} several additional restrictions apply. The
+Unlike standard bootstrap, several additional restrictions apply. The
compiler used to build @code{stage1} needs to support a 64-bit integral type.
It is recommended to only use GCC for this. Also parallel make is currently
not supported since collisions in profile collecting may occur.
specifying the location of that tree when invoking @samp{make}, as in
@samp{make MAUVEDIR=~/mauve check}.
-@uref{http://sources.redhat.com/mauve/,,Jacks}
+@uref{http://sources.redhat.com/mauve/jacks.html,,Jacks}
is a free testsuite that tests Java compiler front ends. This suite
can be run as part of libgcj testing by placing the Jacks tree within
the libjava testsuite at @file{libjava/testsuite/libjava.jacks/jacks}.
not as a bug, because it gives slightly more control to the packagers
using the @code{DESTDIR} feature.
-If you built a released version of GCC using @samp{make bootstrap} then please
+If you are bootstrapping a released version of GCC then please
quickly review the build status page for your release, available from
@uref{http://gcc.gnu.org/buildstat.html}.
If your system is not listed for the version of GCC that you built,
@uref{../bugs.html,,bug reporting guidelines}.
If you want to print the GCC manuals, do @samp{cd @var{objdir}; make
-dvi}. You will need to have @command{texi2dvi} (version at least 4.2)
+dvi}. You will need to have @command{texi2dvi} (version at least 4.4)
and @TeX{} installed. This creates a number of @file{.dvi} files in
subdirectories of @file{@var{objdir}}; these may be converted for
printing with programs such as @command{dvips}. You can also
supported; in particular, Craylibs are assumed to be in
@file{/opt/ctl/craylibs/craylibs}.
-You absolutely @strong{must} use GNU make on this platform. Also, you
-need to tell GCC where to find the assembler and the linker. The
-simplest way to do so is by providing @option{--with-as} and
-@option{--with-ld} to @file{configure}, e.g.@:
+On this platform, you need to tell GCC where to find the assembler and
+the linker. The simplest way to do so is by providing @option{--with-as}
+and @option{--with-ld} to @file{configure}, e.g.@:
@smallexample
configure --with-as=/opt/ctl/bin/cam --with-ld=/opt/ctl/bin/cld \
--enable-languages=c
@end smallexample
-The comparison test during @samp{make bootstrap} fails on Unicos/Mk
+The comparison test at the end of the bootstrapping process fails on Unicos/Mk
because the assembler inserts timestamps into object files. You should
be able to work around this by doing @samp{make all} after getting this
failure.
@heading @anchor{hppa-hp-hpux}hppa*-hp-hpux*
Support for HP-UX version 9 and older was discontinued in GCC 3.4.
-We @emph{highly} recommend using gas/binutils on all hppa platforms;
-you may encounter a variety of problems when using the HP assembler.
+We require using gas/binutils on all hppa platforms;
+you may encounter a variety of problems if you try to use the HP assembler.
Specifically, @option{-g} does not work on HP-UX (since that system
uses a peculiar debugging format which GCC does not know about), unless
@option{--with-as=@dots{}} options to ensure that GCC can find GAS@.
If you wish to use the pa-risc 2.0 architecture support with a 32-bit
-runtime, you must use either the HP assembler, or gas/binutils 2.11
-or newer.
+runtime, you must use gas/binutils 2.11 or newer.
There are two default scheduling models for instructions. These are
PROCESSOR_7100LC and PROCESSOR_8000. They are selected from the pa-risc
to @env{CC}. The description for the @option{munix=} option contains
a list of the predefines used with each standard.
+As of GCC 4.1, @env{DWARF2} exception handling is available on HP-UX.
+It is now the default. This exposed a bug in the handling of data
+relocations in the GAS assembler. The handling of 64-bit data relocations
+was seriously broken, affecting debugging and exception support on all
+@samp{hppa64-*-*} targets. Under some circumstances, 32-bit data relocations
+could also be handled incorrectly. This problem is fixed in GAS version
+2.16.91 20051125.
+
+GCC versions prior to 4.1 incorrectly passed and returned complex
+values. They are now passed in the same manner as aggregates.
+
More specific information to @samp{hppa*-hp-hpux*} targets follows.
@html
The HP assembler on these systems has some problems. Most notably the
assembler inserts timestamps into each object file it creates, causing
-the 3-stage comparison test to fail during a @samp{make bootstrap}.
-You should be able to continue by saying @samp{make all} after getting
-the failure from @samp{make bootstrap}.
+the 3-stage comparison test to fail during a bootstrap.
+You should be able to continue by saying @samp{make all-host all-target}
+after getting the failure from @samp{make}.
GCC 4.0 requires CVS binutils as of April 28, 2004 or later. Earlier
versions require binutils 2.8 or later.
definitions. As a result, explicit template instantiations are required
when using C++. This makes it difficult if not impossible to build many
C++ applications. You can't generate debugging information when using
-the HP assembler. Finally, @samp{make bootstrap} fails in the final
+the HP assembler. Finally, bootstrapping fails in the final
comparison of object modules due to the time stamps that it inserts into
the modules. The bootstrap can be continued from this point with
-@samp{make all}.
+@samp{make all-host all-target}.
A recent linker patch must be installed for the correct operation of
GCC 3.3 and later. @code{PHSS_26559} and @code{PHSS_24304} are the
@emph{You should substitute @samp{i686} in the above command with the appropriate
processor for your host.}
-After the usual @samp{make bootstrap} and
+After the usual @samp{make} and
@samp{make install}, you can then access the UDK-targeted GCC
tools by adding @command{udk-} before the commonly known name. For
example, to invoke the C compiler, you would use @command{udk-gcc}.
@heading @anchor{x-ibm-aix}*-ibm-aix*
Support for AIX version 3 and older was discontinued in GCC 3.4.
-AIX Make frequently has problems with GCC makefiles. GNU Make 3.79.1 or
-newer is recommended to build on this platform.
-
``out of memory'' bootstrap failures may indicate a problem with
process resource limits (ulimit). Hard limits are configured in the
@file{/etc/security/limits} system configuration file.
% export CONFIG_SHELL
@end smallexample
-and then proceed as described in @uref{build.html,,the build instructions},
-where we strongly recommend using GNU make and specifying an absolute path
+and then proceed as described in @uref{build.html,,the build
+instructions}, where we strongly recommend specifying an absolute path
to invoke @var{srcdir}/configure.
Errors involving @code{alloca} when building GCC generally are due
@end html
@heading @anchor{powerpc-x-netbsd}powerpc-*-netbsd*
PowerPC system in big endian mode running NetBSD@. To build the
-documentation you will need Texinfo version 4.2 (NetBSD 1.5.1 included
+documentation you will need Texinfo version 4.4 (NetBSD 1.5.1 included
Texinfo version 3.12).
@html