@end ifset
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-@c 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+@c 1999, 2000, 2001, 2002, 2003, 2004 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 Free Software Foundation, Inc.
+1999, 2000, 2001, 2002, 2003, 2004 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
@ifinfo
@insertcopying
@end ifinfo
+@dircategory Programming
+@direntry
+* gccinstall: (gccinstall). Installing the GNU Compiler Collection.
+@end direntry
@c Part 3 Titlepage and Copyright
@titlepage
you proceed.
Lists of successful builds for released versions of GCC are
-available at @uref{http://gcc.gnu.org/buildstat.html}.
+available at @uref{http://gcc.gnu.org/buildstat.html}.
These lists are updated as new information becomes available.
The installation procedure itself is broken into five steps.
environment to your ``good'' shell prior to running
@command{configure}/@command{make}.
+@command{zsh} is not a fully compliant POSIX shell and will not
+work when configuring GCC.
+
@item GNU binutils
Necessary in some circumstances, optional in others. See the
Necessary to uncompress GCC @command{tar} files when source code is
obtained via FTP mirror sites.
+@item GNU make version 3.79.1 (or later)
+
+You must have GNU make installed to build GCC.
+
@item GNU tar version 1.12 (or later)
Necessary (only on some platforms) to untar the source code. Many
@heading Tools/packages necessary for modifying GCC
@table @asis
-@item autoconf version 2.13 (NO earlier or later versions) and
+@item autoconf versions 2.13 and 2.59
@itemx GNU m4 version 1.4 (or later)
-Necessary when modifying @file{configure.in}, @file{aclocal.m4}, etc.@:
-to regenerate @file{configure} and @file{config.in} files
+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, @file{libf2c},
+@file{libobjc}, @file{zlib}, and @file{libjava} (except for
+@file{libjava/libltdl}) still require autoconf 2.13 (exactly).
-@item automake version ???
+@item automake versions 1.4-gcj and 1.7.9
Necessary when modifying a @file{Makefile.am} file to regenerate its
-associated @file{Makefile.in}
+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{libf2c}, @file{libiberty}, @file{libobjc} directories as well as any
+of their subdirectories.
+
+The @file{libstdc++-v3}, @file{libjava/libltdl}, @file{fastjar} and
+@file{libffi} directories require automake 1.7.9. However, the Java
+directories, which include @file{boehm-gc}, @file{libjava}, and @file{zlib},
+require a modified version of automake 1.4 downloadable from
+@uref{ftp://gcc.gnu.org/pub/java/automake-gcj-1.4.tar.gz}.
+
+@item gettext version 0.12 (or later)
+
+Needed to regenerate @file{gcc.pot}.
@item gperf version 2.7.2 (or later)
Necessary to run the @file{fixinc} @command{make check}.
-Necessary to regenerate the top level @file{Makefile.am} files from
+Necessary to regenerate the top level @file{Makefile.in} file from
@file{Makefile.tpl} and @file{Makefile.def}.
@item GNU Bison version 1.28 (or later)
@item perl version 5.6.1 (or later)
Necessary when regenerating @file{Makefile} dependencies in libiberty.
-Necessary when regenerating something with intl??? (pod2man???)
-Other stuff???
+Necessary when regenerating @file{libiberty/functions.texi}.
+Necessary when generating manpages from Texinfo manuals.
+Used by various scripts to generate some files included in CVS (mainly
+Unicode-related and rarely changing) from source tables.
@item GNU diffutils version 2.7 (or later)
To configure GCC:
-@example
+@smallexample
% mkdir @var{objdir}
% cd @var{objdir}
% @var{srcdir}/configure [@var{options}] [@var{target}]
-@end example
+@end smallexample
@heading Target specification
@item
@var{target} must be specified as @option{--target=@var{target}}
when configuring a cross compiler; examples of valid targets would be
-i960-rtems, m68k-coff, sh-elf, etc.
+m68k-coff, sh-elf, etc.
@item
Specifying just @var{target} instead of @option{--target=@var{target}}
--help} may list other options, but those not listed below may not
work and should not normally be used.
+Note that each @option{--enable} option has a corresponding
+@option{--disable} option and that each @option{--with} option has a
+corresponding @option{--without} option.
+
@table @code
@item --prefix=@var{dirname}
Specify the toplevel installation
@var{dirname} correctly if it contains the @samp{~} metacharacter; use
@env{$HOME} instead.
-These additional options control where certain parts of the distribution
-are installed. Normally you should not need to use these options.
+The following standard @command{autoconf} options are supported. Normally you
+should not need to use these options.
@table @code
@item --exec-prefix=@var{dirname}
Specify the toplevel installation directory for architecture-dependent
@item --libdir=@var{dirname}
Specify the installation directory for object code libraries and
-internal parts of GCC@. The default is @file{@var{exec-prefix}/lib}.
+internal data files of GCC@. The default is @file{@var{exec-prefix}/lib}.
+
+@item --libexecdir=@var{dirname}
+Specify the installation directory for internal executables of GCC@.
+ The default is @file{@var{exec-prefix}/libexec}.
@item --with-slibdir=@var{dirname}
Specify the installation directory for the shared libgcc library. The
@item --mandir=@var{dirname}
Specify the installation directory for manual pages. The default is
@file{@var{prefix}/man}. (Note that the manual pages are only extracts from
-the full GCC manuals, which are provided in Texinfo format. The
-@command{g77} manpage is unmaintained and may be out of date; the others
+the full GCC manuals, which are provided in Texinfo format. The manpages
are derived by an automatic conversion process from parts of the full
manual.)
@item --with-gxx-include-dir=@var{dirname}
Specify
the installation directory for G++ header files. The default is
-@file{@var{prefix}/include/g++-v3}.
+@file{@var{prefix}/include/c++/@var{version}}.
@end table
whether you use the GNU assembler. On any other system,
@option{--with-gnu-as} has no effect.
-@itemize bullet
+@itemize @bullet
@item @samp{hppa1.0-@var{any}-@var{any}}
@item @samp{hppa1.1-@var{any}-@var{any}}
@item @samp{i386-@var{any}-sysv}
@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, for ISC on the
-386, and for @samp{mips-sgi-irix5.*}), if you use the GNU assembler,
+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}).
-@item --with-as=@var{pathname}
+@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:
@itemize @bullet
@item
-Check the
-@file{@var{exec_prefix}/lib/gcc-lib/@var{target}/@var{version}}
-directory, where @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.
+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.
@item
Check operating system specific directories (e.g.@: @file{/usr/ccs/bin} on
Sun Solaris 2).
@item @anchor{with-gnu-ld}--with-gnu-ld
Same as @uref{#with-gnu-as,,@option{--with-gnu-as}}
-but for linker.
-
+but for the linker.
@item --with-ld=@var{pathname}
-Same as
-@option{--with-as}, but for the linker.
+Same as @uref{#with-as,,@option{--with-as}}
+but for the linker.
@item --with-stabs
Specify that stabs debugging
In general, the best (and, in many cases, the only known) threading
model available will be configured for use. Beware that on some
-systems, gcc has not been taught what threading models are generally
+systems, GCC has not been taught what threading models are generally
available for the system. In this case, @option{--enable-threads} is an
alias for @option{--enable-threads=single}.
This is an alias for @samp{single}.
@item posix
Generic POSIX thread support.
-@item pthreads
-Same as @samp{posix} on arm*-*-linux*, *-*-chorusos* and *-*-freebsd*
-only. A future release of gcc might remove this alias or extend it
-to all platforms.
@item rtems
RTEMS thread support.
@item single
@itemx --with-arch=@var{cpu}
@itemx --with-tune=@var{cpu}
@itemx --with-abi=@var{abi}
+@itemx --with-fpu=@var{type}
@itemx --with-float=@var{type}
These configure options provide default values for the @option{-mschedule=},
-@option{-march=}, @option{-mtune=}, and @option{-mabi=} options and for
-@option{-mhard-float} or @option{-msoft-float}. As with @option{--with-cpu},
-which switches will be accepted and acceptable values of the arguments depend
-on the target.
+@option{-march=}, @option{-mtune=}, @option{-mabi=}, and @option{-mfpu=}
+options and for @option{-mhard-float} or @option{-msoft-float}. As with
+@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
AltiVec code when appropriate. This option is only available for
PowerPC systems.
+@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
+@option{-fuse-cxa-exit} to be passed by default.
+
@item --enable-target-optspace
Specify that target
libraries should be optimized for code space instead of code speed.
this. Note that you need a recent version of the @code{gettext} tools
to do so.
+@item --enable-generated-files-in-srcdir
+Neither the .c and .h files that are generated from bison and flex nor the
+info manuals and man pages that are built from the .texi files are present
+in the CVS development tree. When building GCC from that development tree,
+or from a snapshot which are created from CVS, then those generated files
+are placed in your build directory, which allows for the source to be in a
+readonly directory.
+
+If you configure with @option{--enable-generated-files-in-srcdir} then those
+generated files will go into the source directory. This is mainly intended
+for generating release or prerelease tarballs of the GCC sources, since it
+is not a requirement that the users of source releases to have flex, bison, or
+makeinfo.
+
@item --enable-version-specific-runtime-libs
Specify
that runtime libraries should be installed in the compiler specific
-subdirectory (@file{@var{libsubdir}}) rather than the usual places. In
-addition, @samp{libstdc++}'s include files will be installed in
-@file{@var{libsubdir}/include/g++} unless you overruled it by using
+subdirectory (@file{@var{libdir}/gcc}) rather than the usual places. In
+addition, @samp{libstdc++}'s include files will be installed into
+@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
their runtime libraries should be built. For a list of valid values for
@var{langN} you can issue the following command in the
@file{gcc} directory of your GCC source tree:@*
-@example
+@smallexample
grep language= */config-lang.in
-@end example
+@end smallexample
Currently, you can use any of the following:
@code{ada}, @code{c}, @code{c++}, @code{f77}, @code{java}, @code{objc}.
Building the Ada compiler has special requirements, see below.@*
@samp{make bootstrap} @strong{does not} work anymore, as those
language sub-directories might not have been configured!
-@item --disable-libgcj
-Specify that the run-time libraries
-used by GCJ should not be built. This is useful in case you intend
-to use GCJ with some other run-time, or you're going to install it
-separately, or it just happens not to build on your particular
-machine. In general, if the Java front end is enabled, the GCJ
-libraries will be enabled too, unless they're known to not work on
-the target platform. If GCJ is enabled but @samp{libgcj} isn't built, you
-may need to port it; in this case, before modifying the top-level
-@file{configure.in} so that @samp{libgcj} is enabled by default on this platform,
-you may use @option{--enable-libgcj} to override the default.
+@item --disable-libada
+Specify that the run-time libraries and tools used by GNAT should not
+be built. This can be useful for debugging, or for compatibility with
+previous Ada build procedures, when it was required to explicitly
+do a @samp{make -C gcc gnatlib_and_tools}.
@item --with-dwarf2
Specify that the compiler should
@item --enable-win32-registry
@itemx --enable-win32-registry=@var{key}
@itemx --disable-win32-registry
-The @option{--enable-win32-registry} option enables Windows-hosted GCC
+The @option{--enable-win32-registry} option enables Microsoft Windows-hosted GCC
to look up installations paths in the registry using the following key:
@smallexample
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} and
-@samp{gcac}. The
-default when @var{list} is not specified is @samp{misc,tree,gc,rtlflag}; the
-checks @samp{rtl} and @samp{gcac} are very expensive.
+@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.
@item --enable-coverage
-@item --enable-coverage=@var{level}
+@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
enable optimization. When coverage is enabled, the default level is
without optimization.
+@item --enable-gather-detailed-mem-stats
+When this option is specified more detailed information on memory
+allocation is gathered. This information is printed when using
+@option{-fmem-report}.
+
@item --enable-nls
@itemx --disable-nls
The @option{--enable-nls} option enables Native Language Support (NLS),
Search for libiconv header files in @file{@var{dir}/include} and
libiconv library files in @file{@var{dir}/lib}.
-@item --with-system-zlib
-Use installed zlib rather than that included with GCC@. This option
-only applies if the Java front end is being built.
-
@item --enable-obsolete
Enable configuration for an obsoleted system. If you attempt to
configure GCC for a system (build, host, or target) which has been
forward to maintain the port.
@end table
-Some options which only apply to building cross compilers:
+@subheading Cross-Compiler-Specific Options
+The following options only apply to building cross compilers.
@table @code
@item --with-sysroot
@itemx --with-sysroot=@var{dir}
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.
+
+@item --without-headers
+Tells GCC not use any target headers from a libc when building a cross
+compiler. When crossing to GNU/Linux, you need the headers so GCC
+can build the exception handling for libgcc.
+See @uref{http://www.objsw.com/CrossGCC/,,CrossGCC} for more information
+on this option.
+
@item --with-libs
@itemx --with-libs=``@var{dir1} @var{dir2} @dots{} @var{dirN}''
Deprecated in favor of @option{--with-sysroot}.
@samp{newlib}.
@end table
-Note that each @option{--enable} option has a corresponding
-@option{--disable} option and that each @option{--with} option has a
-corresponding @option{--without} option.
+@subheading Java-Specific Options
+
+The following option applies to the build of the Java front end.
+
+@table @code
+@item --disable-libgcj
+Specify that the run-time libraries
+used by GCJ should not be built. This is useful in case you intend
+to use GCJ with some other run-time, or you're going to install it
+separately, or it just happens not to build on your particular
+machine. In general, if the Java front end is enabled, the GCJ
+libraries will be enabled too, unless they're known to not work on
+the target platform. If GCJ is enabled but @samp{libgcj} isn't built, you
+may need to port it; in this case, before modifying the top-level
+@file{configure.in} so that @samp{libgcj} is enabled by default on this platform,
+you may use @option{--enable-libgcj} to override the default.
+
+@end table
+
+The following options apply to building @samp{libgcj}.
+
+@subsubheading General Options
+
+@table @code
+@item --disable-getenv-properties
+Don't set system properties from @env{GCJ_PROPERTIES}.
+
+@item --enable-hash-synchronization
+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
+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
+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,
+using non-functional stubs for native method implementations.
+
+@item --disable-jvmpi
+Disable JVMPI support.
+
+@item --with-ecos
+Enable runtime eCos target support.
+
+@item --without-libffi
+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
+Enable runtime debugging code.
+
+@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
+disabled, @samp{gcj} is invoked once for each @file{.java}
+file to compile into a @file{.class} file.
+
+@item --with-libiconv-prefix=DIR
+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
+this option if you are sure you need a different setting.
+
+@item --with-system-zlib
+Use installed @samp{zlib} rather than that included with GCC@.
+
+@item --with-win32-nlsapi=ansi, unicows or unicode
+Indicates how MinGW @samp{libgcj} translates between UNICODE
+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
+unspecified, this is the default.
+
+@item unicows
+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
+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
+only run on Microsoft Windows NT and above.
+@end table
+@end table
+
+@subsubheading AWT-Specific Options
+
+@table @code
+@item --with-x
+Use the X Window System.
+
+@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}).
+
+@item --enable-gtk-cairo
+Build the cairo Graphics2D implementation on GTK.
+
+@item --enable-java-gc=TYPE
+Choose garbage collector. Defaults to @option{boehm} if unspecified.
+
+@item --disable-gtktest
+Do not try to compile and run a test GTK+ program.
+
+@item --disable-glibtest
+Do not try to compile and run a test GLIB program.
+
+@item --with-libart-prefix=PFX
+Prefix where libart is installed (optional).
+
+@item --with-libart-exec-prefix=PFX
+Exec prefix where libart is installed (optional).
+
+@item --disable-libarttest
+Do not try to compile and run a test libart program.
+
+@end table
@html
<hr />
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;
+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.
roughly 40% of disk space both for the bootstrap and the final installation.
(Libraries will still contain debugging information.)
-@example
+@smallexample
make CFLAGS='-O' LIBCFLAGS='-g -O2' \
LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
-@end example
+@end smallexample
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
Note that if an error occurs in any step the make process will exit.
+If you are not building GNU binutils in the same source tree as GCC,
+you will need a cross-assembler and cross-linker installed before
+configuring GCC@. Put them in the directory
+@file{@var{prefix}/@var{target}/bin}. Here is a table of the tools
+you should put in this directory:
+
+@table @file
+@item as
+This should be the cross-assembler.
+
+@item ld
+This should be the cross-linker.
+
+@item ar
+This should be the cross-archiver: a program which can manipulate
+archive files (linker libraries) in the target machine's format.
+
+@item ranlib
+This should be a program to construct a symbol table in an archive file.
+@end table
+
+The installation of GCC will find these programs in that directory,
+and copy or link them to the proper place to for the cross-compiler to
+find them when run later.
+
+The easiest way to provide these files is to build the Binutils package.
+Configure it with the same @option{--host} and @option{--target}
+options that you use for configuring GCC, then build and install
+them. They install their executables automatically into the proper
+directory. Alas, they do not support all the targets that GCC
+supports.
+
+If you are not building a C library in the same source tree as GCC,
+you should also provide the target libraries and headers before
+configuring GCC, specifying the directories with
+@option{--with-sysroot} or @option{--with-headers} and
+@option{--with-libs}. Many targets also require ``start files'' such
+as @file{crt0.o} and
+@file{crtn.o} which are linked into each executable. There may be several
+alternatives for @file{crt0.o}, for use with profiling or other
+compilation options. Check your target's definition of
+@code{STARTFILE_SPEC} to find out what start files it uses.
+
@section Building in parallel
-If you have a multiprocessor system 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 just @samp{make bootstrap}
-when building GCC@. You can use a bigger number instead of two if
-you like. In most cases, it won't help to use a number bigger than
-the number of processors in your machine.
+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.
@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.
-However, you do not need a full installation of GNAT, just the GNAT
-binary @file{gnat1}, a copy of @file{gnatbind}, and a compiler driver
-which can deal with Ada input (by invoking the @file{gnat1} binary).
-You can specify this compiler driver by setting the @env{ADAC}
-environment variable at the configure step. @command{configure} can
-detect the driver automatically if it has got a common name such as
-@command{gcc} or @command{gnatgcc}. Of course, you still need a working
-C compiler (the compiler driver can be different or not).
@command{configure} does not test whether the GNAT installation works
and has a sufficiently recent version; if too old a GNAT version is
installed, the build will fail unless @option{--enable-languages} is
used to disable building the Ada front end.
-Additional build tools (such as @command{gnatmake}) or a working GNAT
-run-time library installation are usually @emph{not} required. However,
-if you want to bootstrap the compiler using a minimal version of GNAT,
-you have to issue the following commands before invoking @samp{make
-bootstrap} (this assumes that you start with an unmodified and consistent
-source distribution):
-
-@example
- cd @var{srcdir}/gcc/ada
- touch treeprs.ads [es]info.h nmake.ad[bs]
-@end example
-
-At the moment, the GNAT library and several tools for GNAT are not built
-by @samp{make bootstrap}. You have to invoke
-@samp{make gnatlib_and_tools} in the @file{@var{objdir}/gcc}
-subdirectory before proceeding with the next steps.
-
-For example, you can build a native Ada compiler by issuing the
-following commands (assuming @command{make} is GNU make):
-
-@example
- cd @var{objdir}
- @var{srcdir}/configure --enable-languages=c,ada
- cd @var{srcdir}/gcc/ada
- touch treeprs.ads [es]info.h nmake.ad[bs]
- cd @var{objdir}
- make bootstrap
- cd gcc
- make gnatlib_and_tools
- cd ..
-@end example
-
-Currently, when compiling the Ada front end, you cannot use the parallel
-build feature described in the previous section.
-
@section Building with profile feedback
It is possible to use profile feedback to optimize the compiler itself. This
separately.
Second, you must have the testing tools installed. This includes
-@uref{http://www.gnu.org/software/dejagnu/,,DejaGnu} 1.4.2 (or later),
-Tcl, and Expect; the DejaGnu site has links to these.
+@uref{http://www.gnu.org/software/dejagnu/,,DejaGnu} 1.4.1 or 1.4.3
+and later, Tcl, and Expect; the DejaGnu site has links to these.
If the directories where @command{runtest} and @command{expect} were
installed are not in the @env{PATH}, you may need to set the following
environment variables appropriately, as in the following example (which
assumes that DejaGnu has been installed under @file{/usr/local}):
-@example
+@smallexample
TCL_LIBRARY = /usr/local/share/tcl8.0
DEJAGNULIBS = /usr/local/share/dejagnu
-@end example
+@end smallexample
(On systems such as Cygwin, these paths are required to be actual
paths, not mounts or links; presumably this is due to some lack of
Finally, you can run the testsuite (which may take a long time):
-@example
+@smallexample
cd @var{objdir}; make -k check
-@end example
+@end smallexample
This will test various components of GCC, such as compiler
front ends and runtime libraries. While running the testsuite, DejaGnu
might emit some harmless messages resembling
-@samp{WARNING: Couldn't find the global config file.} or
+@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?
A more selective way to just run all @command{gcc} execute tests in the
testsuite is to use
-@example
+@smallexample
make check-gcc RUNTESTFLAGS="execute.exp @var{other-options}"
-@end example
+@end smallexample
Likewise, in order to run only the @command{g++} ``old-deja'' tests in
the testsuite with filenames matching @samp{9805*}, you would use
-@example
+@smallexample
make check-g++ RUNTESTFLAGS="old-deja.exp=9805* @var{other-options}"
-@end example
+@end smallexample
The @file{*.exp} files are located in the testsuite directories of the GCC
source, the most important ones being @file{compile.exp},
output of @samp{make check} into a file and look at the
@samp{Running @dots{} .exp} lines.
+@section Passing options and running multiple testsuites
+
+You can pass multiple options to the testsuite using the
+@samp{--target_board} option of DejaGNU, either passed as part of
+@samp{RUNTESTFLAGS}, or directly to @command{runtest} if you prefer to
+work outside the makefiles. For example,
+
+@smallexample
+ make check-g++ RUNTESTFLAGS="--target_board=unix/-O3/-fno-strength-reduce"
+@end smallexample
+
+will run the standard @command{g++} testsuites (``unix'' is the target name
+for a standard native testsuite situation), passing
+@samp{-O3 -fno-strength-reduce} to the compiler on every test, i.e.,
+slashes separate options.
+
+You can run the testsuites multiple times using combinations of options
+with a syntax similar to the brace expansion of popular shells:
+
+@smallexample
+ @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.)
+The following will run each testsuite eight times using the @samp{arm-sim}
+target, as if you had specified all possible combinations yourself:
+
+@smallexample
+ --target_board=arm-sim/-mhard-float/-O1
+ --target_board=arm-sim/-mhard-float/-O2
+ --target_board=arm-sim/-mhard-float/-O3
+ --target_board=arm-sim/-mhard-float
+ --target_board=arm-sim/-msoft-float/-O1
+ --target_board=arm-sim/-msoft-float/-O2
+ --target_board=arm-sim/-msoft-float/-O3
+ --target_board=arm-sim/-msoft-float
+@end smallexample
+
+They can be combined as many times as you wish, in arbitrary ways. This
+list:
+
+@smallexample
+ @dots{}"--target_board=unix/-Wextra@{-O3,-fno-strength-reduce@}@{-fomit-frame-pointer,@}"
+@end smallexample
+
+will generate four combinations, all involving @samp{-Wextra}.
+
+The disadvantage to this method is that the testsuites are run in serial,
+which is a waste on multiprocessor systems. For users with GNU Make and
+a shell which performs brace expansion, you can run the testsuites in
+parallel by having the shell perform the combinations and @command{make}
+do the parallel runs. Instead of using @samp{--target_board}, use a
+special makefile target:
+
+@smallexample
+ make -j@var{N} check-@var{testsuite}//@var{test-target}/@var{option1}/@var{option2}/@dots{}
+@end smallexample
+
+For example,
+
+@smallexample
+ make -j3 check-gcc//sh-hms-sim/@{-m1,-m2,-m3,-m3e,-m4@}/@{,-nofpu@}
+@end smallexample
+
+will run three concurrent ``make-gcc'' testsuites, eventually testing all
+ten combinations as described above. Note that this is currently only
+supported in the @file{gcc} subdirectory. (To see how this works, try
+typing @command{echo} before the example given here.)
+
@section Additional testing for Java Class Libraries
+The Java runtime tests can be executed via @samp{make check}
+in the @file{@var{target}/libjava/testsuite} directory in
+the build tree.
+
The @uref{http://sources.redhat.com/mauve/,,Mauve Project} provides
a suite of tests for the Java Class Libraries. This suite can be run
as part of libgcj testing by placing the Mauve tree within the libjava
The result of running the testsuite are various @file{*.sum} and @file{*.log}
files in the testsuite subdirectories. The @file{*.log} files contain a
detailed log of the compiler invocations and the corresponding
-results, the @file{*.sum} files summarize the results. These summaries
-contain status codes for all tests:
+results, the @file{*.sum} files summarize the results. These summaries
+contain status codes for all tests:
@itemize @bullet
@item
If you want to report the results to the GCC project, use the
@file{contrib/test_summary} shell script. Start it in the @var{objdir} with
-@example
+@smallexample
@var{srcdir}/contrib/test_summary -p your_commentary.txt \
-m gcc-testresults@@gcc.gnu.org |sh
-@end example
+@end smallexample
This script uses the @command{Mail} program to send the results, so
make sure it is in your @env{PATH}. The file @file{your_commentary.txt} is
@end ifnothtml
Now that GCC has been built (and optionally tested), you can install it with
-@example
+@smallexample
cd @var{objdir}; make install
-@end example
+@end smallexample
We strongly recommend to install into a target directory where there is
no previous version of GCC present.
That step completes the installation of GCC; user level binaries can
-be found in @file{@var{prefix}/bin} where @var{prefix} is the value you
-specified with the @option{--prefix} to configure (or @file{/usr/local}
-by default). (If you specified @option{--bindir}, that directory will
-be used instead; otherwise, if you specified @option{--exec-prefix},
-@file{@var{exec-prefix}/bin} will be used.) Headers for the C++ and
-Java libraries are installed in @file{@var{prefix}/include}; libraries
-in @file{@var{libdir}} (normally @file{@var{prefix}/lib}); internal
-parts of the compiler in @file{@var{libdir}/gcc-lib}; documentation in
-info format in @file{@var{infodir}} (normally @file{@var{prefix}/info}).
+be found in @file{@var{prefix}/bin} where @var{prefix} is the value
+you specified with the @option{--prefix} to configure (or
+@file{/usr/local} by default). (If you specified @option{--bindir},
+that directory will be used instead; otherwise, if you specified
+@option{--exec-prefix}, @file{@var{exec-prefix}/bin} will be used.)
+Headers for the C++ and Java libraries are installed in
+@file{@var{prefix}/include}; libraries in @file{@var{libdir}}
+(normally @file{@var{prefix}/lib}); internal parts of the compiler in
+@file{@var{libdir}/gcc} and @file{@var{libexecdir}/gcc}; documentation
+in info format in @file{@var{infodir}} (normally
+@file{@var{prefix}/info}).
When installing cross-compilers, GCC's executables
are not only installed into @file{@var{bindir}}, that
Installation into a temporary staging area or into a @command{chroot}
jail can be achieved with the command
-@example
+@smallexample
make DESTDIR=@var{path-to-rootdir} install
-@end example
+@end smallexample
@noindent where @var{path-to-rootdir} is the absolute path of
a directory relative to which all installation paths will be
that file itself, just the one-line output from running it.
@item
-The output of @samp{gcc -v} for your newly installed gcc.
+The output of @samp{gcc -v} for your newly installed @command{gcc}.
This tells us which version of GCC you built and the options you passed to
configure.
DOS---@uref{http://www.delorie.com/djgpp/,,DJGPP}.
@item
-Hitachi H8/300[HS]---@uref{http://h8300-hms.sourceforge.net/,,GNU
-Development Tools for the Hitachi H8/300[HS] Series}.
+Renesas H8/300[HS]---@uref{http://h8300-hms.sourceforge.net/,,GNU
+Development Tools for the Renesas H8/300[HS] Series}.
@item
HP-UX:
@item
Sinix/Reliant Unix---@uref{ftp://ftp.fujitsu-siemens.com/pub/pd/gnu/gcc/,,Siemens}.
-
+
@item
Solaris 2 (SPARC, Intel)---@uref{http://www.sunfreeware.com/,,Sunfreeware}.
@item
@uref{#arc-*-elf,,arc-*-elf}
@item
-@uref{#arm-*-*,,arm-*-*}
+@uref{#arm-*-elf,,arm-*-elf}
+@uref{#arm-*-coff,,arm-*-coff}
+@uref{#arm-*-aout,,arm-*-aout}
@item
@uref{#xscale-*-*,,xscale-*-*}
@item
@item
@uref{#dos,,DOS}
@item
-@uref{#dsp16xx,,dsp16xx}
-@item
@uref{#*-*-freebsd*,,*-*-freebsd*}
@item
@uref{#h8300-hms,,h8300-hms}
@item
@uref{#hppa*-hp-hpux11,,hppa*-hp-hpux11}
@item
-@uref{#i370-*-*,,i370-*-*}
-@item
@uref{#*-*-linux-gnu,,*-*-linux-gnu}
@item
@uref{#ix86-*-linux*aout,,i?86-*-linux*aout}
@item
@uref{#ix86-*-linux*,,i?86-*-linux*}
@item
-@uref{#ix86-*-sco,,i?86-*-sco}
-@item
-@uref{#ix86-*-sco3.2v4,,i?86-*-sco3.2v4}
-@item
@uref{#ix86-*-sco3.2v5*,,i?86-*-sco3.2v5*}
@item
@uref{#ix86-*-udk,,i?86-*-udk}
@item
@uref{#ia64-*-linux,,ia64-*-linux}
@item
+@uref{#ia64-*-hpux*,,ia64-*-hpux*}
+@item
@uref{#*-ibm-aix*,,*-ibm-aix*}
@item
@uref{#ip2k-*-elf,,ip2k-*-elf}
@item
+@uref{#iq2000-*-elf,,iq2000-*-elf}
+@item
@uref{#m32r-*-elf,,m32r-*-elf}
@item
@uref{#m6811-elf,,m6811-elf}
@item
@uref{#powerpcle-*-eabi,,powerpcle-*-eabi}
@item
-@uref{#powerpcle-*-winnt,,powerpcle-*-winnt, powerpcle-*-pe}
-@item
@uref{#s390-*-linux*,,s390-*-linux*}
@item
@uref{#s390x-*-linux*,,s390x-*-linux*}
@item
+@uref{#s390x-ibm-tpf*,,s390x-ibm-tpf*}
+@item
@uref{#*-*-solaris2*,,*-*-solaris2*}
@item
@uref{#sparc-sun-solaris2*,,sparc-sun-solaris2*}
@item
@uref{#*-*-vxworks*,,*-*-vxworks*}
@item
+@uref{#x86_64-*-*,,x86_64-*-*, amd64-*-*}
+@item
@uref{#xtensa-*-elf,,xtensa-*-elf}
@item
@uref{#xtensa-*-linux*,,xtensa-*-linux*}
@option{-oldas} option. To bootstrap GCC, you either need to use the
Compaq C Compiler:
-@example
+@smallexample
% CC=cc @var{srcdir}/configure [@var{options}] [@var{target}]
-@end example
+@end smallexample
or you can use a copy of GCC 2.95.3 or higher built on Tru64 UNIX V4.0:
-@example
+@smallexample
% CC=gcc -Wa,-oldas @var{srcdir}/configure [@var{options}] [@var{target}]
-@end example
+@end smallexample
As of GNU binutils 2.11.2, neither GNU @command{as} nor GNU @command{ld}
are supported on Tru64 UNIX, so you must not configure GCC with
@option{--with-gnu-as} or @option{--with-gnu-ld}.
-The @option{--enable-threads} options isn't supported yet. A patch is
-in preparation for a future release.
-
GCC writes a @samp{.verstamp} directive to the assembler output file
unless it is built as a cross-compiler. It gets the version to use from
the system header file @file{/usr/include/stamp.h}. If you install a
simplest way to do so is by providing @option{--with-as} and
@option{--with-ld} to @file{configure}, e.g.@:
-@example
+@smallexample
configure --with-as=/opt/ctl/bin/cam --with-ld=/opt/ctl/bin/cld \
--enable-languages=c
-@end example
+@end smallexample
The comparison test during @samp{make bootstrap} fails on Unicos/Mk
because the assembler inserts timestamps into object files. You should
@html
<hr />
@end html
-@heading @anchor{arm-*-*}arm-*-*
+@heading @anchor{arm-*-elf}arm-*-elf
@heading @anchor{xscale-*-*}xscale-*-*
-Advanced RISC Machines ARM-family processors. Subtargets that use the
-ELF object format require GNU binutils 2.13 or newer.
+ARM-family processors. Subtargets that use the ELF object format
+require GNU binutils 2.13 or newer. Such subtargets include:
+@code{arm-*-freebsd}, @code{arm-*-netbsdelf}, @code{arm-*-*linux},
+@code{arm-*-rtems} and @code{arm-*-kaos}.
+
+@html
+<hr />
+@end html
+@heading @anchor{arm-*-coff}arm-*-coff
+ARM-family processors. Note that there are two different varieties
+of PE format subtarget supported: @code{arm-wince-pe} and
+@code{arm-pe} as well as a standard COFF target @code{arm-*-coff}.
+
+@html
+<hr />
+@end html
+@heading @anchor{arm-*-aout}arm-*-aout
+ARM-family processors. These targets support the AOUT file format:
+@code{arm-*-aout}, @code{arm-*-netbsd}.
@html
<hr />
We @emph{strongly} recommend using binutils 2.13 or newer.
The following error:
-@example
+@smallexample
Error: register required
-@end example
+@end smallexample
indicates that you should upgrade to a newer version of the binutils.
compilation package DJGPP, which includes binaries as well as sources,
and includes all the necessary compilation tools and libraries.
-@html
-<hr />
-@end html
-@heading @anchor{dsp16xx}dsp16xx
-A port to the AT&T DSP1610 family of processors.
-
@html
<hr />
@end html
@heading @anchor{*-*-freebsd*}*-*-freebsd*
-The version of binutils installed in @file{/usr/bin} is known to work unless
-otherwise specified in any per-architecture notes. However, binutils
-2.12.1 or greater is known to improve overall testsuite results.
+The version of binutils installed in @file{/usr/bin} probably works with
+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.
-FreeBSD 1 is no longer supported.
+Support for FreeBSD 1 was discontinued in GCC 3.2.
+Support for FreeBSD 2 will be discontinued after GCC 3.4. The
+following was true for GCC 3.1 but the current status is unknown.
For FreeBSD 2 or any mutant a.out versions of FreeBSD 3: All
configuration support and files as shipped with GCC 2.95 are still in
place. FreeBSD 2.2.7 has been known to bootstrap completely; however,
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
-results on FreeBSD 4.8-STABLE and 5-CURRENT@. In the past, known to
+results on FreeBSD 4.9-STABLE and 5-CURRENT@. In the past, known to
bootstrap and check with good results on FreeBSD 3.0, 3.4, 4.0, 4.2,
-4.3, 4.4, 4.5-STABLE@.
+4.3, 4.4, 4.5, 4.8-STABLE@.
In principle, @option{--enable-threads} is now compatible with
@option{--enable-libgcj} on FreeBSD@. However, it has only been built
<hr />
@end html
@heading @anchor{h8300-hms}h8300-hms
-Hitachi H8/300 series of processors.
+Renesas H8/300 series of processors.
Please have a look at our @uref{binaries.html,,binaries page}.
<hr />
@end html
@heading @anchor{hppa*-hp-hpux*}hppa*-hp-hpux*
-HP-UX version 9 or older is no longer supported.
+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
@option{--with-as=@dots{}} options.
If you wish to use the pa-risc 2.0 architecture support with a 32-bit
-runtime, you must use either the HP assembler, gas/binutils 2.11 or newer,
-or a recent
-@uref{ftp://sources.redhat.com/pub/binutils/snapshots,,snapshot of gas}.
+runtime, you must use either the HP assembler, or 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
@end html
@heading @anchor{hppa*-hp-hpux11}hppa*-hp-hpux11
-GCC 3.0 and up support HP-UX 11. On 64-bit capable systems, there
-are two distinct ports. The @samp{hppa2.0w-hp-hpux11*} port generates
-code for the 32-bit pa-risc runtime architecture. It uses the HP
-linker. The @samp{hppa64-hp-hpux11*} port generates 64-bit code for the
-pa-risc 2.0 architecture. The script config.guess now selects the port
-type based on the type compiler detected during configuration. You must
-set your @env{PATH} or define @env{CC} so that configure finds an appropriate
-compiler for the initial bootstrap. Different prefixes must be used if
-both ports are to be installed on the same system.
+GCC 3.0 and up support HP-UX 11. GCC 2.95.x is not supported and cannot
+be used to compile GCC 3.0 and up.
-It is best to explicitly configure the @samp{hppa64-hp-hpux11*} target
-with the @option{--with-ld=@dots{}} option. We support both the HP
-and GNU linkers for this target. The two linkers require different
-link commands. Thus, it's not possible to switch linkers during a
-GCC build. This has been been reported to occur in a unified build
-of binutils and GCC.
+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
+only available for the 32-bit PA-RISC runtime. The libffi and libjava
+haven't been ported to HP-UX and don't build.
-GCC 2.95.x is not supported under HP-UX 11 and cannot 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.
+It is possible to build GCC 3.3 starting with the bundled HP compiler,
+but the process requires several steps. GCC 3.3 can then be used to
+build later versions. The fastjar program contains ISO C code and
+can't be built with the HP bundled compiler. This problem can be
+avoided by not building the Java language. For example, use the
+@option{--enable-languages="c,c++,f77,objc"} option in your configure
+command.
-You must use GNU binutils 2.11 or above with the 32-bit port. Thread
-support is not currently implemented, so @option{--enable-threads} does
-not work. See:
+Starting with GCC 3.4 an ISO C compiler is required to bootstrap. The
+bundled compiler supports only traditional C; you will need either HP's
+unbundled compiler, or a binary distribution of GCC@.
-@itemize
-@item @uref{http://gcc.gnu.org/ml/gcc-prs/2002-01/msg00551.html}
-@item @uref{http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00663.html}
-@end itemize
+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.
+There have been problems with various binary distributions, so it
+is best not to start from a binary distribution.
+
+On 64-bit capable systems, there are two distinct targets. Different
+installation prefixes must be used if both are to be installed on
+the same system. The @samp{hppa[1-2]*-hp-hpux11*} target generates code
+for the 32-bit PA-RISC runtime architecture and uses the HP linker.
+The @samp{hppa64-hp-hpux11*} target generates 64-bit code for the
+PA-RISC 2.0 architecture. The HP and GNU linkers are both supported
+for this target.
+
+The script config.guess now selects the target type based on the compiler
+detected during configuration. You must define @env{PATH} or @env{CC} so
+that configure finds an appropriate compiler for the initial bootstrap.
+When @env{CC} is used, the definition should contain the options that are
+needed whenever @env{CC} is used.
+
+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,
+@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
+the automatic selection of the @samp{hppa64-hp-hpux11*} target. The
+macro definition table of cpp needs to be increased for a successful
+build with the HP compiler. _CLASSIC_TYPES and _HPUX_SOURCE need to
+be defined when building with the bundled compiler, or when using the
+@option{-Ac} option. These defines aren't necessary with @option{-Ae}.
-GCC 3.3 and later support weak symbols on the 32-bit port using SOM
-secondary definition symbols. This feature is not enabled for earlier
-versions of HP-UX since there have been bugs in the linker support for
-secondary symbols. The HP linker patches @code{PHSS_26559} and
-@code{PHSS_24304} for HP-UX 11.00 and 11.11, respectively, correct the
-problem of linker core dumps creating C++ libraries. Earlier patches
-may work but they have not been tested.
-
-GCC 3.3 nows uses the ELF DT_INIT_ARRAY and DT_FINI_ARRAY capability
-to run initializers and finalizers on the 64-bit port. The feature
-requires CVS binutils as of January 2, 2003, or a subsequent release
-to correct a problem arising from HP's non-standard use of the .init
-and .fini sections. The 32-bit port uses the linker @option{+init}
-and @option{+fini} options. As with the support for secondary symbols,
-there have been bugs in the order in which these options are executed
-by the HP linker. So, again a recent linker patch is recommended.
-
-The HP assembler has many limitations and is not recommended for either
-the 32 or 64-bit ports. For example, it does not support weak symbols
-or alias definitions. As a result, explicit template instantiations
-are required when using C++. This will make it difficult if not
-impossible to build many C++ applications. You also can't generate
-debugging information when using the HP assembler with GCC.
+It is best to explicitly configure the @samp{hppa64-hp-hpux11*} target
+with the @option{--with-ld=@dots{}} option. This overrides the standard
+search for ld. The two linkers supported on this target require different
+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.
+
+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.
+
+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
+many limitations. For example, it does not support weak symbols or alias
+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
+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}.
+
+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
+oldest linker patches that are known to work. They are for HP-UX
+11.00 and 11.11, respectively. @code{PHSS_24303}, the companion to
+@code{PHSS_24304}, might be usable but it hasn't been tested. These
+patches have been superseded. Consult the HP patch database to obtain
+the currently recommended linker patch for your system.
+
+The patches are necessary for the support of weak symbols on the
+32-bit port, and for the running of initializers and finalizers. Weak
+symbols are implemented using SOM secondary definition symbols. Prior
+to HP-UX 11, there are bugs in the linker support for secondary symbols.
+The patches correct a problem of linker core dumps creating shared
+libraries containing secondary symbols, as well as various other
+linking issues involving secondary symbols.
+
+GCC 3.3 uses the ELF DT_INIT_ARRAY and DT_FINI_ARRAY capabilities to
+run initializers and finalizers on the 64-bit port. The 32-bit port
+uses the linker @option{+init} and @option{+fini} options for the same
+purpose. The patches correct various problems with the +init/+fini
+options, including program core dumps. Binutils 2.14 corrects a
+problem on the 64-bit port resulting from HP's non-standard use of
+the .init and .fini sections for array initializers and finalizers.
There are a number of issues to consider in selecting which linker to
-use with the 64-bit port. The GNU 64-bit linker can only create dynamic
+use with the 64-bit port. The GNU 64-bit linker can only create dynamic
binaries. The @option{-static} option causes linking with archive
libraries but doesn't produce a truly static binary. Dynamic binaries
still require final binding by the dynamic loader to resolve a set of
calls to global functions in shared libraries, so these calls
can't be overloaded.
-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.
-There have been problems with various binary distributions, so
-it is best not to start from a binary distribution.
-
-Starting with GCC 3.4 an ISO C compiler is required to bootstrap.
-The bundled compiler supports only traditional C; you will need
-either HP's unbundled compiler, or a binary distribution of GCC@.
+Thread support is not implemented in GCC 3.0 through 3.2, so the
+@option{--enable-threads} configure option does not work. In 3.3
+and later, POSIX threads are supported. The optional DCE thread
+library is not supported.
This port still is undergoing significant development.
-@html
-<hr />
-@end html
-@heading @anchor{i370-*-*}i370-*-*
-This port is very preliminary and has many known bugs. We hope to
-have a higher-quality port for this machine soon.
-
@html
<hr />
@end html
in glibc 2.2.5 and later. More information is available in the
libstdc++-v3 documentation.
-If you use glibc 2.2 (or 2.1.9x), GCC 2.95.2 won't install
-out-of-the-box. You'll get compile errors while building @samp{libstdc++}.
-The patch @uref{glibc-2.2.patch,,glibc-2.2.patch}, that is to be
-applied in the GCC source tree, fixes the compatibility problems.
-
-Currently Glibc 2.2.3 (and older releases) and GCC 3.0 are out of sync
-since the latest exception handling changes for GCC@. Compiling glibc
-with GCC 3.0 will give a binary incompatible glibc and therefore cause
-lots of problems and might make your system completely unusable. This
-will definitely need fixes in glibc but might also need fixes in GCC@. We
-strongly advise to wait for glibc 2.2.4 and to read the release notes of
-glibc 2.2.4 whether patches for GCC 3.0 are needed. You can use glibc
-2.2.3 with GCC 3.0, just do not try to recompile it.
-
@html
<hr />
@end html
@heading @anchor{ix86-*-linux*aout}i?86-*-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.
+GNU systems. This configuration is being superseded.
@html
<hr />
@end html
@heading @anchor{ix86-*-linux*}i?86-*-linux*
-You will need binutils 2.9.1.0.15 or newer for exception handling to work.
+As of GCC 3.3, binutils 2.13.1 or later is required for this platform.
+See @uref{http://gcc.gnu.org/PR10877,,bug 10877} for more information.
If you receive Signal 11 errors when building on GNU/Linux, then it is
possible you have a hardware problem. Further information on this can be
found on @uref{http://www.bitwizard.nl/sig11/,,www.bitwizard.nl}.
-@html
-<hr />
-@end html
-@heading @anchor{ix86-*-sco}i?86-*-sco
-Compilation with RCC is recommended. Also, it may be a good idea to
-link with GNU malloc instead of the malloc that comes with the system.
-
-@html
-<hr />
-@end html
-@heading @anchor{ix86-*-sco3.2v4}i?86-*-sco3.2v4
-Use this configuration for SCO release 3.2 version 4.
-
@html
<hr />
@end html
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 behaviour. OSS631 provides a collection of commonly
+GCC relies on that behavior. OSS631 provides a collection of commonly
used open source libraries, some of which GCC depends on (such as GNU
gettext and zlib). SCO OpenServer Release 5.0.7 has all of this built
in by default, but OSS631C and later also apply to that release. Please
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
-GCC, version 2.95.3. It is useful for bootstrapping this version.
+GCC, version 2.95.3. It is useful for bootstrapping this version.
@html
<hr />
building a cross compiler. The easiest way to do this is with a configure
command like this:
-@example
+@smallexample
CC=/udk/usr/ccs/bin/cc @var{/your/path/to}/gcc/configure \
--host=i686-pc-udk --target=i686-pc-udk --program-prefix=udk-
-@end example
+@end smallexample
@emph{You should substitute @samp{i686} in the above command with the appropriate
processor for your host.}
IA-64 processor (also known as IPF, or Itanium Processor Family)
running GNU/Linux.
-The toolchain is not completely finished, so requirements will continue
-to change.
-GCC 3.0.1 and later require glibc 2.2.4.
-GCC 3.0.2 requires binutils from 2001-09-05 or later.
-GCC 3.0.1 requires binutils 2.11.1 or later.
+If you are using the optional libunwind library, then you must use
+libunwind 0.96 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
Red Hat 2.96 and Trillian 000171 are compatible with each other:
-3.0.2, 3.0.1, 3.0, Red Hat 2.96, and Trillian 000717.
+3.1, 3.0.2, 3.0.1, 3.0, Red Hat 2.96, and Trillian 000717.
This primarily affects C++ programs and programs that create shared libraries.
-Because of these ABI incompatibilities, GCC 3.0.2 is not recommended for
-user programs on GNU/Linux systems built using earlier compiler releases.
-GCC 3.0.2 is recommended for compiling linux, the kernel.
-GCC 3.0.2 is believed to be fully ABI compliant, and hence no more major
-ABI changes are expected.
+GCC 3.1 or later is recommended for compiling linux, the kernel.
+As of version 3.1 GCC is believed to be fully ABI compliant, and hence no
+more major ABI changes are expected.
+
+@html
+<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,
+the option @option{--with-gnu-as} may be necessary.
+
+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.
@html
<hr />
<!-- rs6000-ibm-aix*, powerpc-ibm-aix* -->
@end html
@heading @anchor{*-ibm-aix*}*-ibm-aix*
-AIX version 3 or older is no longer supported.
+Support for AIX version 3 and older was discontinued in GCC 3.4.
-AIX Make frequently has problems with GCC makefiles. GNU Make 3.76 or
+AIX Make frequently has problems with GCC makefiles. GNU Make 3.79.1 or
newer is recommended to build on this platform.
+To speed up the configuration phases of bootstrapping and installing GCC,
+one may use GNU Bash instead of AIX @command{/bin/sh}, e.g.,
+
+@smallexample
+ % CONFIG_SHELL=/opt/freeware/bin/bash
+ % 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.
+
Errors involving @code{alloca} when building GCC generally are due
to an incorrect definition of @code{CC} in the Makefile or mixing files
compiled with the native C compiler and GCC@. During the stage1 phase of
The native AIX tools do interoperate with GCC@.
Building @file{libstdc++.a} requires a fix for an AIX Assembler bug
-APAR IY26685 (AIX 4.3) or APAR IY25528 (AIX 5.1).
+APAR IY26685 (AIX 4.3) or APAR IY25528 (AIX 5.1). It also requires a
+fix for another AIX Assembler bug and a co-dependent AIX Archiver fix
+referenced as APAR IY53606 (AIX 5.2) or a APAR TBD (AIX 5.1)
-@samp{libstdc++} in GCC 3.2 increments the major version number of the
+@samp{libstdc++} in GCC 3.4 increments the major version number of the
shared object and GCC installation places the @file{libstdc++.a}
-shared library in a common location which will overwrite the GCC 3.1
-version of the shared library. Applications either need to be
-re-linked against the new shared library or the GCC 3.1 version of the
-@samp{libstdc++} shared object needs to be available to the AIX
-runtime loader. The GCC 3.1 @samp{libstdc++.so.4} shared object can
-be installed for runtime dynamic loading using the following steps to
-set the @samp{F_LOADONLY} flag in the shared object for @emph{each}
+shared library in a common location which will overwrite the and GCC
+3.3 version of the shared library. Applications either need to be
+re-linked against the new shared library or the GCC 3.1 and GCC 3.3
+versions of the @samp{libstdc++} shared object needs to be available
+to the AIX runtime loader. The GCC 3.1 @samp{libstdc++.so.4}, if
+present, and GCC 3.3 @samp{libstdc++.so.5} shared objects can be
+installed for runtime dynamic loading using the following steps to set
+the @samp{F_LOADONLY} flag in the shared object for @emph{each}
multilib @file{libstdc++.a} installed:
-Extract the shared object from each the GCC 3.1 @file{libstdc++.a}
-archive:
-@example
- % ar -x libstdc++.a libstdc++.so.4
-@end example
+Extract the shared objects from the currently installed
+@file{libstdc++.a} archive:
+@smallexample
+ % ar -x libstdc++.a libstdc++.so.4 libstdc++.so.5
+@end smallexample
Enable the @samp{F_LOADONLY} flag so that the shared object will be
available for runtime dynamic loading, but not linking:
-@example
- % strip -e libstdc++.so.4
-@end example
+@smallexample
+ % strip -e libstdc++.so.4 libstdc++.so.5
+@end smallexample
-Archive the runtime-only shared object in the GCC 3.2
+Archive the runtime-only shared object in the GCC 3.4
@file{libstdc++.a} archive:
-@example
- % ar -q libstdc++.a libstdc++.so.4
-@end example
+@smallexample
+ % ar -q libstdc++.a libstdc++.so.4 libstdc++.so.5
+@end smallexample
Linking executables and shared libraries may produce warnings of
duplicate symbols. The assembly files generated by GCC for AIX always
Use @samp{configure --target=ip2k-elf --enable-languages=c} to configure GCC@.
+@html
+<hr />
+@end html
+@heading @anchor{iq2000-*-elf}iq2000-*-elf
+Vitesse IQ2000 processors. These are used in embedded
+applications. There are no standard Unix configurations.
+
@html
<hr />
@end html
This patch is also known as PHCO_4484.
-In addition, if you wish to use gas, you must use
-gas version 2.1 or later, and you must use the GNU linker version 2.1 or
-later. Earlier versions of gas relied upon a program which converted the
-gas output into the native HP-UX format, but that program has not been
-kept up to date. gdb does not understand that native HP-UX format, so
+In addition gdb does not understand that native HP-UX format, so
you must use gas if you wish to use gdb.
On HP-UX version 8.05, but not on 8.07 or more recent versions, the
GNU shell) to run @command{fixproto}. This bug will cause the fixproto
program to report an error of the form:
-@example
+@smallexample
./fixproto: sh internal 1K buffer overflow
-@end example
+@end smallexample
To fix this, you can also change the first line of the fixproto script
to look like:
-@example
+@smallexample
#!/bin/ksh
-@end example
+@end smallexample
@html
<hr />
@samp{mips*-*-linux*} target continues to use the MIPS II routines. More
work on this is expected in future releases.
+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
+anything but a Mips. It does work to cross compile for a Mips
+if you use the GNU assembler and linker.
+
@html
<hr />
@end html
@heading @anchor{mips-sgi-irix5}mips-sgi-irix5
-This configuration has considerable problems, which will be fixed in a
-future release.
-
-In order to compile GCC on an SGI running IRIX 5, the ``compiler_dev.hdr''
-subsystem must be installed from the IDO CD-ROM supplied by Silicon
-Graphics. It is also available for download from
-@uref{http://www.sgi.com/developers/devtools/apis/ido.html,,http://www.sgi.com/developers/devtools/apis/ido.html}.
-
-@samp{make compare} may fail on version 5 of IRIX unless you add
-@option{-save-temps} to @code{CFLAGS}. On these systems, the name of the
-assembler input file is stored in the object file, and that makes
-comparison fail if it differs between the @code{stage1} and
-@code{stage2} compilations. The option @option{-save-temps} forces a
-fixed name to be used for the assembler input file, instead of a
-randomly chosen name in @file{/tmp}. Do not add @option{-save-temps}
-unless the comparisons fail without that option. If you do you
-@option{-save-temps}, you will have to manually delete the @samp{.i} and
-@samp{.s} files after each series of compilations.
+In order to compile GCC on an SGI running IRIX 5, the @samp{compiler_dev.hdr}
+subsystem must be installed from the IDO CD-ROM supplied by SGI@.
+It is also available for download from
+@uref{http://www.sgi.com/developers/devtools/apis/ido.html}.
If you use the MIPS C compiler to bootstrap, it may be necessary
to increase its table size for switch statements with the
@option{-Wf,-XNg1500} option. If you use the @option{-O2}
optimization option, you also need to use @option{-Olimit 3000}.
-To enable debugging under IRIX 5, you must use GNU @command{as} 2.11.2
-or later,
-and use the @option{--with-gnu-as} configure option when configuring GCC.
-GNU @command{as} is distributed as part of the binutils package.
-When using release 2.11.2, you need to apply a patch
-@uref{http://sources.redhat.com/ml/binutils/2001-07/msg00352.html,,http://sources.redhat.com/ml/binutils/2001-07/msg00352.html}
-which will be included in the next release of binutils.
-
-When building GCC, the build process loops rebuilding @command{cc1} over
-and over again. This happens on @samp{mips-sgi-irix5.2}, and possibly
-other platforms. It has been reported that this is a known bug in the
-@command{make} shipped with IRIX 5.2. We recommend you use GNU
-@command{make} instead of the vendor supplied @command{make} program;
-however, you may have success with @command{smake} on IRIX 5.2 if you do
-not have GNU @command{make} available.
+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.
@html
<hr />
@end html
@heading @anchor{mips-sgi-irix6}mips-sgi-irix6
-If you are using IRIX @command{cc} as your bootstrap compiler, you must
+If you are using SGI's MIPSpro @command{cc} as your bootstrap compiler, you must
ensure that the N32 ABI is in use. To test this, compile a simple C
file with @command{cc} and then run @command{file} on the
resulting object file. The output should look like:
-@example
+@smallexample
test.o: ELF N32 MSB @dots{}
-@end example
+@end smallexample
If you see:
-@example
+@smallexample
test.o: ELF 32-bit MSB @dots{}
-@end example
+@end smallexample
or
-@example
+@smallexample
test.o: ELF 64-bit MSB @dots{}
-@end example
+@end smallexample
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@.
+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.
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 mips3
+with the MIPS R4400 CPU, you need to ensure that only code for the @samp{mips3}
instruction set architecture (ISA) is generated. While GCC 3.x does
this correctly, both GCC 2.95 and SGI's MIPSpro @command{cc} may change
the ISA depending on the machine where GCC is built. Using one of them
-as the bootstrap compiler may result in mips4 code, which won't run at
-all on mips3-only systems. For the test program above, you should see:
+as the bootstrap compiler may result in @samp{mips4} code, which won't run at
+all on @samp{mips3}-only systems. For the test program above, you should see:
-@example
+@smallexample
test.o: ELF N32 MSB mips-3 @dots{}
-@end example
+@end smallexample
If you get:
-@example
+@smallexample
test.o: ELF N32 MSB mips-4 @dots{}
-@end example
+@end smallexample
instead, you should set the environment variable @env{CC} to @samp{cc
-n32 -mips3} or @samp{gcc -mips3} respectively before configuring GCC@.
-GCC on IRIX 6 is usually built to support both the N32 and N64 ABIs. If
-you build GCC on a system that doesn't have the N64 libraries installed,
+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,
you need to configure with @option{--disable-multilib} so GCC doesn't
-try to use them. Look for @file{/usr/lib64/libc.so.1} to see if you
+try to use them. This will disable building the O32 libraries, too.
+Look for @file{/usr/lib64/libc.so.1} to see if you
have the 64-bit libraries installed.
-You must @emph{not} use GNU @command{as} (which isn't built anyway as of
-binutils 2.11.2) on IRIX 6 platforms; doing so will only cause problems.
-
-GCC does not currently support generating O32 ABI binaries in the
-@samp{mips-sgi-irix6} configurations. It is possible to create a GCC
-with O32 ABI only support by configuring it for the @samp{mips-sgi-irix5}
-target and using a patched GNU @command{as} 2.11.2 as documented in the
-@uref{#mips-sgi-irix5,,@samp{mips-sgi-irix5}} section above. Using the
-native assembler requires patches to GCC which will be included in a
-future release. It is
-expected that O32 ABI support will be available again in a future release.
+To enable debugging for the O32 ABI, you must use GNU @command{as} from
+GNU binutils 2.15 or later. You may also use GNU @command{ld}, but
+this is not required and currently causes some problems with Ada.
The @option{--enable-threads} option doesn't currently work, a patch is
in preparation for a future release. The @option{--enable-libgcj}
option is disabled by default: IRIX 6 uses a very low default limit
-(20480) for the command line length. Although libtool contains a
+(20480) for the command line length. Although @command{libtool} contains a
workaround for this problem, at least the N64 @samp{libgcj} is known not
to build despite this, running into an internal error of the native
@command{ld}. A sure fix is to increase this limit (@samp{ncargs}) to
its maximum of 262144 bytes. If you have root access, you can use the
@command{systune} command to do this.
-GCC does not correctly pass/return structures which are
-smaller than 16 bytes and which are not 8 bytes. The problem is very
-involved and difficult to fix. It affects a number of other targets also,
-but IRIX 6 is affected the most, because it is a 64-bit target, and 4 byte
-structures are common. The exact problem is that structures are being padded
-at the wrong end, e.g.@: a 4 byte structure is loaded into the lower 4 bytes
-of the register when it should be loaded into the upper 4 bytes of the
-register.
-
-GCC is consistent with itself, but not consistent with the SGI C compiler
-(and the SGI supplied runtime libraries), so the only failures that can
-happen are when there are library functions that take/return such
-structures. There are very few such library functions. Currently this
-is known to affect @code{inet_ntoa}, @code{inet_lnaof},
-@code{inet_netof}, @code{inet_makeaddr}, and @code{semctl}. Until the
-bug is fixed, GCC contains workarounds for the known affected functions.
-
-See @uref{http://freeware.sgi.com/,,http://freeware.sgi.com/} for more
+See @uref{http://freeware.sgi.com/} for more
information about using GCC on IRIX platforms.
@html
@html
<hr />
@end html
-@heading @anchor{powerpcle-*-winnt}powerpcle-*-winnt, powerpcle-*-pe
-PowerPC system in little endian mode running Windows NT@.
+@heading @anchor{s390-*-linux*}s390-*-linux*
+S/390 system running GNU/Linux for S/390@.
@html
<hr />
@end html
-@heading @anchor{s390-*-linux*}s390-*-linux*
-S/390 system running Linux for S/390@.
+@heading @anchor{s390x-*-linux*}s390x-*-linux*
+zSeries system (64-bit) running GNU/Linux for zSeries@.
@html
<hr />
@end html
-@heading @anchor{s390x-*-linux*}s390x-*-linux*
-zSeries system (64-bit) running Linux for zSeries@.
+@heading @anchor{s390x-ibm-tpf*}s390x-ibm-tpf*
+zSeries system (64-bit) running TPF. This platform is
+supported as cross-compilation target only.
@html
<hr />
The Solaris 2 @command{/bin/sh} will often fail to configure
@file{libstdc++-v3}, @file{boehm-gc} or @file{libjava}. We therefore
-recommend to set @env{CONFIG_SHELL} to @command{/bin/ksh} in your
-environment.
+recommend to use the following sequence of commands to bootstrap and
+install GCC:
+
+@smallexample
+ % CONFIG_SHELL=/bin/ksh
+ % 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.
Solaris 2 comes with a number of optional OS packages. Some of these
are needed to use GCC fully, namely @code{SUNWarc},
For example, the linker may hang indefinitely. The fix is to remove
@file{/usr/ucb} from your @env{PATH}.
+The build process works more smoothly with the legacy Sun tools so, if you
+have @file{/usr/xpg4/bin} in your @env{PATH}, we recommend that you place
+@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}).
@option{--disable-multilib}, since we will not be able to build the
64-bit target libraries.
+GCC 3.4 triggers a code generation bug in versions 5.4 (Sun ONE Studio 7)
+and 5.5 (Sun ONE Studio 8) of the Sun compiler, which causes a bootstrap
+failure in form of a miscompilation of the stage1 compiler by the Sun
+compiler. This is Sun bug 4974440. This is fixed with patch 112760-07.
+
@html
<hr />
@end html
@item
Copy the original, unpatched Solaris 7
@command{/usr/ccs/bin/as} into
-@command{/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.1/as},
+@command{/usr/local/libexec/gcc/sparc-sun-solaris2.7/3.4/as},
adjusting the latter name to fit your local conventions and software
version numbers.
The following compiler flags must be specified in the configure
step in order to bootstrap this target with the Sun compiler:
-@example
+@smallexample
% CC="cc -xildoff -xarch=v9" @var{srcdir}/configure [@var{options}] [@var{target}]
-@end example
+@end smallexample
@option{-xildoff} turns off the incremental linker, and @option{-xarch=v9}
specifies the SPARC-V9 architecture to the Sun linker and assembler.
On System V, if you get an error like this,
-@example
+@smallexample
/usr/local/lib/bison.simple: In function `yyparse':
/usr/local/lib/bison.simple:625: virtual memory exhausted
-@end example
+@end smallexample
@noindent
that too indicates a problem with disk space, ulimit, or @code{MAXUMEM}.
GCC's exception handling runtime requires a special ``configlette''
module, @file{contrib/gthr_supp_vxw_5x.c}. Follow the instructions in
that file to add the module to your kernel build. (Future versions of
-VxWorks will incorporate this module.)
+VxWorks will incorporate this module.)
+
+@html
+<hr />
+@end html
+@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.
+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).
@html
<hr />
through inline assembly.
The Xtensa configuration information must be specified prior to
-building GCC@. The @file{gcc/config/xtensa/xtensa-config.h} header
+building GCC@. The @file{include/xtensa-config.h} header
file contains the configuration information. If you created your
own Xtensa configuration with the Xtensa Processor Generator, the
downloaded files include a customized copy of this header file,