@end ifset
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-@c 1999, 2000, 2001, 2002, 2003 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
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
+@command{zsh} is not a fully compliant POSIX shell and will not
work when configuring GCC.
@item GNU binutils
@heading Tools/packages necessary for modifying GCC
@table @asis
-@item autoconf versions 2.13 and 2.57
+@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. Most
directories require autoconf 2.13 (exactly), but @file{libiberty},
-@file{fastjar}, and @file{libstdc++-v3} require autoconf 2.57 (exactly).
+@file{fastjar}, @file{libstdc++-v3}, @file{libjava/libltdl}, @file{boehm-gc},
+@file{intl}, @file{libada}, @file{libffi} and @file{gcc} require autoconf
+2.59 (exactly).
-@item automake versions 1.4-p? and 1.7.?
+@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}. Most directories require a 1.4 series
-automake; @file{libstdc++-v3} and @file{fastjar} requires a 1.7 series
-automake.
+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)
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)
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
@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
@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.
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.
+makeinfo.
@item --enable-version-specific-runtime-libs
Specify
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
without optimization.
@item --enable-gather-detailed-mem-stats
-When this option is specfied more detailed information on memory
+When this option is specified more detailed information on memory
allocation is gathered. This information is printed when using
-@option{-fmem-report}.
+@option{-fmem-report}.
@item --enable-nls
@itemx --disable-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}
@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
installed, the build will fail unless @option{--enable-languages} is
used to disable building the Ada front end.
-At the moment, the GNAT library and several tools for GNAT are not built
-by @samp{make bootstrap}. For a native build, you have to invoke
-@samp{make gnatlib_and_tools} in the @file{@var{objdir}/gcc}
-subdirectory before proceeding with the next steps.
-For a cross build, you need to invoke
-@samp{make gnatlib cross-gnattools ada.all.cross}. For a canadian
-cross you only need to invoke @samp{make cross-gnattools}; the GNAT
-library would be the same as the one built for the cross compiler.
-
-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{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
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},
@samp{RUNTESTFLAGS}, or directly to @command{runtest} if you prefer to
work outside the makefiles. For example,
-@example
+@smallexample
make check-g++ RUNTESTFLAGS="--target_board=unix/-O3/-fno-strength-reduce"
-@end example
+@end smallexample
will run the standard @command{g++} testsuites (``unix'' is the target name
for a standard native testsuite situation), passing
You can run the testsuites multiple times using combinations of options
with a syntax similar to the brace expansion of popular shells:
-@example
+@smallexample
@dots{}"--target_board=arm-sim@{-mhard-float,-msoft-float@}@{-O1,-O2,-O3,@}"
-@end example
+@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:
-@example
+@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/-msoft-float/-O2
--target_board=arm-sim/-msoft-float/-O3
--target_board=arm-sim/-msoft-float
-@end example
+@end smallexample
They can be combined as many times as you wish, in arbitrary ways. This
list:
-@example
+@smallexample
@dots{}"--target_board=unix/-Wextra@{-O3,-fno-strength-reduce@}@{-fomit-frame-pointer,@}"
-@end example
+@end smallexample
will generate four combinations, all involving @samp{-Wextra}.
do the parallel runs. Instead of using @samp{--target_board}, use a
special makefile target:
-@example
+@smallexample
make -j@var{N} check-@var{testsuite}//@var{test-target}/@var{option1}/@var{option2}/@dots{}
-@end example
+@end smallexample
For example,
-@example
+@smallexample
make -j3 check-gcc//sh-hms-sim/@{-m1,-m2,-m3,-m3e,-m4@}/@{,-nofpu@}
-@end example
+@end smallexample
will run three concurrent ``make-gcc'' testsuites, eventually testing all
ten combinations as described above. Note that this is currently only
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.
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
@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{#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{#*-*-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
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
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.
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
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
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.}
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
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 />
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}
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:
-@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@.
<hr />
@end html
@heading @anchor{s390-*-linux*}s390-*-linux*
-S/390 system running Linux for S/390@.
+S/390 system running GNU/Linux for S/390@.
@html
<hr />
@end html
@heading @anchor{s390x-*-linux*}s390x-*-linux*
-zSeries system (64-bit) running Linux for zSeries@.
+zSeries system (64-bit) running GNU/Linux for zSeries@.
@html
<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
@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
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 />