@end ifset
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-@c 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+@c 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
@c *** Converted to texinfo by Dean Wakerley, dean@wakerley.com
@c Include everything if we're not making html
@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 Free Software Foundation, Inc.
+1999, 2000, 2001, 2002, 2003, 2004, 2005 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
@command{configure}/@command{make}.
@command{zsh} is not a fully compliant POSIX shell and will not
-work when configuring GCC.
+work when configuring GCC@.
@item GNU binutils
@item GNU make version 3.79.1 (or later)
-You must have GNU make installed to build GCC.
+You must have GNU make installed to build GCC@.
@item GNU tar version 1.12 (or later)
@item GNU Multiple Precision Library (GMP) version 4.0 (or later)
-Necessary to build the Fortran frontend. If you don't have it
+Necessary to build the Fortran frontend. If you don't have it
installed in your library search path, you will have to configure with
the @option{--with-gmp} or @option{--with-gmp-dir} configure option.
+@item MPFR Library
+
+Necessary to build the Fortran frontend. It can be downloaded from
+@uref{http://www.mpfr.org/}. It is also included in the current GMP
+release (4.1.3) when configured with @option{--enable-mpfr}.
+
+The @option{--with-mpfr} or @option{--with-mpfr-dir} configure option should
+be used if your MPFR Library is not installed in your library search path.
+
@end table
@heading Tools/packages necessary for modifying GCC
@table @asis
-@item autoconf versions 2.13, 2.57 and 2.59
+@item autoconf versions 2.13 and 2.59
@itemx GNU m4 version 1.4 (or later)
Necessary when modifying @file{configure.ac}, @file{aclocal.m4}, etc.@:
to regenerate @file{configure} and @file{config.in} files. Most
-directories require autoconf 2.59 (exactly), but the toplevel and
-@file{libjava} (but not @file{libjava/libltdl}) still require autoconf
-2.13 (exactly) and @file{libmudflap} requires autoconf 2.57 (exactly).
+directories require autoconf 2.59 (exactly), but the toplevel
+still requires autoconf 2.13 (exactly).
-@item automake versions 1.4-gcj, 1.7.8, 1.7.9, 1.8.2, 1.8.4 and 1.8.5
+@item automake versions 1.9.3
Necessary when modifying a @file{Makefile.am} file to regenerate its
associated @file{Makefile.in}.
Much of GCC does not use automake, so directly edit the @file{Makefile.in}
file. Specifically this applies to the @file{gcc}, @file{intl},
-@file{libiberty}, @file{libobjc} directories as well as any
-of their subdirectories.
-
-The Java directories @file{boehm-gc} and @file{libjava}
-require a modified version of automake 1.4 downloadable from
-@uref{ftp://gcc.gnu.org/pub/java/automake-gcj-1.4.tar.gz}.
-
-The @file{libmudflap} directory requires automake 1.7.8.
-
-The @file{fastjar}, @file{libbanshee}, @file{libffi},
-@file{libjava/libltdl} and @file{zlib} directories require automake
-1.7.9.
+@file{libcpp}, @file{libiberty}, @file{libobjc} directories as well
+as any of their subdirectories.
-The @file{libstdc++-v3} directory requires automake 1.8.2.
-
-The @file{libcpp} directory requires automake 1.8.4.
-
-The @file{libgfortran} directory requires automake 1.8.5.
+For directories that use automake, GCC requires the latest release in
+the 1.9.x series, which is currently 1.9.3. When regenerating a directory
+to a newer version, please update all the directories using an older 1.9.x
+to the latest released version.
@item gettext version 0.12 (or later)
@itemx ssh (any version)
Necessary to access the CVS repository. Public releases and weekly
-snapshots of the development sources are also available via FTP.
+snapshots of the development sources are also available via FTP@.
@item perl version 5.6.1 (or later)
@command{bzip2}. It is possible to download a full distribution or specific
components.
-Please refer to our @uref{http://gcc.gnu.org/releases.html,,releases web page}
+Please refer to the @uref{http://gcc.gnu.org/releases.html,,releases web page}
for information on how to obtain GCC@.
The full distribution includes the C, C++, Objective-C, Fortran 77, Fortran
@item --program-prefix=@var{prefix}
GCC supports some transformations of the names of its programs when
-installing them. This option prepends @var{prefix} to the names of
-programs to install in @var{bindir} (see above). For example, specifying
+installing them. This option prepends @var{prefix} to the names of
+programs to install in @var{bindir} (see above). For example, specifying
@option{--program-prefix=foo-} would result in @samp{gcc}
being installed as @file{/usr/local/bin/foo-gcc}.
@item --program-suffix=@var{suffix}
Appends @var{suffix} to the names of programs to install in @var{bindir}
-(see above). For example, specifying @option{--program-suffix=-3.1}
+(see above). For example, specifying @option{--program-suffix=-3.1}
would result in @samp{gcc} being installed as
@file{/usr/local/bin/gcc-3.1}.
@item --program-transform-name=@var{pattern}
Applies the @samp{sed} script @var{pattern} to be applied to the names
-of programs to install in @var{bindir} (see above). @var{pattern} has to
+of programs to install in @var{bindir} (see above). @var{pattern} has to
consist of one or more basic @samp{sed} editing commands, separated by
-semicolons. For example, if you want the @samp{gcc} program name to be
+semicolons. For example, if you want the @samp{gcc} program name to be
transformed to the installed program @file{/usr/local/bin/myowngcc} and
the @samp{g++} program name to be transformed to
@file{/usr/local/bin/gspecial++} without changing other program names,
to achieve this effect.
All three options can be combined and used together, resulting in more
-complex conversion patterns. As a basic rule, @var{prefix} (and
+complex conversion patterns. As a basic rule, @var{prefix} (and
@var{suffix}) are prepended (appended) before further transformations
can happen with a special transformation script @var{pattern}.
For native builds, some of the installed programs are also installed
with the target alias in front of their name, as in
-@samp{i686-pc-linux-gnu-gcc}. All of the above transformations happen
-before the target alias is prepended to the name - so, specifying
+@samp{i686-pc-linux-gnu-gcc}. All of the above transformations happen
+before the target alias is prepended to the name---so, specifying
@option{--program-prefix=foo-} and @option{program-suffix=-3.1}, the
resulting binary would be installed as
@file{/usr/local/bin/i686-pc-linux-gnu-foo-gcc-3.1}.
another directory which is based on the @option{--prefix} value.)
Both the local-prefix include directory and the GCC-prefix include
-directory are part of GCC's "system include" directories. Although these
+directory are part of GCC's ``system include'' directories. Although these
two directories are not fixed, they need to be searched in the proper
order for the correct processing of the include_next directive. The
local-prefix include directory is searched before the GCC-prefix
@samp{libgcc} (also known as @samp{gcc}), @samp{libstdc++} (not
@samp{libstdc++-v3}), @samp{libffi}, @samp{zlib}, @samp{boehm-gc},
@samp{ada}, @samp{libada}, @samp{libjava} and @samp{libobjc}.
-Note @samp{libiberty} do not support shared libraries at all.
+Note @samp{libiberty} does not support shared libraries at all.
Use @option{--disable-shared} to build only static libraries. Note that
@option{--disable-shared} does not accept a list of package names as
@item @samp{m68k-hp-hpux}
@item @samp{m68000-hp-hpux}
@item @samp{m68000-att-sysv}
-@item @samp{@var{any}-lynx-lynxos}
-@item @samp{mips-@var{any}}
@item @samp{sparc-sun-solaris2.@var{any}}
@item @samp{sparc64-@var{any}-solaris2.@var{any}}
@end itemize
On the systems listed above (except for the HP-PA, the SPARC, for ISC on
-the 386, and for @samp{mips-sgi-irix5.*}), if you use the GNU assembler,
-you should also use the GNU linker (and specify @option{--with-gnu-ld}).
+the 386, if you use the GNU assembler, you should also use the GNU linker
+(and specify @option{--with-gnu-ld}).
@item @anchor{with-as}--with-as=@var{pathname}
Specify that the
@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
+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
DCE thread support.
@item gnat
Ada tasking support. For non-Ada programs, this setting is equivalent
-to @samp{single}. When used in conjunction with the Ada run time, it
+to @samp{single}. When used in conjunction with the Ada run time, it
causes GCC to use the same thread primitives as Ada uses. This option
is necessary when using both Ada and the back end exception handling,
which is the default for most Ada targets.
@item no
This is an alias for @samp{single}.
@item posix
-Generic POSIX thread support.
+Generic POSIX/Unix98 thread support.
+@item posix95
+Generic POSIX/Unix95 thread support.
@item rtems
RTEMS thread support.
@item single
VxWorks thread support.
@item win32
Microsoft Win32 API thread support.
+@item nks
+Novell Kernel Services thread support.
@end table
@item --with-cpu=@var{cpu}
@option{--with-cpu}, which switches will be accepted and acceptable values
of the arguments depend on the target.
-@item --enable-altivec
-Specify that the target supports AltiVec vector enhancements. This
-option will adjust the ABI for AltiVec enhancements, as well as generate
-AltiVec code when appropriate. This option is only available for
-PowerPC systems.
+@item --with-divide=@var{type}
+Specify how the compiler should generate code for checking for
+division by zero. This option is only supported on the MIPS target.
+The possibilities for @var{type} are:
+@table @code
+@item traps
+Division by zero checks use conditional traps (this is the default on
+systems that support conditional traps).
+@item breaks
+Division by zero checks use the break instruction.
+@end table
@item --enable-__cxa_atexit
Define if you want to use __cxa_atexit, rather than atexit, to
register C++ destructors for local statics and global objects.
This is essential for fully standards-compliant handling of
-destructors, but requires __cxa_atexit in libc. This option is currently
-only available on systems with GNU libc. When enabled, this will cause
+destructors, but requires __cxa_atexit in libc. This option is currently
+only available on systems with GNU libc. When enabled, this will cause
@option{-fuse-cxa-exit} to be passed by default.
@item --enable-target-optspace
@file{@var{libdir}} unless you overruled it by using
@option{--with-gxx-include-dir=@var{dirname}}. Using this option is
particularly useful if you intend to use several versions of GCC in
-parallel. This is currently supported by @samp{libf2c} and
-@samp{libstdc++}, and is the default for @samp{libobjc} which cannot be
-changed in this case.
+parallel. This is currently supported by @samp{libgfortran},
+@samp{libjava}, @samp{libmudflap}, @samp{libstdc++}, and @samp{libobjc}.
+
@item --enable-languages=@var{lang1},@var{lang2},@dots{}
Specify that only a particular subset of compilers and
@end smallexample
Currently, you can use any of the following:
@code{ada}, @code{c}, @code{c++}, @code{f77}, @code{f95}, @code{java},
-@code{objc}.
+@code{objc}, @code{obj-c++}.
Building the Ada compiler has special requirements, see below.@*
If you do not pass this flag, all languages available in the @file{gcc}
sub-tree will be configured. Re-defining @code{LANGUAGES} when calling
@end smallexample
@var{key} defaults to GCC version number, and can be overridden by the
-@option{--enable-win32-registry=@var{key}} option. Vendors and distributors
+@option{--enable-win32-registry=@var{key}} option. Vendors and distributors
who use custom installers are encouraged to provide a different key,
perhaps one comprised of vendor name and GCC version number, to
avoid conflict with existing installations. This feature is enabled
with GCC@. This is on by default when building from CVS or snapshots,
but off for releases. More control over the checks may be had by
specifying @var{list}; the categories of checks available are
-@samp{misc}, @samp{tree}, @samp{gc}, @samp{rtl}, @samp{rtlflag},
-@samp{fold}, @samp{gcac} and @samp{valgrind}. The check @samp{valgrind}
-requires the external @command{valgrind} simulator, available from
-@uref{http://valgrind.kde.org/}. The default when @var{list} is
-not specified is @samp{misc,tree,gc,rtlflag}; the checks @samp{rtl},
-@samp{gcac} and @samp{valgrind} are very expensive.
+@samp{release}, @samp{assert}, @samp{misc}, @samp{tree}, @samp{gc},
+@samp{rtl}, @samp{rtlflag}, @samp{runtime}, @samp{fold}, @samp{gcac} and
+@samp{valgrind}. The @samp{release} category enables only those checks
+suitable for release builds, currently this is @samp{assert} and
+@samp{runtime}. The check @samp{valgrind} requires the external
+@command{valgrind} simulator, available from
+@uref{http://valgrind.kde.org/}. The checks @samp{rtl}, @samp{gcac} and
+@samp{valgrind} are very expensive. The default when @var{list} is not
+specified is @samp{assert,misc,tree,gc,rtlflag,runtime}. That is also
+the default for development builds, when @samp{--enable-checking} is not
+specified. For release builds the default, when
+@samp{--enable-checking} is not given, is @samp{release}. To disable
+all checking, @samp{--disable-checking} must be explicitly requested.
+Disabling assertions will make the compiler and runtime slightly faster
+but increase the risk of undetected internal errors causing wrong code
+to be generated.
@item --enable-coverage
@itemx --enable-coverage=@var{level}
With this option, the compiler is built to collect self coverage
-information, every time it is run. This is for internal development
-purposes, and only works when the compiler is being built with gcc. The
+information, every time it is run. This is for internal development
+purposes, and only works when the compiler is being built with gcc. The
@var{level} argument controls whether the compiler is built optimized or
-not, values are @samp{opt} and @samp{noopt}. For coverage analysis you
+not, values are @samp{opt} and @samp{noopt}. For coverage analysis you
want to disable optimization, for performance analysis you want to
-enable optimization. When coverage is enabled, the default level is
+enable optimization. When coverage is enabled, the default level is
without optimization.
@item --enable-gather-detailed-mem-stats
allocation is gathered. This information is printed when using
@option{-fmem-report}.
+@item --with-gc
+@itemx --with-gc=@var{choice}
+With this option you can specify the garbage collector implementation
+used during the compilation process. @var{choice} can be one of
+@samp{page} and @samp{zone}, where @samp{page} is the default.
+
@item --enable-nls
@itemx --disable-nls
The @option{--enable-nls} option enables Native Language Support (NLS),
building a cross compiler, if @file{@var{prefix}/@var{target}/sys-include}
doesn't pre-exist. If @file{@var{prefix}/@var{target}/sys-include} does
pre-exist, the @var{dir} argument may be omitted. @command{fixincludes}
-will be run on these files to make them compatible with GCC.
+will be run on these files to make them compatible with GCC@.
@item --without-headers
Tells GCC not use any target headers from a libc when building a cross
@table @code
@item --with-gmp=@var{pathname}
+@itemx --with-mpfr=@var{pathname}
@itemx --with-gmp-dir=@var{pathname}
-If you don't have GMP (the GNU Multiple Precision library) installed
-in a standard location and you want to build the Fortran front-end,
-you can explicitly specify the directory where GMP is installed
-(@samp{--with-gmp=gmpinstalldir}) or where you built the GMP library without
-installing (@samp{--with-gmp-dir=gmpbuilddir}).
+@itemx --with-mpfr-dir=@var{pathname}
+If you don't have GMP (the GNU Multiple Precision library) and the MPFR
+Libraries installed in a standard location and you want to build the Fortran
+front-end, you can explicitly specify the directory where they are installed
+(@samp{--with-gmp=gmpinstalldir}, @samp{--with-mpfr=mpfrinstalldir}) or where
+you built them without installing (@samp{--with-gmp-dir=gmpbuilddir},
+@samp{--with-mpfr-dir=gmpbuilddir}).
@end table
Don't set system properties from @env{GCJ_PROPERTIES}.
@item --enable-hash-synchronization
-Use a global hash table for monitor locks. Ordinarily,
+Use a global hash table for monitor locks. Ordinarily,
@samp{libgcj}'s @samp{configure} script automatically makes
-the correct choice for this option for your platform. Only use
+the correct choice for this option for your platform. Only use
this if you know you need the library to be configured differently.
@item --enable-interpreter
-Enable the Java interpreter. The interpreter is automatically
-enabled by default on all platforms that support it. This option
+Enable the Java interpreter. The interpreter is automatically
+enabled by default on all platforms that support it. This option
is really only useful if you want to disable the interpreter
(using @option{--disable-interpreter}).
@item --disable-java-net
-Disable java.net. This disables the native part of java.net only,
+Disable java.net. This disables the native part of java.net only,
using non-functional stubs for native method implementations.
@item --disable-jvmpi
Enable runtime eCos target support.
@item --without-libffi
-Don't use @samp{libffi}. This will disable the interpreter and JNI
+Don't use @samp{libffi}. This will disable the interpreter and JNI
support as well, as these require @samp{libffi} to work.
@item --enable-libgcj-debug
@item --enable-libgcj-multifile
If specified, causes all @file{.java} source files to be
compiled into @file{.class} files in one invocation of
-@samp{gcj}. This can speed up build time, but is more
-resource-intensive. If this option is unspecified or
+@samp{gcj}. This can speed up build time, but is more
+resource-intensive. If this option is unspecified or
disabled, @samp{gcj} is invoked once for each @file{.java}
file to compile into a @file{.class} file.
Search for libiconv in @file{DIR/include} and @file{DIR/lib}.
@item --enable-sjlj-exceptions
-Force use of @code{builtin_setjmp} for exceptions. @samp{configure}
-ordinarily picks the correct value based on the platform. Only use
+Force use of @code{builtin_setjmp} for exceptions. @samp{configure}
+ordinarily picks the correct value based on the platform. Only use
this option if you are sure you need a different setting.
@item --with-system-zlib
@item --with-win32-nlsapi=ansi, unicows or unicode
Indicates how MinGW @samp{libgcj} translates between UNICODE
-characters and the Win32 API.
+characters and the Win32 API@.
@table @code
@item ansi
Use the single-byte @code{char} and the Win32 A functions natively,
-translating to and from UNICODE when using these functions. If
+translating to and from UNICODE when using these functions. If
unspecified, this is the default.
@item unicows
-Use the @code{WCHAR} and Win32 W functions natively. Adds
+Use the @code{WCHAR} and Win32 W functions natively. Adds
@code{-lunicows} to @file{libgcj.spec} to link with @samp{libunicows}.
@file{unicows.dll} needs to be deployed on Microsoft Windows 9X machines
-running built executables. @file{libunicows.a}, an open-source
+running built executables. @file{libunicows.a}, an open-source
import library around Microsoft's @code{unicows.dll}, is obtained from
@uref{http://libunicows.sourceforge.net/}, which also gives details
on getting @file{unicows.dll} from Microsoft.
@item unicode
-Use the @code{WCHAR} and Win32 W functions natively. Does @emph{not}
-add @code{-lunicows} to @file{libgcj.spec}. The built executables will
+Use the @code{WCHAR} and Win32 W functions natively. Does @emph{not}
+add @code{-lunicows} to @file{libgcj.spec}. The built executables will
only run on Microsoft Windows NT and above.
@end table
@end table
@item --enable-java-awt=PEER(S)
Specifies the AWT peer library or libraries to build alongside
-@samp{libgcj}. If this option is unspecified or disabled, AWT
-will be non-functional. Current valid values are @option{gtk} and
-@option{xlib}. Multiple libraries should be separated by a
-comma (i.e. @option{--enable-java-awt=gtk,xlib}).
+@samp{libgcj}. If this option is unspecified or disabled, AWT
+will be non-functional. Current valid values are @option{gtk} and
+@option{xlib}. Multiple libraries should be separated by a
+comma (i.e.@: @option{--enable-java-awt=gtk,xlib}).
@item --enable-gtk-cairo
-Build the cairo Graphics2D implementation on GTK.
+Build the cairo Graphics2D implementation on GTK@.
@item --enable-java-gc=TYPE
-Choose garbage collector. Defaults to @option{boehm} if unspecified.
+Choose garbage collector. Defaults to @option{boehm} if unspecified.
@item --disable-gtktest
Do not try to compile and run a test GTK+ program.
Now that GCC is configured, you are ready to build the compiler and
runtime libraries.
-We @strong{highly} recommend that GCC be built using GNU make;
-other versions may work, then again they might not.
-GNU make is required for compiling GNAT (the Ada compiler) and the Java
-runtime library.
-
-(For example, many broken versions of make will fail if you use the
-recommended setup where @var{objdir} is different from @var{srcdir}.
-Other broken versions may recompile parts of the compiler when
-installing the compiler.)
-
Some commands executed when making the compiler may fail (return a
nonzero status) and be ignored by @command{make}. These failures, which
are often due to files that were not found, are expected, and can safely
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.
+
+
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
reports a successful build runs the testsuites and submits the results.
This step is optional and may require you to download additional software,
but it can give you confidence in your new GCC installation or point out
-problems before you install and start using your new GCC.
+problems before you install and start using your new GCC@.
First, you must have @uref{download.html,,downloaded the testsuites}.
These are part of the full distribution, but if you downloaded the
@samp{WARNING: Couldn't find the global config file.} or
@samp{WARNING: Couldn't find tool init file} that can be ignored.
-@section How can I run the test suite on selected tests?
+@section How can you run the testsuite on selected tests?
In order to run sets of tests selectively, there are targets
@samp{make check-gcc} and @samp{make check-g++}
with a syntax similar to the brace expansion of popular shells:
@smallexample
- @dots{}"--target_board=arm-sim@{-mhard-float,-msoft-float@}@{-O1,-O2,-O3,@}"
+ @dots{}"--target_board=arm-sim/@{-mhard-float,-msoft-float@}@{-O1,-O2,-O3,@}"
@end smallexample
(Note the empty option caused by the trailing comma in the final group.)
@samp{make MAUVEDIR=~/mauve check}.
@uref{http://www-124.ibm.com/developerworks/oss/cvs/jikes/~checkout~/jacks/jacks.html,,Jacks}
-is a free test suite that tests Java compiler front ends. This suite
+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}.
@end itemize
It is normal for some tests to report unexpected failures. At the
-current time our testing harness does not allow fine grained control
-over whether or not a test is expected to fail. We expect to fix this
-problem in future releases.
+current time the testing harness does not allow fine grained control
+over whether or not a test is expected to fail. This problem should
+be fixed in future releases.
@section Submitting test results
If your system is not listed for the version of GCC that you built,
send a note to
@email{gcc@@gcc.gnu.org} indicating
-that you successfully built and installed GCC.
+that you successfully built and installed GCC@.
Include the following information:
@itemize @bullet
@item
-Output from running @file{@var{srcdir}/config.guess}. Do not send us
+Output from running @file{@var{srcdir}/config.guess}. Do not send
that file itself, just the one-line output from running it.
@item
@end ifhtml
didn't include your host/target information or if that information is
incomplete or out of date. Send a note to
-@email{gcc@@gcc.gnu.org} telling us how the information should be changed.
+@email{gcc@@gcc.gnu.org} detailing how the information should be changed.
-If you find a bug, please report it following our
+If you find a bug, please report it following the
@uref{../bugs.html,,bug reporting guidelines}.
If you want to print the GCC manuals, do @samp{cd @var{objdir}; make
Free Software Foundation}, though such manuals may not be for the most
recent version of GCC@.
+If you would like to generate online HTML documentation, do @samp{cd
+@var{objdir}; make html} and HTML will be generated for the manuals in
+@file{@var{objdir}/HTML}.
+
@html
<hr />
<p>
Digital UNIX 4.0D and 5.1,
GNU/Linux (i386),
HP-UX 10.20, 11.00, and 11.11, and
-Solaris/SPARC 2.5.1, 2.6, 2.7, 8, and 9,
+Solaris/SPARC 2.5.1, 2.6, 7, 8, and 9.
+
+@item
+@uref{http://www.openpkg.org/,,OpenPKG} offers binaries for quite a
+number of platforms.
@end itemize
In addition to those specific offerings, you can get a binary
@end html
@heading @anchor{dos}DOS
-Please have a look at our @uref{binaries.html,,binaries page}.
+Please have a look at the @uref{binaries.html,,binaries page}.
You cannot install GCC by itself on MSDOS; it will not compile under
any MSDOS compiler except itself. You need to get the complete
@heading @anchor{*-*-freebsd*}*-*-freebsd*
The version of binutils installed in @file{/usr/bin} probably works with
-this release of GCC. However, on FreeBSD 4, bootstrapping against the
+this release of GCC@. However, on FreeBSD 4, bootstrapping against the
latest FSF binutils is known to improve overall testsuite results; and,
on FreeBSD/alpha, using binutils 2.14 or later is required to build libjava.
of @option{-g}, if you really want the old debugging format. There are
no known issues with mixing object files and libraries with different
debugging formats. Otherwise, this release of GCC should now match more
-of the configuration used in the stock FreeBSD configuration of GCC. In
+of the configuration used in the stock FreeBSD configuration of GCC@. In
particular, @option{--enable-threads} is now configured by default.
However, as a general user, do not attempt to replace the system
compiler with this release. Known to bootstrap and check with good
@heading @anchor{h8300-hms}h8300-hms
Renesas H8/300 series of processors.
-Please have a look at our @uref{binaries.html,,binaries page}.
+Please have a look at the @uref{binaries.html,,binaries page}.
The calling convention and structure layout has changed in release 2.6.
All code must be recompiled. The calling convention now passes the
@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 2.8 or newer on all hppa
-platforms; you may encounter a variety of problems when using the HP
-assembler.
+We @emph{highly} recommend using gas/binutils on all hppa platforms;
+you may encounter a variety of problems when using 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 you
-use GAS and GDB and configure GCC with the
+uses a peculiar debugging format which GCC does not know about), unless
+you use GAS and GDB@. It may be helpful to configure GCC with the
@uref{./configure.html#with-gnu-as,,@option{--with-gnu-as}} and
-@option{--with-as=@dots{}} options.
+@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
TARGET_SCHED_DEFAULT can be defined in BOOT_CFLAGS if a different
default scheduling model is desired.
+As of GCC 3.5, GCC uses the UNIX 95 namespace for HP-UX 10.10
+through 11.00, and the UNIX 98 namespace for HP-UX 11.11 and later.
+This namespace change might cause problems when bootstrapping with
+an earlier version of GCC or the HP compiler as essentially the same
+namespace is required for an entire build. This problem can be avoided
+in a number of ways. With HP cc, @env{UNIX_STD} can be set to @samp{95}
+or @samp{98}. Another way is to add an appropriate set of predefines
+to @env{CC}. The description for the @option{munix=} option contains
+a list of the predefines used with each standard.
+
More specific information to @samp{hppa*-hp-hpux*} targets follows.
@html
You should be able to continue by saying @samp{make all} after getting
the failure from @samp{make bootstrap}.
+GCC 3.5 requires CVS binutils as of April 28, 2004 or later. Earlier
+versions require binutils 2.8 or later.
+
+The C++ ABI has changed incompatibly in GCC 3.5. COMDAT subspaces are
+used for one-only code and data. This resolves many of the previous
+problems in using C++ on this target. However, the ABI is not compatible
+with the one implemented under HP-UX 11 using secondary definitions.
@html
<hr />
be used to compile GCC 3.0 and up.
Refer to @uref{binaries.html,,binaries} for information about obtaining
-precompiled GCC binaries for HP-UX. Precompiled binaries must be obtained
-to build the Ada language as it can't be bootstrapped using C. Ada is
+precompiled GCC binaries for HP-UX@. Precompiled binaries must be obtained
+to build the Ada language as it can't be bootstrapped using C@. Ada is
only available for the 32-bit PA-RISC runtime. The libffi and libjava
haven't been ported to HP-UX and don't build.
There are several possible approaches to building the distribution.
Binutils can be built first using the HP tools. Then, the GCC
distribution can be built. The second approach is to build GCC
-first using the HP tools, then build binutils, then rebuild GCC.
+first using the HP tools, then build binutils, then rebuild GCC@.
There have been problems with various binary distributions, so it
is best not to start from a binary distribution.
Specifically, options that determine the runtime architecture must be
in @env{CC} to correctly select the target for the build. It is also
-convenient to place many other compiler options in @env{CC}. For example,
+convenient to place many other compiler options in @env{CC}. For example,
@env{CC="cc -Ac +DA2.0W -Wp,-H16376 -D_CLASSIC_TYPES -D_HPUX_SOURCE"}
can be used to bootstrap the GCC 3.3 branch with the HP compiler in
64-bit K&R/bundled mode. The @option{+DA2.0W} option will result in
commands. The default linker is determined during configuration. As a
result, it's not possible to switch linkers in the middle of a GCC build.
This has been been reported to sometimes occur in unified builds of
-binutils and GCC.
+binutils and GCC@.
-With GCC 3.0 through 3.2, you must use binutils 2.11 or above. As of
-GCC 3.3, binutils 2.14 or later is required.
+GCC 3.0 through 3.2 require binutils 2.11 or above. GCC 3.3 through
+GCC 3.5 require binutils 2.14 or later.
Although the HP assembler can be used for an initial build, it shouldn't
be used with any languages other than C and perhaps Fortran due to its
Supplement OSS631C or later. If you are using release 5.0.7 of
OpenServer, you must have at least the first maintenance pack installed
(this includes the relevant portions of OSS646). OSS646, also known as
-the "Execution Environment Update", provides updated link editors and
+the ``Execution Environment Update'', provides updated link editors and
assemblers, as well as updated standard C and math libraries. The C
startup modules are also updated to support the System V gABI draft, and
GCC relies on that behavior. OSS631 provides a collection of commonly
testing. In general, only the @option{--with-gnu-as} option is tested.
A modern bintuils (as well as a plethora of other development related
GNU utilities) can be found in Support Level Supplement OSS658A, the
-"GNU Development Tools" package. See the SCO web and ftp sites for details.
-That package also contains the currently "officially supported" version of
+``GNU Development Tools'' package. See the SCO web and ftp sites for details.
+That package also contains the currently ``officially supported'' version of
GCC, version 2.95.3. It is useful for bootstrapping this version.
@html
IA-64 processor (also known as IPF, or Itanium Processor Family)
running GNU/Linux.
-If you are using the optional libunwind library, then you must use
-libunwind 0.96 or later.
+If you are using the installed system libunwind library with
+@option{--with-system-libunwind}, then you must use libunwind 0.98 or
+later.
None of the following versions of GCC has an ABI that is compatible
with any of the other versions in this list, with the exception that
<hr />
@end html
@heading @anchor{ia64-*-hpux*}ia64-*-hpux*
-Building GCC on this target requires the GNU Assembler. The bundled HP
-assembler will not work. To prevent GCC from using the wrong assembler,
+Building GCC on this target requires the GNU Assembler. The bundled HP
+assembler will not work. To prevent GCC from using the wrong assembler,
the option @option{--with-gnu-as} may be necessary.
-The GCC libunwind library has not been ported to HPUX. This means that for
+The GCC libunwind library has not been ported to HPUX@. This means that for
GCC versions 3.2.3 and earlier, @option{--enable-libunwind-exceptions}
-is required to build GCC. For GCC 3.3 and later, this is the default.
+is required to build GCC@. For GCC 3.3 and later, this is the default.
+For gcc 3.4.3 and later, @option{--enable-libunwind-exceptions} is
+removed and the system libunwind library will always be used.
@html
<hr />
is the version of Make (see above).
The native @command{as} and @command{ld} are recommended for bootstrapping
-on AIX 4 and required for bootstrapping on AIX 5L. The GNU Assembler
+on AIX 4 and required for bootstrapping on AIX 5L@. The GNU Assembler
reports that it supports WEAK symbols on AIX 4, which causes GCC to try to
utilize weak symbol functionality although it is not supported. The GNU
-Assembler and Linker do not support AIX 5L sufficiently to bootstrap GCC.
+Assembler and Linker do not support AIX 5L sufficiently to bootstrap GCC@.
The native AIX tools do interoperate with GCC@.
Building @file{libstdc++.a} requires a fix for an AIX Assembler bug
@samp{mips*-*-linux*} target continues to use the MIPS II routines. More
work on this is expected in future releases.
+MIPS systems check for division by zero (unless
+@option{-mno-check-zero-division} is passed to the compiler) by
+generating either a conditional trap or a break instruction. Using
+trap results in smaller code, but is only supported on MIPS II and
+later. Also, some versions of the Linux kernel have a bug that
+prevents trap from generating the proper signal (@code{SIGFPE}). To enable
+the use of break, use the @option{--with-divide=breaks}
+@command{configure} option when configuring GCC@. The default is to
+use traps on systems that support them.
+
Cross-compilers for the Mips as target using the Mips assembler
currently do not work, because the auxiliary programs
@file{mips-tdump.c} and @file{mips-tfile.c} can't be compiled on
optimization option, you also need to use @option{-Olimit 3000}.
To enable debugging under IRIX 5, you must use GNU binutils 2.15 or
-later, and use the @option{--with-gnu-as} and @option{--with-gnu-ld}
-@command{configure} options when configuring GCC@. You need to use GNU
-@command{ar} and @command{nm}, also distributed with GNU binutils.
+later, and use the @option{--with-gnu-ld} @command{configure} option
+when configuring GCC@. You need to use GNU @command{ar} and @command{nm},
+also distributed with GNU binutils.
+
+Some users have reported that @command{/bin/sh} will hang during bootstrap.
+This problem can be avoided by running the commands:
+
+@smallexample
+ % CONFIG_SHELL=/bin/ksh
+ % export CONFIG_SHELL
+@end smallexample
+
+before starting the build.
@html
<hr />
then your version of @command{cc} uses the O32 or N64 ABI by default. You
should set the environment variable @env{CC} to @samp{cc -n32}
-before configuring GCC@. SGI's MIPSpro 7.2 assembler may misassemble
-parts of the compiler, causing bootstrap failures. MIPSpro 7.3 is
-known to work. MIPSpro C 7.4 may cause bootstrap failures, too, due
-to a bug when inlining @code{memcmp}. Either add @code{-U__INLINE_INTRINSICS}
-to the @env{CC} environment variable as a workaround or upgrade to
-MIPSpro C 7.4.1m.
+before configuring GCC@.
If you want the resulting @command{gcc} to run on old 32-bit systems
with the MIPS R4400 CPU, you need to ensure that only code for the @samp{mips3}
instead, you should set the environment variable @env{CC} to @samp{cc
-n32 -mips3} or @samp{gcc -mips3} respectively before configuring GCC@.
+MIPSpro C 7.4 may cause bootstrap failures, due to a bug when inlining
+@code{memcmp}. Either add @code{-U__INLINE_INTRINSICS} to the @env{CC}
+environment variable as a workaround or upgrade to MIPSpro C 7.4.1m.
+
GCC on IRIX 6 is usually built to support the N32, O32 and N64 ABIs. If
you build GCC on a system that doesn't have the N64 libraries installed
or cannot run 64-bit binaries,
Pre-installed versions of Mac OS X may not include any developer tools,
meaning that you will not be able to build GCC from source. Tool
binaries are available at
-@uref{http://developer.apple.com/tools/compilers.html} (free
+@uref{http://developer.apple.com/darwin/projects/compiler/} (free
registration required).
-The default stack limit of 512K is too small, which may cause compiles
-to fail with 'Bus error'. Set the stack larger, for instance
-by doing @samp{limit stack 800}. It's a good idea to use the GNU
-preprocessor instead of Apple's @file{cpp-precomp} during the first stage of
-bootstrapping; this is automatic when doing @samp{make bootstrap}, but
-to do it from the toplevel objdir you will need to say @samp{make
-CC='cc -no-cpp-precomp' bootstrap}.
+This version of GCC requires at least cctools-528.
The version of GCC shipped by Apple typically includes a number of
extensions not available in a standard GCC release. These extensions
-are generally specific to Mac programming.
+are generally for backwards compatibility and best avoided.
@html
<hr />
<hr />
@end html
@heading @anchor{s390x-ibm-tpf*}s390x-ibm-tpf*
-zSeries system (64-bit) running TPF. This platform is
+zSeries system (64-bit) running TPF@. This platform is
supported as cross-compilation target only.
@html
@heading @anchor{*-*-solaris2*}*-*-solaris2*
Sun does not ship a C compiler with Solaris 2. To bootstrap and install
-GCC you first have to install a pre-built compiler, see our
+GCC you first have to install a pre-built compiler, see the
@uref{binaries.html,,binaries page} for details.
The Solaris 2 @command{/bin/sh} will often fail to configure
% 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
-to invoke @var{srcdir}/configure.
+and then proceed as described in @uref{build.html,,the build instructions}.
+In addition we strongly recommend specifying an absolute path to invoke
+@var{srcdir}/configure.
Solaris 2 comes with a number of optional OS packages. Some of these
are needed to use GCC fully, namely @code{SUNWarc},
@file{/usr/bin} before @file{/usr/xpg4/bin} for the duration of the build.
All releases of GNU binutils prior to 2.11.2 have known bugs on this
-platform. We recommend the use of GNU binutils 2.11.2 or the vendor
-tools (Sun @command{as}, Sun @command{ld}).
+platform. We recommend the use of GNU binutils 2.11.2 or later, or the
+vendor tools (Sun @command{as}, Sun @command{ld}). Note that your mileage
+may vary if you use a combination of the GNU tools and the Sun tools: while
+the combination GNU @command{as} + Sun @command{ld} should reasonably work,
+the reverse combination Sun @command{as} + GNU @command{ld} is known to
+cause memory corruption at runtime in some cases for C++ programs.
+
+The stock GNU binutils 2.15 release is broken on this platform because of a
+single bug. It has been fixed on the 2.15 branch in the CVS repository.
+You can obtain a working version by checking out the binutils-2_15-branch
+from the CVS repository or applying the patch
+@uref{http://sources.redhat.com/ml/binutils-cvs/2004-09/msg00036.html} to the
+release.
Sun bug 4296832 turns up when compiling X11 headers with GCC 2.95 or
newer: @command{g++} will complain that types are missing. These headers assume
108377-20 for Intel), and Solaris 8 (108652-24 or newer for SPARC,
108653-22 for Intel) that fix this bug.
+Sun bug 4927647 sometimes causes random spurious testsuite failures
+related to missing diagnostic output. This bug doesn't affect GCC
+itself, rather it is a kernel bug triggered by the @command{expect}
+program which is used only by the GCC testsuite driver. When the bug
+causes the @command{expect} program to miss anticipated output, extra
+testsuite failures appear.
+
+There are patches for Solaris 8 (117350-12 or newer for SPARC,
+117351-12 or newer for Intel) and Solaris 9 (117171-11 or newer for
+SPARC, 117172-11 or newer for Intel) that address this problem.
+
@html
<hr />
@end html
the GNU compiler (especially GCC 3.0.x versions), which lead to the
miscompilation of the stage1 compiler and the subsequent failure of the
bootstrap process. A workaround is to use GCC 3.2.3 as an intermediary
-stage, i.e. to bootstrap that compiler with the base compiler and then
+stage, i.e.@: to bootstrap that compiler with the base compiler and then
use it to bootstrap the final compiler.
GCC 3.4 triggers a code generation bug in versions 5.4 (Sun ONE Studio 7)
assembler, this change apparently runs afoul of Sun bug 4910101, for
which (as of 2004-05-23) there is no fix. A symptom of the problem is
that you cannot compile C++ programs like @command{groff} 1.19.1
-without getting messages like @samp{ld: warning: relocation error:
-R_SPARC_UA32 @dots{} external symbolic relocation against
-non-allocatable section .debug_info; cannot be processed at runtime:
-relocation ignored}. To work around this problem, compile with
-@option{-gstabs+} instead of plain @option{-g}.
+without getting messages similar to the following:
+
+@smallexample
+ld: warning: relocation error: R_SPARC_UA32: @dots{}
+ external symbolic relocation against non-allocatable section
+ .debug_info cannot be processed at runtime: relocation ignored.
+@end smallexample
+
+To work around this problem, compile with @option{-gstabs+} instead of
+plain @option{-g}.
+
+When configuring the GNU Multiple Precision Library (GMP) on a Solaris 7
+or later system, the canonical target triplet must be specified as the
+@command{build} parameter on the configure line:
+
+@smallexample
+./configure --build=sparc-sun-solaris2.7 --prefix=xxx --enable-mpfr
+@end smallexample
@html
<hr />
GCC 3.3 triggers a bug in version 5.0 Alpha 03/27/98 of the Sun assembler,
which causes a bootstrap failure when linking the 64-bit shared version of
-libgcc. A typical error message is:
+libgcc. A typical error message is:
@smallexample
ld: fatal: relocation error: R_SPARC_32: file libgcc/sparcv9/_muldi3.o:
@end html
@heading @anchor{*-*-vxworks*}*-*-vxworks*
Support for VxWorks is in flux. At present GCC supports @emph{only} the
-very recent VxWorks 5.5 (aka Tornado 2.2) release, and only on PowerPC.
+very recent VxWorks 5.5 (aka Tornado 2.2) release, and only on PowerPC@.
We welcome patches for other architectures supported by VxWorks 5.5.
Support for VxWorks AE would also be welcome; we believe this is merely
a matter of writing an appropriate ``configlette'' (see below). We are
Choose an installation @var{prefix} entirely outside @var{$WIND_BASE}.
Before running @command{configure}, create the directories @file{@var{prefix}}
and @file{@var{prefix}/bin}. Link or copy the appropriate assembler,
-linker, etc. into @file{@var{prefix}/bin}, and set your @var{PATH} to
+linker, etc.@: into @file{@var{prefix}/bin}, and set your @var{PATH} to
include that directory while running both @command{configure} and
@command{make}.
@heading @anchor{x86_64-*-*}x86_64-*-*, amd64-*-*
GCC supports the x86-64 architecture implemented by the AMD64 processor
-(amd64-*-* is an alias for x86_64-*-*) on GNU/Linux, FreeBSD and NetBSD.
+(amd64-*-* is an alias for x86_64-*-*) on GNU/Linux, FreeBSD and NetBSD@.
On GNU/Linux the default is a bi-arch compiler which is able to generate
both 64-bit x86-64 and 32-bit x86 code (via the @option{-m32} switch).