]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/doc/install.texi
s390.c (s390_decompose_address): Do not treat virtual registers as pointers.
[thirdparty/gcc.git] / gcc / doc / install.texi
CommitLineData
f42974dc
DW
1\input texinfo.tex @c -*-texinfo-*-
2@c @ifnothtml
3@c %**start of header
d7f8491b 4@setfilename gccinstall.info
f42974dc
DW
5@settitle Installing GCC
6@setchapternewpage odd
7@c %**end of header
8@c @end ifnothtml
9
10@c Specify title for specific html page
11@ifset indexhtml
12@settitle Installing GCC
13@end ifset
14@ifset specifichtml
15@settitle Host/Target specific installation notes for GCC
16@end ifset
67b1fbb9
KG
17@ifset prerequisiteshtml
18@settitle Prerequisites for GCC
19@end ifset
f42974dc
DW
20@ifset downloadhtml
21@settitle Downloading GCC
22@end ifset
23@ifset configurehtml
24@settitle Installing GCC: Configuration
25@end ifset
26@ifset buildhtml
27@settitle Installing GCC: Building
28@end ifset
29@ifset testhtml
30@settitle Installing GCC: Testing
31@end ifset
32@ifset finalinstallhtml
33@settitle Installing GCC: Final installation
34@end ifset
35@ifset binarieshtml
36@settitle Installing GCC: Binaries
37@end ifset
73e2155a
JM
38@ifset oldhtml
39@settitle Installing GCC: Old documentation
40@end ifset
aed5964b
JM
41@ifset gfdlhtml
42@settitle Installing GCC: GNU Free Documentation License
43@end ifset
f42974dc 44
aed5964b 45@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
daef8bbd 46@c 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
f42974dc
DW
47@c *** Converted to texinfo by Dean Wakerley, dean@wakerley.com
48
49@c Include everything if we're not making html
50@ifnothtml
51@set indexhtml
52@set specifichtml
67b1fbb9 53@set prerequisiteshtml
f42974dc
DW
54@set downloadhtml
55@set configurehtml
56@set buildhtml
57@set testhtml
58@set finalinstallhtml
59@set binarieshtml
73e2155a 60@set oldhtml
aed5964b 61@set gfdlhtml
f42974dc
DW
62@end ifnothtml
63
64@c Part 2 Summary Description and Copyright
bdefb2ab 65@copying
aed5964b 66Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
daef8bbd 671999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
aed5964b
JM
68@sp 1
69Permission is granted to copy, distribute and/or modify this document
b3a8389d 70under the terms of the GNU Free Documentation License, Version 1.2 or
aed5964b
JM
71any later version published by the Free Software Foundation; with no
72Invariant Sections, the Front-Cover texts being (a) (see below), and
73with the Back-Cover Texts being (b) (see below). A copy of the
74license is included in the section entitled ``@uref{./gfdl.html,,GNU
75Free Documentation License}''.
76
77(a) The FSF's Front-Cover Text is:
78
79 A GNU Manual
80
81(b) The FSF's Back-Cover Text is:
82
83 You have freedom to copy and modify this GNU Manual, like GNU
84 software. Copies published by the Free Software Foundation raise
85 funds for GNU development.
bdefb2ab 86@end copying
f42974dc 87@ifinfo
bdefb2ab 88@insertcopying
f42974dc
DW
89@end ifinfo
90
91@c Part 3 Titlepage and Copyright
92@titlepage
93@sp 10
94@comment The title is printed in a large font.
ef88b07d 95@center @titlefont{Installing GCC}
f42974dc
DW
96
97@c The following two commands start the copyright page.
98@page
ef88b07d 99@vskip 0pt plus 1filll
bdefb2ab 100@insertcopying
f42974dc
DW
101@end titlepage
102
103@c Part 4 Top node and Master Menu
104@ifinfo
105@node Top, , , (dir)
106@comment node-name, next, Previous, up
107
108@menu
109* Installing GCC:: This document describes the generic installation
110 procedure for GCC as well as detailing some target
f9047ed3 111 specific installation instructions.
f42974dc
DW
112
113* Specific:: Host/target specific installation notes for GCC.
114* Binaries:: Where to get pre-compiled binaries.
115
73e2155a
JM
116* Old:: Old installation documentation.
117
aed5964b 118* GNU Free Documentation License:: How you can copy and share this manual.
f42974dc
DW
119* Concept Index:: This index has two entries.
120@end menu
121@end ifinfo
122
123@c Part 5 The Body of the Document
124@c ***Installing GCC**********************************************************
6cfb3f16 125@ifnothtml
f42974dc
DW
126@comment node-name, next, previous, up
127@node Installing GCC, Binaries, , Top
6cfb3f16 128@end ifnothtml
f42974dc 129@ifset indexhtml
f42974dc
DW
130@ifnothtml
131@chapter Installing GCC
132@end ifnothtml
133
134The latest version of this document is always available at
f9047ed3 135@uref{http://gcc.gnu.org/install/,,http://gcc.gnu.org/install/}.
f42974dc
DW
136
137This document describes the generic installation procedure for GCC as well
f9047ed3 138as detailing some target specific installation instructions.
f42974dc 139
f9047ed3
JM
140GCC includes several components that previously were separate distributions
141with their own installation instructions. This document supersedes all
eea81d3e 142package specific installation instructions.
f42974dc 143
f9047ed3 144@emph{Before} starting the build/install procedure please check the
f42974dc 145@ifnothtml
eea81d3e 146@ref{Specific, host/target specific installation notes}.
f42974dc 147@end ifnothtml
c009f01f 148@ifhtml
f9047ed3 149@uref{specific.html,,host/target specific installation notes}.
c009f01f 150@end ifhtml
f9047ed3 151We recommend you browse the entire generic installation instructions before
f42974dc
DW
152you proceed.
153
c009f01f 154Lists of successful builds for released versions of GCC are
daf2f129 155available at @uref{http://gcc.gnu.org/buildstat.html}.
c009f01f
JJ
156These lists are updated as new information becomes available.
157
f9047ed3 158The installation procedure itself is broken into five steps.
f42974dc
DW
159
160@ifinfo
161@menu
67b1fbb9 162* Prerequisites::
f42974dc
DW
163* Downloading the source::
164* Configuration::
165* Building::
166* Testing:: (optional)
167* Final install::
168@end menu
169@end ifinfo
c009f01f 170@ifhtml
f42974dc 171@enumerate
f9047ed3 172@item
67b1fbb9
KG
173@uref{prerequisites.html,,Prerequisites}
174@item
f42974dc 175@uref{download.html,,Downloading the source}
f42974dc 176@item
f9047ed3
JM
177@uref{configure.html,,Configuration}
178@item
179@uref{build.html,,Building}
180@item
181@uref{test.html,,Testing} (optional)
f42974dc
DW
182@item
183@uref{finalinstall.html,,Final install}
184@end enumerate
c009f01f 185@end ifhtml
f42974dc 186
38209993 187Please note that GCC does not support @samp{make uninstall} and probably
f9047ed3 188won't do so in the near future as this would open a can of worms. Instead,
f42974dc 189we suggest that you install GCC into a directory of its own and simply
38209993 190remove that directory when you do not need that specific version of GCC
eea81d3e
RO
191any longer, and, if shared libraries are installed there as well, no
192more binaries exist that use them.
f42974dc 193
73e2155a
JM
194@ifhtml
195There are also some @uref{old.html,,old installation instructions},
196which are mostly obsolete but still contain some information which has
197not yet been merged into the main part of this manual.
198@end ifhtml
199
f42974dc 200@html
b8db17af 201<hr />
f42974dc
DW
202<p>
203@end html
204@ifhtml
205@uref{./index.html,,Return to the GCC Installation page}
aed5964b 206
bdefb2ab 207@insertcopying
f42974dc
DW
208@end ifhtml
209@end ifset
210
67b1fbb9
KG
211@c ***Prerequisites**************************************************
212@ifnothtml
213@comment node-name, next, previous, up
214@node Prerequisites, Downloading the source, , Installing GCC
215@end ifnothtml
216@ifset prerequisiteshtml
217@ifnothtml
218@chapter Prerequisites
219@end ifnothtml
220@cindex Prerequisites
221
222GCC requires that various tools and packages be available for use in the
223build procedure. Modifying GCC sources requires additional tools
224described below.
225
226@heading Tools/packages necessary for building GCC
227@table @asis
228@item ISO C90 compiler
229Necessary to bootstrap the GCC package, although versions of GCC prior
230to 3.4 also allow bootstrapping with a traditional (K&R) C compiler.
231
232To make all languages in a cross-compiler or other configuration where
2333-stage bootstrap is not performed, you need to start with an existing
234GCC binary (version 2.95 or later) because source code for language
235frontends other than C might use GCC extensions.
236
237@item GNAT
238
239In order to build the Ada compiler (GNAT) you must already have GNAT
240installed because portions of the Ada frontend are written in Ada (with
241GNAT extensions.) Refer to the Ada installation instructions for more
242specific information.
243
244@item A ``working'' POSIX compatible shell, or GNU bash
245
246Necessary when running @command{configure} because some
247@command{/bin/sh} shells have bugs and may crash when configuring the
248target libraries. In other cases, @command{/bin/sh} or even some
249@command{ksh} have disastrous corner-case performance problems. This
250can cause target @command{configure} runs to literally take days to
251complete in some cases.
252
253So on some platforms @command{/bin/ksh} is sufficient, on others it
254isn't. See the host/target specific instructions for your platform, or
255use @command{bash} to be sure. Then set @env{CONFIG_SHELL} in your
256environment to your ``good'' shell prior to running
257@command{configure}/@command{make}.
258
daf2f129 259@command{zsh} is not a fully compliant POSIX shell and will not
a755e3c5 260work when configuring GCC.
1b49d06f 261
67b1fbb9
KG
262@item GNU binutils
263
264Necessary in some circumstances, optional in others. See the
265host/target specific instructions for your platform for the exact
266requirements.
267
268@item gzip version 1.2.4 (or later) or
269@itemx bzip2 version 1.0.2 (or later)
270
271Necessary to uncompress GCC @command{tar} files when source code is
272obtained via FTP mirror sites.
273
e158a5fb
MM
274@item GNU make version 3.79.1 (or later)
275
276You must have GNU make installed to build GCC.
277
67b1fbb9
KG
278@item GNU tar version 1.12 (or later)
279
280Necessary (only on some platforms) to untar the source code. Many
281systems' @command{tar} programs will also work, only try GNU
282@command{tar} if you have problems.
283
284@end table
285
286
287@heading Tools/packages necessary for modifying GCC
288@table @asis
289
4f3ce03f 290@item autoconf versions 2.13 and 2.57
67b1fbb9
KG
291@itemx GNU m4 version 1.4 (or later)
292
293Necessary when modifying @file{configure.in}, @file{aclocal.m4}, etc.@:
4f3ce03f 294to regenerate @file{configure} and @file{config.in} files. Most
53d60c04 295directories require autoconf 2.13 (exactly), but @file{libiberty},
d44f1a00
NN
296@file{fastjar}, @file{libstdc++-v3}, and @file{gcc} require
297autoconf 2.57 (exactly).
67b1fbb9 298
4f3ce03f 299@item automake versions 1.4-p? and 1.7.?
67b1fbb9
KG
300
301Necessary when modifying a @file{Makefile.am} file to regenerate its
4f3ce03f 302associated @file{Makefile.in}. Most directories require a 1.4 series
53d60c04
KC
303automake; @file{libstdc++-v3} and @file{fastjar} requires a 1.7 series
304automake.
4f3ce03f
JM
305
306@item gettext version 0.12 (or later)
307
308Needed to regenerate @file{gcc.pot}.
67b1fbb9
KG
309
310@item gperf version 2.7.2 (or later)
311
312Necessary when modifying @command{gperf} input files, e.g.@:
313@file{gcc/cp/cfns.gperf} to regenerate its associated header file, e.g.@:
314@file{gcc/cp/cfns.h}.
315
316@item expect version ???
317@itemx tcl version ???
318@itemx dejagnu version ???
319
320Necessary to run the GCC testsuite.
321
322@item autogen version 5.5.4 (or later) and
323@itemx guile version 1.4.1 (or later)
324
325Necessary to regenerate @file{fixinc/fixincl.x} from
326@file{fixinc/inclhack.def} and @file{fixinc/*.tpl}.
327
328Necessary to run the @file{fixinc} @command{make check}.
329
330Necessary to regenerate the top level @file{Makefile.am} files from
331@file{Makefile.tpl} and @file{Makefile.def}.
332
333@item GNU Bison version 1.28 (or later)
334Berkeley @command{yacc} (@command{byacc}) is also reported to work other
335than for java.
336
337Necessary when modifying @file{*.y} files.
338
339Necessary to build GCC during development because the generated output
340files are not included in the CVS repository. They are included in
341releases.
342
343@item Flex version 2.5.4 (or later)
344
345Necessary when modifying @file{*.l} files.
346
347Necessary to build GCC during development because the generated output
348files are not included in the CVS repository. They are included in
349releases.
350
351@item Texinfo version 4.2 (or later)
352
353Necessary for running @command{makeinfo} when modifying @file{*.texi}
354files to test your changes.
355
356Necessary to build GCC documentation during development because the
357generated output files are not included in the CVS repository. They are
358included in releases.
359
360@item @TeX{} (any working version)
361
362Necessary for running @command{texi2dvi}, used when running
363@command{make dvi} to create DVI files.
364
365@item cvs version 1.10 (or later)
366@itemx ssh (any version)
367
368Necessary to access the CVS repository. Public releases and weekly
369snapshots of the development sources are also available via FTP.
370
371@item perl version 5.6.1 (or later)
372
373Necessary when regenerating @file{Makefile} dependencies in libiberty.
4f3ce03f
JM
374Necessary when regenerating @file{libiberty/functions.texi}.
375Necessary when generating manpages from Texinfo manuals.
376Used by various scripts to generate some files included in CVS (mainly
377Unicode-related and rarely changing) from source tables.
67b1fbb9
KG
378
379@item GNU diffutils version 2.7 (or later)
380
381Necessary when creating changes to GCC source code to submit for review.
382
383@item patch version 2.5.4 (or later)
384
385Necessary when applying patches, created with @command{diff}, to one's
386own sources.
387
388@end table
389
390@html
391<hr />
392<p>
393@end html
394@ifhtml
395@uref{./index.html,,Return to the GCC Installation page}
396@end ifhtml
397@end ifset
398
f42974dc 399@c ***Downloading the source**************************************************
6cfb3f16 400@ifnothtml
f42974dc 401@comment node-name, next, previous, up
67b1fbb9 402@node Downloading the source, Configuration, Prerequisites, Installing GCC
6cfb3f16 403@end ifnothtml
f42974dc 404@ifset downloadhtml
f42974dc
DW
405@ifnothtml
406@chapter Downloading GCC
407@end ifnothtml
408@cindex Downloading GCC
409@cindex Downloading the Source
410
eea81d3e
RO
411GCC is distributed via @uref{http://gcc.gnu.org/cvs.html,,CVS} and FTP
412tarballs compressed with @command{gzip} or
6cfb3f16 413@command{bzip2}. It is possible to download a full distribution or specific
f42974dc
DW
414components.
415
416Please refer to our @uref{http://gcc.gnu.org/releases.html,,releases web page}
161d7b59 417for information on how to obtain GCC@.
f42974dc
DW
418
419The full distribution includes the C, C++, Objective-C, Fortran, Java,
8ecab453
GP
420and Ada (in case of GCC 3.1 and later) compilers. The full distribution
421also includes runtime libraries for C++, Objective-C, Fortran, and Java.
422In GCC 3.0 and later versions, GNU compiler testsuites are also included
423in the full distribution.
f42974dc
DW
424
425If you choose to download specific components, you must download the core
eea81d3e 426GCC distribution plus any language specific distributions you wish to
6c0a4eab 427use. The core distribution includes the C language front end as well as the
767094dd 428shared components. Each language has a tarball which includes the language
6c0a4eab 429front end as well as the language runtime (when appropriate).
f42974dc
DW
430
431Unpack the core distribution as well as any language specific
432distributions in the same directory.
433
434If you also intend to build binutils (either to upgrade an existing
435installation or for use in place of the corresponding tools of your
436OS), unpack the binutils distribution either in the same directory or
437a separate one. In the latter case, add symbolic links to any
438components of the binutils you intend to build alongside the compiler
6cfb3f16
JM
439(@file{bfd}, @file{binutils}, @file{gas}, @file{gprof}, @file{ld},
440@file{opcodes}, @dots{}) to the directory containing the GCC sources.
f42974dc
DW
441
442@html
b8db17af 443<hr />
f42974dc
DW
444<p>
445@end html
446@ifhtml
447@uref{./index.html,,Return to the GCC Installation page}
448@end ifhtml
449@end ifset
450
451@c ***Configuration***********************************************************
6cfb3f16 452@ifnothtml
f42974dc
DW
453@comment node-name, next, previous, up
454@node Configuration, Building, Downloading the source, Installing GCC
6cfb3f16 455@end ifnothtml
f42974dc 456@ifset configurehtml
f42974dc
DW
457@ifnothtml
458@chapter Installing GCC: Configuration
459@end ifnothtml
460@cindex Configuration
461@cindex Installing GCC: Configuration
462
463Like most GNU software, GCC must be configured before it can be built.
464This document describes the recommended configuration procedure
465for both native and cross targets.
466
38209993
LG
467We use @var{srcdir} to refer to the toplevel source directory for
468GCC; we use @var{objdir} to refer to the toplevel build/object directory.
469
470If you obtained the sources via CVS, @var{srcdir} must refer to the top
471@file{gcc} directory, the one where the @file{MAINTAINERS} can be found,
472and not its @file{gcc} subdirectory, otherwise the build will fail.
f42974dc 473
b4b0fb02
RO
474If either @var{srcdir} or @var{objdir} is located on an automounted NFS
475file system, the shell's built-in @command{pwd} command will return
476temporary pathnames. Using these can lead to various sorts of build
477problems. To avoid this issue, set the @env{PWDCMD} environment
478variable to an automounter-aware @command{pwd} command, e.g.,
7ba4ca63 479@command{pawd} or @samp{amq -w}, during the configuration and build
b4b0fb02
RO
480phases.
481
102b60d1
GP
482First, we @strong{highly} recommend that GCC be built into a
483separate directory than the sources which does @strong{not} reside
484within the source tree. This is how we generally build GCC; building
485where @var{srcdir} == @var{objdir} should still work, but doesn't
486get extensive testing; building where @var{objdir} is a subdirectory
487of @var{srcdir} is unsupported.
f42974dc 488
eea81d3e 489If you have previously built GCC in the same directory for a
f85b8d1a 490different target machine, do @samp{make distclean} to delete all files
377dfc82
GP
491that might be invalid. One of the files this deletes is @file{Makefile};
492if @samp{make distclean} complains that @file{Makefile} does not exist
493or issues a message like ``don't know how to make distclean'' it probably
494means that the directory is already suitably clean. However, with the
495recommended method of building in a separate @var{objdir}, you should
496simply use a different @var{objdir} for each target.
f85b8d1a 497
38209993
LG
498Second, when configuring a native system, either @command{cc} or
499@command{gcc} must be in your path or you must set @env{CC} in
df002c7d
DE
500your environment before running configure. Otherwise the configuration
501scripts may fail.
f42974dc 502
eea81d3e
RO
503Note that the bootstrap compiler and the resulting GCC must be link
504compatible, else the bootstrap will fail with linker errors about
505incompatible object file formats. Several multilibed targets are
e69aa433
GP
506affected by this requirement, see
507@ifnothtml
508@ref{Specific, host/target specific installation notes}.
509@end ifnothtml
c009f01f 510@ifhtml
e69aa433 511@uref{specific.html,,host/target specific installation notes}.
c009f01f 512@end ifhtml
eea81d3e 513
f42974dc
DW
514To configure GCC:
515
3ab51846 516@smallexample
38209993
LG
517 % mkdir @var{objdir}
518 % cd @var{objdir}
eea81d3e 519 % @var{srcdir}/configure [@var{options}] [@var{target}]
3ab51846 520@end smallexample
f42974dc
DW
521
522
ef88b07d 523@heading Target specification
f42974dc
DW
524@itemize @bullet
525@item
38209993 526GCC has code to correctly determine the correct value for @var{target}
f9047ed3 527for nearly all native systems. Therefore, we highly recommend you not
f42974dc
DW
528provide a configure target when configuring a native compiler.
529
530@item
6cfb3f16 531@var{target} must be specified as @option{--target=@var{target}}
f9047ed3 532when configuring a cross compiler; examples of valid targets would be
f42974dc
DW
533i960-rtems, m68k-coff, sh-elf, etc.
534
535@item
6cfb3f16 536Specifying just @var{target} instead of @option{--target=@var{target}}
38209993 537implies that the host defaults to @var{target}.
f42974dc
DW
538@end itemize
539
540
ef88b07d 541@heading Options specification
f42974dc 542
ef88b07d 543Use @var{options} to override several configure time options for
7ba4ca63 544GCC@. A list of supported @var{options} follows; @samp{configure
80f9249a
JM
545--help} may list other options, but those not listed below may not
546work and should not normally be used.
f42974dc 547
ef88b07d
JM
548@table @code
549@item --prefix=@var{dirname}
550Specify the toplevel installation
f42974dc
DW
551directory. This is the recommended way to install the tools into a directory
552other than the default. The toplevel installation directory defaults to
6cfb3f16 553@file{/usr/local}.
f42974dc 554
38209993 555We @strong{highly} recommend against @var{dirname} being the same or a
a7582c8c
BE
556subdirectory of @var{objdir} or vice versa. If specifying a directory
557beneath a user's home directory tree, some shells will not expand
558@var{dirname} correctly if it contains the @samp{~} metacharacter; use
559@env{$HOME} instead.
f42974dc 560
8e5f33ff
GK
561The following standard @command{autoconf} options are supported. Normally you
562should not need to use these options.
ef88b07d 563@table @code
ab130aa5
JM
564@item --exec-prefix=@var{dirname}
565Specify the toplevel installation directory for architecture-dependent
566files. The default is @file{@var{prefix}}.
567
568@item --bindir=@var{dirname}
569Specify the installation directory for the executables called by users
570(such as @command{gcc} and @command{g++}). The default is
571@file{@var{exec-prefix}/bin}.
572
573@item --libdir=@var{dirname}
574Specify the installation directory for object code libraries and
8e5f33ff
GK
575internal data files of GCC@. The default is @file{@var{exec-prefix}/lib}.
576
577@item --libexecdir=@var{dirname}
578Specify the installation directory for internal executables of GCC@.
579 The default is @file{@var{exec-prefix}/libexec}.
ab130aa5
JM
580
581@item --with-slibdir=@var{dirname}
582Specify the installation directory for the shared libgcc library. The
583default is @file{@var{libdir}}.
584
585@item --infodir=@var{dirname}
586Specify the installation directory for documentation in info format.
587The default is @file{@var{prefix}/info}.
588
8567c70f
TT
589@item --datadir=@var{dirname}
590Specify the installation directory for some architecture-independent
591data files referenced by GCC@. The default is @file{@var{prefix}/share}.
592
ab130aa5
JM
593@item --mandir=@var{dirname}
594Specify the installation directory for manual pages. The default is
595@file{@var{prefix}/man}. (Note that the manual pages are only extracts from
8e9a4a45 596the full GCC manuals, which are provided in Texinfo format. The manpages
ab130aa5
JM
597are derived by an automatic conversion process from parts of the full
598manual.)
599
ef88b07d
JM
600@item --with-gxx-include-dir=@var{dirname}
601Specify
eea81d3e 602the installation directory for G++ header files. The default is
ecb7d6b3
JM
603@file{@var{prefix}/include/g++-v3}.
604
ef88b07d 605@end table
f42974dc 606
b21d216c
AF
607@item --program-prefix=@var{prefix}
608GCC supports some transformations of the names of its programs when
609installing them. This option prepends @var{prefix} to the names of
610programs to install in @var{bindir} (see above). For example, specifying
611@option{--program-prefix=foo-} would result in @samp{gcc}
612being installed as @file{/usr/local/bin/foo-gcc}.
613
614@item --program-suffix=@var{suffix}
615Appends @var{suffix} to the names of programs to install in @var{bindir}
616(see above). For example, specifying @option{--program-suffix=-3.1}
617would result in @samp{gcc} being installed as
618@file{/usr/local/bin/gcc-3.1}.
619
620@item --program-transform-name=@var{pattern}
621Applies the @samp{sed} script @var{pattern} to be applied to the names
622of programs to install in @var{bindir} (see above). @var{pattern} has to
623consist of one or more basic @samp{sed} editing commands, separated by
624semicolons. For example, if you want the @samp{gcc} program name to be
625transformed to the installed program @file{/usr/local/bin/myowngcc} and
626the @samp{g++} program name to be transformed to
627@file{/usr/local/bin/gspecial++} without changing other program names,
628you could use the pattern
629@option{--program-transform-name='s/^gcc$/myowngcc/; s/^g++$/gspecial++/'}
630to achieve this effect.
631
632All three options can be combined and used together, resulting in more
633complex conversion patterns. As a basic rule, @var{prefix} (and
634@var{suffix}) are prepended (appended) before further transformations
635can happen with a special transformation script @var{pattern}.
636
8c085f6f 637As currently implemented, this option only takes effect for native
b21d216c 638builds; cross compiler binaries' names are not transformed even when a
8c085f6f 639transformation is explicitly asked for by one of these options.
b21d216c
AF
640
641For native builds, some of the installed programs are also installed
642with the target alias in front of their name, as in
643@samp{i686-pc-linux-gnu-gcc}. All of the above transformations happen
644before the target alias is prepended to the name - so, specifying
645@option{--program-prefix=foo-} and @option{program-suffix=-3.1}, the
646resulting binary would be installed as
647@file{/usr/local/bin/i686-pc-linux-gnu-foo-gcc-3.1}.
648
8ecab453 649As a last shortcoming, none of the installed Ada programs are
b21d216c
AF
650transformed yet, which will be fixed in some time.
651
ef88b07d
JM
652@item --with-local-prefix=@var{dirname}
653Specify the
6ac48571
JM
654installation directory for local include files. The default is
655@file{/usr/local}. Specify this option if you want the compiler to
656search directory @file{@var{dirname}/include} for locally installed
657header files @emph{instead} of @file{/usr/local/include}.
658
659You should specify @option{--with-local-prefix} @strong{only} if your
660site has a different convention (not @file{/usr/local}) for where to put
661site-specific files.
662
663The default value for @option{--with-local-prefix} is @file{/usr/local}
664regardless of the value of @option{--prefix}. Specifying
665@option{--prefix} has no effect on which directory GCC searches for
666local header files. This may seem counterintuitive, but actually it is
667logical.
668
669The purpose of @option{--prefix} is to specify where to @emph{install
670GCC}. The local header files in @file{/usr/local/include}---if you put
161d7b59 671any in that directory---are not part of GCC@. They are part of other
6ac48571
JM
672programs---perhaps many others. (GCC installs its own header files in
673another directory which is based on the @option{--prefix} value.)
674
48209ce5
JDA
675Both the local-prefix include directory and the GCC-prefix include
676directory are part of GCC's "system include" directories. Although these
677two directories are not fixed, they need to be searched in the proper
678order for the correct processing of the include_next directive. The
679local-prefix include directory is searched before the GCC-prefix
680include directory. Another characteristic of system include directories
681is that pedantic warnings are turned off for headers in these directories.
682
683Some autoconf macros add @option{-I @var{directory}} options to the
684compiler command line, to ensure that directories containing installed
685packages' headers are searched. When @var{directory} is one of GCC's
686system include directories, GCC will ignore the option so that system
687directories continue to be processed in the correct order. This
688may result in a search order different from what was specified but the
689directory will still be searched.
690
691GCC automatically searches for ordinary libraries using
692@env{GCC_EXEC_PREFIX}. Thus, when the same installation prefix is
693used for both GCC and packages, GCC will automatically search for
694both headers and libraries. This provides a configuration that is
695easy to use. GCC behaves in a manner similar to that when it is
696installed as a system compiler in @file{/usr}.
697
698Sites that need to install multiple versions of GCC may not want to
699use the above simple configuration. It is possible to use the
700@option{--program-prefix}, @option{--program-suffix} and
701@option{--program-transform-name} options to install multiple versions
702into a single directory, but it may be simpler to use different prefixes
703and the @option{--with-local-prefix} option to specify the location of the
704site-specific files for each version. It will then be necessary for
705users to specify explicitly the location of local site libraries
706(e.g., with @env{LIBRARY_PATH}).
707
708The same value can be used for both @option{--with-local-prefix} and
709@option{--prefix} provided it is not @file{/usr}. This can be used
710to avoid the default search of @file{/usr/local/include}.
711
6ac48571
JM
712@strong{Do not} specify @file{/usr} as the @option{--with-local-prefix}!
713The directory you use for @option{--with-local-prefix} @strong{must not}
714contain any of the system's standard header files. If it did contain
715them, certain programs would be miscompiled (including GNU Emacs, on
716certain targets), because this would override and nullify the header
4c64396e 717file corrections made by the @command{fixincludes} script.
6ac48571
JM
718
719Indications are that people who use this option use it based on mistaken
720ideas of what it is for. People use it as if it specified where to
161d7b59 721install part of GCC@. Perhaps they make this assumption because
6ac48571
JM
722installing GCC creates the directory.
723
6cfb3f16 724@item --enable-shared[=@var{package}[,@dots{}]]
0cb98517
AO
725Build shared versions of libraries, if shared libraries are supported on
726the target platform. Unlike GCC 2.95.x and earlier, shared libraries
eea81d3e
RO
727are enabled by default on all platforms that support shared libraries,
728except for @samp{libobjc} which is built as a static library only by
729default.
0cb98517
AO
730
731If a list of packages is given as an argument, build shared libraries
732only for the listed packages. For other packages, only static libraries
733will be built. Package names currently recognized in the GCC tree are
734@samp{libgcc} (also known as @samp{gcc}), @samp{libstdc++} (not
735@samp{libstdc++-v3}), @samp{libffi}, @samp{zlib}, @samp{boehm-gc} and
736@samp{libjava}. Note that @samp{libobjc} does not recognize itself by
737any name, so, if you list package names in @option{--enable-shared},
eea81d3e 738you will only get static Objective-C libraries. @samp{libf2c} and
0cb98517
AO
739@samp{libiberty} do not support shared libraries at all.
740
741Use @option{--disable-shared} to build only static libraries. Note that
742@option{--disable-shared} does not accept a list of package names as
743argument, only @option{--enable-shared} does.
f42974dc 744
ef88b07d
JM
745@item @anchor{with-gnu-as}--with-gnu-as
746Specify that the compiler should assume that the
767094dd 747assembler it finds is the GNU assembler. However, this does not modify
377dfc82
GP
748the rules to find an assembler and will result in confusion if the
749assembler found is not actually the GNU assembler. (Confusion may also
8c26c999
JM
750result if the compiler finds the GNU assembler but has not been
751configured with @option{--with-gnu-as}.) If you have more than one
38209993 752assembler installed on your system, you may want to use this option in
eea81d3e 753connection with @option{--with-as=@var{pathname}}.
38209993 754
8c085f6f
JJ
755The following systems are the only ones where it makes a difference
756whether you use the GNU assembler. On any other system,
757@option{--with-gnu-as} has no effect.
758
2ff16718 759@itemize @bullet
8c085f6f
JJ
760@item @samp{hppa1.0-@var{any}-@var{any}}
761@item @samp{hppa1.1-@var{any}-@var{any}}
762@item @samp{i386-@var{any}-sysv}
8c085f6f
JJ
763@item @samp{m68k-bull-sysv}
764@item @samp{m68k-hp-hpux}
8c085f6f
JJ
765@item @samp{m68000-hp-hpux}
766@item @samp{m68000-att-sysv}
767@item @samp{@var{any}-lynx-lynxos}
768@item @samp{mips-@var{any}}
8f2afc21
EB
769@item @samp{sparc-sun-solaris2.@var{any}}
770@item @samp{sparc64-@var{any}-solaris2.@var{any}}
8c085f6f 771@end itemize
8c26c999 772
8f2afc21
EB
773On the systems listed above (except for the HP-PA, the SPARC, for ISC on
774the 386, and for @samp{mips-sgi-irix5.*}), if you use the GNU assembler,
8c26c999
JM
775you should also use the GNU linker (and specify @option{--with-gnu-ld}).
776
8f2afc21 777@item @anchor{with-as}--with-as=@var{pathname}
ef88b07d 778Specify that the
38209993
LG
779compiler should use the assembler pointed to by @var{pathname}, rather
780than the one found by the standard rules to find an assembler, which
781are:
f42974dc
DW
782@itemize @bullet
783@item
8e5f33ff
GK
784Check the @file{@var{libexec}/gcc/@var{target}/@var{version}}
785directory, where @var{libexec} defaults to
786@file{@var{exec-prefix}/libexec} and @var{exec-prefix} defaults to
787@var{prefix} which defaults to @file{/usr/local} unless overridden by
788the @option{--prefix=@var{pathname}} switch described
789above. @var{target} is the target system triple, such as
790@samp{sparc-sun-solaris2.7}, and @var{version} denotes the GCC
791version, such as 3.0.
f42974dc 792@item
e979f9e8 793Check operating system specific directories (e.g.@: @file{/usr/ccs/bin} on
250d5688 794Sun Solaris 2).
f42974dc 795@end itemize
767094dd 796Note that these rules do not check for the value of @env{PATH}. You may
38209993
LG
797want to use @option{--with-as} if no assembler is installed in the
798directories listed above, or if you have multiple assemblers installed
799and want to choose one that is not found by the above rules.
f42974dc 800
ef88b07d
JM
801@item @anchor{with-gnu-ld}--with-gnu-ld
802Same as @uref{#with-gnu-as,,@option{--with-gnu-as}}
8f2afc21 803but for the linker.
f42974dc 804
eea81d3e 805@item --with-ld=@var{pathname}
8f2afc21
EB
806Same as @uref{#with-as,,@option{--with-as}}
807but for the linker.
f42974dc 808
ef88b07d
JM
809@item --with-stabs
810Specify that stabs debugging
38209993
LG
811information should be used instead of whatever format the host normally
812uses. Normally GCC uses the same debug format as the host system.
f42974dc 813
8c26c999
JM
814On MIPS based systems and on Alphas, you must specify whether you want
815GCC to create the normal ECOFF debugging format, or to use BSD-style
816stabs passed through the ECOFF symbol table. The normal ECOFF debug
161d7b59
JM
817format cannot fully handle languages other than C@. BSD stabs format can
818handle other languages, but it only works with the GNU debugger GDB@.
8c26c999
JM
819
820Normally, GCC uses the ECOFF debugging format by default; if you
161d7b59 821prefer BSD stabs, specify @option{--with-stabs} when you configure GCC@.
8c26c999
JM
822
823No matter which default you choose when you configure GCC, the user
824can use the @option{-gcoff} and @option{-gstabs+} options to specify explicitly
825the debug format for a particular compilation.
826
827@option{--with-stabs} is meaningful on the ISC system on the 386, also, if
828@option{--with-gas} is used. It selects use of stabs debugging
829information embedded in COFF output. This kind of debugging information
830supports C++ well; ordinary COFF debugging information does not.
831
832@option{--with-stabs} is also meaningful on 386 systems running SVR4. It
833selects use of stabs debugging information embedded in ELF output. The
834C++ compiler currently (2.6.0) does not support the DWARF debugging
835information normally used on 386 SVR4 platforms; stabs provide a
836workable alternative. This requires gas and gdb, as the normal SVR4
837tools can not generate or interpret stabs.
838
eea81d3e 839@item --disable-multilib
ef88b07d 840Specify that multiple target
eea81d3e
RO
841libraries to support different target variants, calling
842conventions, etc should not be built. The default is to build a
843predefined set of them.
f42974dc 844
e8515283
DE
845Some targets provide finer-grained control over which multilibs are built
846(e.g., @option{--disable-softfloat}):
847@table @code
e8515283
DE
848@item arc-*-elf*
849biendian.
850
851@item arm-*-*
852fpu, 26bit, underscore, interwork, biendian, nofmult.
853
854@item m68*-*-*
855softfloat, m68881, m68000, m68020.
856
857@item mips*-*-*
858single-float, biendian, softfloat.
859
860@item powerpc*-*-*, rs6000*-*-*
861aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian,
f282ffb3 862sysv, aix.
e8515283
DE
863
864@end table
865
ef88b07d
JM
866@item --enable-threads
867Specify that the target
38209993
LG
868supports threads. This affects the Objective-C compiler and runtime
869library, and exception handling for other languages like C++ and Java.
6ac48571 870On some systems, this is the default.
f42974dc 871
f6160ed5
LR
872In general, the best (and, in many cases, the only known) threading
873model available will be configured for use. Beware that on some
874systems, gcc has not been taught what threading models are generally
3c6bb1db
LR
875available for the system. In this case, @option{--enable-threads} is an
876alias for @option{--enable-threads=single}.
f6160ed5
LR
877
878@item --disable-threads
879Specify that threading support should be disabled for the system.
3c6bb1db 880This is an alias for @option{--enable-threads=single}.
f6160ed5 881
ef88b07d
JM
882@item --enable-threads=@var{lib}
883Specify that
38209993
LG
884@var{lib} is the thread support library. This affects the Objective-C
885compiler and runtime library, and exception handling for other languages
f85b8d1a
JM
886like C++ and Java. The possibilities for @var{lib} are:
887
888@table @code
889@item aix
890AIX thread support.
891@item dce
892DCE thread support.
4c80872c
RK
893@item gnat
894Ada tasking support. For non-Ada programs, this setting is equivalent
895to @samp{single}. When used in conjunction with the Ada run time, it
896causes GCC to use the same thread primitives as Ada uses. This option
897is necessary when using both Ada and the back end exception handling,
898which is the default for most Ada targets.
f85b8d1a 899@item mach
eea81d3e 900Generic MACH thread support, known to work on NeXTSTEP@. (Please note
3c6bb1db 901that the file needed to support this configuration, @file{gthr-mach.h}, is
f6160ed5
LR
902missing and thus this setting will cause a known bootstrap failure.)
903@item no
904This is an alias for @samp{single}.
f85b8d1a 905@item posix
c771326b 906Generic POSIX thread support.
f6160ed5
LR
907@item rtems
908RTEMS thread support.
f85b8d1a
JM
909@item single
910Disable thread support, should work for all platforms.
911@item solaris
eea81d3e 912Sun Solaris 2 thread support.
f85b8d1a
JM
913@item vxworks
914VxWorks thread support.
915@item win32
916Microsoft Win32 API thread support.
917@end table
f42974dc 918
ef88b07d 919@item --with-cpu=@var{cpu}
7816bea0
DJ
920Specify which cpu variant the compiler should generate code for by default.
921@var{cpu} will be used as the default value of the @option{-mcpu=} switch.
922This option is only supported on some targets, including ARM, i386, PowerPC,
923and SPARC@.
924
925@item --with-schedule=@var{cpu}
926@itemx --with-arch=@var{cpu}
927@itemx --with-tune=@var{cpu}
928@itemx --with-abi=@var{abi}
929@itemx --with-float=@var{type}
930These configure options provide default values for the @option{-mschedule=},
931@option{-march=}, @option{-mtune=}, and @option{-mabi=} options and for
932@option{-mhard-float} or @option{-msoft-float}. As with @option{--with-cpu},
933which switches will be accepted and acceptable values of the arguments depend
934on the target.
f42974dc 935
a004eb82
AH
936@item --enable-altivec
937Specify that the target supports AltiVec vector enhancements. This
938option will adjust the ABI for AltiVec enhancements, as well as generate
939AltiVec code when appropriate. This option is only available for
940PowerPC systems.
941
354b7da5
DH
942@item --enable-__cxa_atexit
943Define if you want to use __cxa_atexit, rather than atexit, to
944register C++ destructors for local statics and global objects.
945This is essential for fully standards-compliant handling of
946destructors, but requires __cxa_atexit in libc. This option is currently
947only available on sytems with GNU libc. When enabled, this will cause
948@option{-fuse-cxa-exit} to be passed by default.
949
ef88b07d
JM
950@item --enable-target-optspace
951Specify that target
38209993
LG
952libraries should be optimized for code space instead of code speed.
953This is the default for the m32r platform.
f42974dc 954
ab130aa5
JM
955@item --disable-cpp
956Specify that a user visible @command{cpp} program should not be installed.
957
958@item --with-cpp-install-dir=@var{dirname}
959Specify that the user visible @command{cpp} program should be installed
960in @file{@var{prefix}/@var{dirname}/cpp}, in addition to @var{bindir}.
f42974dc 961
07cf4226
DM
962@item --enable-initfini-array
963Force the use of sections @code{.init_array} and @code{.fini_array}
964(instead of @code{.init} and @code{.fini}) for constructors and
965destructors. Option @option{--disable-initfini-array} has the
966opposite effect. If neither option is specified, the configure script
967will try to guess whether the @code{.init_array} and
968@code{.fini_array} sections are supported and, if they are, use them.
969
ef88b07d
JM
970@item --enable-maintainer-mode
971The build rules that
6cfb3f16 972regenerate the GCC master message catalog @file{gcc.pot} are normally
767094dd
JM
973disabled. This is because it can only be rebuilt if the complete source
974tree is present. If you have changed the sources and want to rebuild the
6ac48571 975catalog, configuring with @option{--enable-maintainer-mode} will enable
767094dd 976this. Note that you need a recent version of the @code{gettext} tools
6ac48571
JM
977to do so.
978
51b9ff45
KC
979@item --enable-generated-files-in-srcdir
980Neither the .c and .h files that are generated from bison and flex nor the
981info manuals and man pages that are built from the .texi files are present
982in the CVS development tree. When building GCC from that development tree,
983or from a snapshot which are created from CVS, then those generated files
984are placed in your build directory, which allows for the source to be in a
985readonly directory.
986
987If you configure with @option{--enable-generated-files-in-srcdir} then those
988generated files will go into the source directory. This is mainly intended
989for generating release or prerelease tarballs of the GCC sources, since it
990is not a requirement that the users of source releases to have flex, bison, or
daf2f129 991makeinfo.
51b9ff45 992
ef88b07d
JM
993@item --enable-version-specific-runtime-libs
994Specify
38209993 995that runtime libraries should be installed in the compiler specific
8e5f33ff
GK
996subdirectory (@file{@var{libdir}/gcc}) rather than the usual places. In
997addition, @samp{libstdc++}'s include files will be installed into
998@file{@var{libdir}} unless you overruled it by using
6cfb3f16 999@option{--with-gxx-include-dir=@var{dirname}}. Using this option is
38209993 1000particularly useful if you intend to use several versions of GCC in
eea81d3e
RO
1001parallel. This is currently supported by @samp{libf2c} and
1002@samp{libstdc++}, and is the default for @samp{libobjc} which cannot be
1003changed in this case.
38209993 1004
ef88b07d
JM
1005@item --enable-languages=@var{lang1},@var{lang2},@dots{}
1006Specify that only a particular subset of compilers and
767094dd 1007their runtime libraries should be built. For a list of valid values for
6cfb3f16 1008@var{langN} you can issue the following command in the
eea81d3e 1009@file{gcc} directory of your GCC source tree:@*
3ab51846 1010@smallexample
eea81d3e 1011grep language= */config-lang.in
3ab51846 1012@end smallexample
eea81d3e 1013Currently, you can use any of the following:
e23381df 1014@code{ada}, @code{c}, @code{c++}, @code{f77}, @code{java}, @code{objc}.
8ecab453 1015Building the Ada compiler has special requirements, see below.@*
38209993 1016If you do not pass this flag, all languages available in the @file{gcc}
6cfb3f16 1017sub-tree will be configured. Re-defining @code{LANGUAGES} when calling
ef88b07d 1018@samp{make bootstrap} @strong{does not} work anymore, as those
38209993 1019language sub-directories might not have been configured!
f42974dc 1020
ef88b07d
JM
1021@item --disable-libgcj
1022Specify that the run-time libraries
f42974dc
DW
1023used by GCJ should not be built. This is useful in case you intend
1024to use GCJ with some other run-time, or you're going to install it
1025separately, or it just happens not to build on your particular
6c0a4eab 1026machine. In general, if the Java front end is enabled, the GCJ
f42974dc 1027libraries will be enabled too, unless they're known to not work on
eea81d3e 1028the target platform. If GCJ is enabled but @samp{libgcj} isn't built, you
f42974dc 1029may need to port it; in this case, before modifying the top-level
eea81d3e 1030@file{configure.in} so that @samp{libgcj} is enabled by default on this platform,
f42974dc
DW
1031you may use @option{--enable-libgcj} to override the default.
1032
ef88b07d
JM
1033@item --with-dwarf2
1034Specify that the compiler should
eea81d3e 1035use DWARF 2 debugging information as the default.
f85b8d1a
JM
1036
1037@item --enable-win32-registry
eea81d3e 1038@itemx --enable-win32-registry=@var{key}
f85b8d1a 1039@itemx --disable-win32-registry
95fef11f 1040The @option{--enable-win32-registry} option enables Microsoft Windows-hosted GCC
f85b8d1a
JM
1041to look up installations paths in the registry using the following key:
1042
1043@smallexample
eea81d3e 1044@code{HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\@var{key}}
f85b8d1a
JM
1045@end smallexample
1046
eea81d3e
RO
1047@var{key} defaults to GCC version number, and can be overridden by the
1048@option{--enable-win32-registry=@var{key}} option. Vendors and distributors
f85b8d1a
JM
1049who use custom installers are encouraged to provide a different key,
1050perhaps one comprised of vendor name and GCC version number, to
767094dd 1051avoid conflict with existing installations. This feature is enabled
6cfb3f16 1052by default, and can be disabled by @option{--disable-win32-registry}
f85b8d1a
JM
1053option. This option has no effect on the other hosts.
1054
1055@item --nfp
1056Specify that the machine does not have a floating point unit. This
c9693e96
LH
1057option only applies to @samp{m68k-sun-sunos@var{n}}. On any other
1058system, @option{--nfp} has no effect.
f85b8d1a 1059
dd859b8a
KG
1060@item --enable-werror
1061@itemx --disable-werror
1062@itemx --enable-werror=yes
1063@itemx --enable-werror=no
1064When you specify this option, it controls whether certain files in the
1065compiler are built with @option{-Werror} in bootstrap stage2 and later.
1066If you don't specify it, @option{-Werror} is turned on for the main
1067development trunk. However it defaults to off for release branches and
1068final releases. The specific files which get @option{-Werror} are
1069controlled by the Makefiles.
1070
f85b8d1a
JM
1071@item --enable-checking
1072@itemx --enable-checking=@var{list}
1073When you specify this option, the compiler is built to perform checking
1074of tree node types when referencing fields of that node, and some other
1075internal consistency checks. This does not change the generated code,
1076but adds error checking within the compiler. This will slow down the
1077compiler and may only work properly if you are building the compiler
161d7b59 1078with GCC@. This is on by default when building from CVS or snapshots,
f85b8d1a
JM
1079but off for releases. More control over the checks may be had by
1080specifying @var{list}; the categories of checks available are
c2f82a84 1081@samp{misc}, @samp{tree}, @samp{gc}, @samp{rtl}, @samp{rtlflag},
5dfa45d0
JJ
1082@samp{fold}, @samp{gcac} and @samp{valgrind}. The check @samp{valgrind}
1083requires the external @command{valgrind} simulator, available from
e0c99e15 1084@uref{http://valgrind.kde.org/}. The default when @var{list} is
c2f82a84
HPN
1085not specified is @samp{misc,tree,gc,rtlflag}; the checks @samp{rtl},
1086@samp{gcac} and @samp{valgrind} are very expensive.
f85b8d1a 1087
22aa533e 1088@item --enable-coverage
31775d31 1089@itemx --enable-coverage=@var{level}
22aa533e
NS
1090With this option, the compiler is built to collect self coverage
1091information, every time it is run. This is for internal development
1092purposes, and only works when the compiler is being built with gcc. The
1093@var{level} argument controls whether the compiler is built optimized or
1094not, values are @samp{opt} and @samp{noopt}. For coverage analysis you
1095want to disable optimization, for performance analysis you want to
1096enable optimization. When coverage is enabled, the default level is
1097without optimization.
1098
439a7e54 1099@item --enable-gather-detailed-mem-stats
95ea367d 1100When this option is specified more detailed information on memory
439a7e54 1101allocation is gathered. This information is printed when using
daf2f129 1102@option{-fmem-report}.
439a7e54 1103
f85b8d1a
JM
1104@item --enable-nls
1105@itemx --disable-nls
6cfb3f16 1106The @option{--enable-nls} option enables Native Language Support (NLS),
f85b8d1a 1107which lets GCC output diagnostics in languages other than American
767094dd 1108English. Native Language Support is enabled by default if not doing a
161d7b59 1109canadian cross build. The @option{--disable-nls} option disables NLS@.
f85b8d1a
JM
1110
1111@item --with-included-gettext
c771326b 1112If NLS is enabled, the @option{--with-included-gettext} option causes the build
021c4bfd 1113procedure to prefer its copy of GNU @command{gettext}.
f85b8d1a
JM
1114
1115@item --with-catgets
1116If NLS is enabled, and if the host lacks @code{gettext} but has the
1117inferior @code{catgets} interface, the GCC build procedure normally
1118ignores @code{catgets} and instead uses GCC's copy of the GNU
6cfb3f16 1119@code{gettext} library. The @option{--with-catgets} option causes the
f85b8d1a 1120build procedure to use the host's @code{catgets} in this situation.
80f9249a 1121
5304400d
CR
1122@item --with-libiconv-prefix=@var{dir}
1123Search for libiconv header files in @file{@var{dir}/include} and
1124libiconv library files in @file{@var{dir}/lib}.
1125
80f9249a
JM
1126@item --with-system-zlib
1127Use installed zlib rather than that included with GCC@. This option
1128only applies if the Java front end is being built.
9340544b
ZW
1129
1130@item --enable-obsolete
1131Enable configuration for an obsoleted system. If you attempt to
1132configure GCC for a system (build, host, or target) which has been
1133obsoleted, and you do not specify this flag, configure will halt with an
1134error message.
1135
1136All support for systems which have been obsoleted in one release of GCC
1137is removed entirely in the next major release, unless someone steps
1138forward to maintain the port.
ef88b07d 1139@end table
f42974dc
DW
1140
1141Some options which only apply to building cross compilers:
ef88b07d 1142@table @code
4977bab6
ZW
1143@item --with-sysroot
1144@itemx --with-sysroot=@var{dir}
1145Tells GCC to consider @var{dir} as the root of a tree that contains a
1146(subset of) the root filesystem of the target operating system.
1147Target system headers, libraries and run-time object files will be
1148searched in there. The specified directory is not copied into the
1149install tree, unlike the options @option{--with-headers} and
1150@option{--with-libs} that this option obsoletes. The default value,
1151in case @option{--with-sysroot} is not given an argument, is
047d636f
DJ
1152@option{$@{gcc_tooldir@}/sys-root}. If the specified directory is a
1153subdirectory of @option{$@{exec_prefix@}}, then it will be found relative to
1154the GCC binaries if the installation tree is moved.
4977bab6 1155
65a824f6
JT
1156@item --with-headers
1157@itemx --with-headers=@var{dir}
4977bab6 1158Deprecated in favor of @option{--with-sysroot}.
65a824f6
JT
1159Specifies that target headers are available when building a cross compiler.
1160The @var{dir} argument specifies a directory which has the target include
1161files. These include files will be copied into the @file{gcc} install
1162directory. @emph{This option with the @var{dir} argument is required} when
1163building a cross compiler, if @file{@var{prefix}/@var{target}/sys-include}
1164doesn't pre-exist. If @file{@var{prefix}/@var{target}/sys-include} does
1165pre-exist, the @var{dir} argument may be omitted. @command{fixincludes}
1166will be run on these files to make them compatible with GCC.
264d65c1
AP
1167
1168@item --without-headers
1169Tells GCC not use any target headers from a libc when building a cross
1170compiler. When crossing to GNU/Linux, you need the headers so gcc
1171can build the exception handling for libgcc.
1172See @uref{http://www.objsw.com/CrossGCC/,,CrossGCC} for more information
1173on this option.
1174
65a824f6
JT
1175@item --with-libs
1176@itemx --with-libs=``@var{dir1} @var{dir2} @dots{} @var{dirN}''
4977bab6 1177Deprecated in favor of @option{--with-sysroot}.
38209993
LG
1178Specifies a list of directories which contain the target runtime
1179libraries. These libraries will be copied into the @file{gcc} install
65a824f6
JT
1180directory. If the directory list is omitted, this option has no
1181effect.
ef88b07d 1182@item --with-newlib
eea81d3e 1183Specifies that @samp{newlib} is
38209993 1184being used as the target C library. This causes @code{__eprintf} to be
eea81d3e
RO
1185omitted from @file{libgcc.a} on the assumption that it will be provided by
1186@samp{newlib}.
ef88b07d 1187@end table
f9047ed3 1188
38209993
LG
1189Note that each @option{--enable} option has a corresponding
1190@option{--disable} option and that each @option{--with} option has a
1191corresponding @option{--without} option.
f42974dc
DW
1192
1193@html
b8db17af 1194<hr />
f42974dc
DW
1195<p>
1196@end html
1197@ifhtml
1198@uref{./index.html,,Return to the GCC Installation page}
1199@end ifhtml
1200@end ifset
1201
1202@c ***Building****************************************************************
6cfb3f16 1203@ifnothtml
f42974dc
DW
1204@comment node-name, next, previous, up
1205@node Building, Testing, Configuration, Installing GCC
6cfb3f16 1206@end ifnothtml
f42974dc 1207@ifset buildhtml
f42974dc
DW
1208@ifnothtml
1209@chapter Building
1210@end ifnothtml
1211@cindex Installing GCC: Building
1212
1213Now that GCC is configured, you are ready to build the compiler and
1214runtime libraries.
1215
daf2f129 1216We @strong{highly} recommend that GCC be built using GNU make;
f282ffb3 1217other versions may work, then again they might not.
58db9d1a
AH
1218GNU make is required for compiling GNAT (the Ada compiler) and the Java
1219runtime library.
f42974dc
DW
1220
1221(For example, many broken versions of make will fail if you use the
b8df899a
JM
1222recommended setup where @var{objdir} is different from @var{srcdir}.
1223Other broken versions may recompile parts of the compiler when
1224installing the compiler.)
f42974dc 1225
b8df899a 1226Some commands executed when making the compiler may fail (return a
7ba4ca63 1227nonzero status) and be ignored by @command{make}. These failures, which
b8df899a
JM
1228are often due to files that were not found, are expected, and can safely
1229be ignored.
1230
1231It is normal to have compiler warnings when compiling certain files.
1232Unless you are a GCC developer, you can generally ignore these warnings
dd859b8a
KG
1233unless they cause compilation to fail. Developers should attempt to fix
1234any warnings encountered, however they can temporarily continue past
1235warnings-as-errors by specifying the configure flag
1236@option{--disable-werror}.
b8df899a
JM
1237
1238On certain old systems, defining certain environment variables such as
6cfb3f16 1239@env{CC} can interfere with the functioning of @command{make}.
b8df899a
JM
1240
1241If you encounter seemingly strange errors when trying to build the
1242compiler in a directory other than the source directory, it could be
1243because you have previously configured the compiler in the source
1244directory. Make sure you have done all the necessary preparations.
1245
1246If you build GCC on a BSD system using a directory stored in an old System
4c64396e 1247V file system, problems may occur in running @command{fixincludes} if the
b8df899a
JM
1248System V file system doesn't support symbolic links. These problems
1249result in a failure to fix the declaration of @code{size_t} in
1250@file{sys/types.h}. If you find that @code{size_t} is a signed type and
1251that type mismatches occur, this could be the cause.
1252
161d7b59 1253The solution is not to use such a directory for building GCC@.
f42974dc 1254
f85b8d1a
JM
1255When building from CVS or snapshots, or if you modify parser sources,
1256you need the Bison parser generator installed. Any version 1.25 or
1257later should work; older versions may also work. If you do not modify
1258parser sources, releases contain the Bison-generated files and you do
1259not need Bison installed to build them.
1260
1261When building from CVS or snapshots, or if you modify Texinfo
a38f87a9 1262documentation, you need version 4.2 or later of Texinfo installed if you
f85b8d1a
JM
1263want Info documentation to be regenerated. Releases contain Info
1264documentation pre-built for the unmodified documentation in the release.
1265
f42974dc
DW
1266@section Building a native compiler
1267
f9047ed3 1268For a native build issue the command @samp{make bootstrap}. This
f42974dc
DW
1269will build the entire GCC system, which includes the following steps:
1270
1271@itemize @bullet
1272@item
1273Build host tools necessary to build the compiler such as texinfo, bison,
1274gperf.
1275
1276@item
1277Build target tools for use by the compiler such as binutils (bfd,
eea81d3e 1278binutils, gas, gprof, ld, and opcodes)
f282ffb3 1279if they have been individually linked
f42974dc
DW
1280or moved into the top level GCC source tree before configuring.
1281
1282@item
1283Perform a 3-stage bootstrap of the compiler.
1284
1285@item
1286Perform a comparison test of the stage2 and stage3 compilers.
1287
1288@item
1289Build runtime libraries using the stage3 compiler from the previous step.
f9047ed3 1290
f42974dc
DW
1291@end itemize
1292
38209993
LG
1293If you are short on disk space you might consider @samp{make
1294bootstrap-lean} instead. This is identical to @samp{make
1295bootstrap} except that object files from the stage1 and
f42974dc
DW
1296stage2 of the 3-stage bootstrap of the compiler are deleted as
1297soon as they are no longer needed.
1298
f42974dc
DW
1299If you want to save additional space during the bootstrap and in
1300the final installation as well, you can build the compiler binaries
8c085f6f 1301without debugging information as in the following example. This will save
f42974dc
DW
1302roughly 40% of disk space both for the bootstrap and the final installation.
1303(Libraries will still contain debugging information.)
1304
3ab51846 1305@smallexample
8c085f6f
JJ
1306 make CFLAGS='-O' LIBCFLAGS='-g -O2' \
1307 LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
3ab51846 1308@end smallexample
8c085f6f 1309
eea81d3e
RO
1310If you wish to use non-default GCC flags when compiling the stage2 and
1311stage3 compilers, set @code{BOOT_CFLAGS} on the command line when doing
f85b8d1a
JM
1312@samp{make bootstrap}. Non-default optimization flags are less well
1313tested here than the default of @samp{-g -O2}, but should still work.
1314In a few cases, you may find that you need to specify special flags such
1315as @option{-msoft-float} here to complete the bootstrap; or, if the
1316native compiler miscompiles the stage1 compiler, you may need to work
1317around this, by choosing @code{BOOT_CFLAGS} to avoid the parts of the
1318stage1 compiler that were miscompiled, or by using @samp{make
1319bootstrap4} to increase the number of stages of bootstrap.
1320
6cfb3f16 1321If you used the flag @option{--enable-languages=@dots{}} to restrict
f42974dc 1322the compilers to be built, only those you've actually enabled will be
767094dd 1323built. This will of course only build those runtime libraries, for
f42974dc 1324which the particular compiler has been built. Please note,
eea81d3e 1325that re-defining @env{LANGUAGES} when calling @samp{make bootstrap}
ef88b07d 1326@strong{does not} work anymore!
f42974dc 1327
f85b8d1a 1328If the comparison of stage2 and stage3 fails, this normally indicates
eea81d3e 1329that the stage2 compiler has compiled GCC incorrectly, and is therefore
f85b8d1a
JM
1330a potentially serious bug which you should investigate and report. (On
1331a few systems, meaningful comparison of object files is impossible; they
1332always appear ``different''. If you encounter this problem, you will
1333need to disable comparison in the @file{Makefile}.)
f42974dc
DW
1334
1335@section Building a cross compiler
1336
1337We recommend reading the
1338@uref{http://www.objsw.com/CrossGCC/,,crossgcc FAQ}
1339for information about building cross compilers.
1340
1341When building a cross compiler, it is not generally possible to do a
13423-stage bootstrap of the compiler. This makes for an interesting problem
161d7b59 1343as parts of GCC can only be built with GCC@.
f42974dc
DW
1344
1345To build a cross compiler, we first recommend building and installing a
1346native compiler. You can then use the native GCC compiler to build the
635771af
JM
1347cross compiler. The installed native compiler needs to be GCC version
13482.95 or later.
f42974dc
DW
1349
1350Assuming you have already installed a native copy of GCC and configured
6cfb3f16 1351your cross compiler, issue the command @command{make}, which performs the
f42974dc
DW
1352following steps:
1353
1354@itemize @bullet
1355@item
1356Build host tools necessary to build the compiler such as texinfo, bison,
1357gperf.
1358
1359@item
1360Build target tools for use by the compiler such as binutils (bfd,
1361binutils, gas, gprof, ld, and opcodes)
1362if they have been individually linked or moved into the top level GCC source
1363tree before configuring.
1364
1365@item
1366Build the compiler (single stage only).
1367
1368@item
1369Build runtime libraries using the compiler from the previous step.
1370@end itemize
1371
1372Note that if an error occurs in any step the make process will exit.
1373
01e97976
JM
1374If you are not building GNU binutils in the same source tree as GCC,
1375you will need a cross-assembler and cross-linker installed before
1376configuring GCC@. Put them in the directory
1377@file{@var{prefix}/@var{target}/bin}. Here is a table of the tools
1378you should put in this directory:
1379
1380@table @file
1381@item as
1382This should be the cross-assembler.
1383
1384@item ld
1385This should be the cross-linker.
1386
1387@item ar
1388This should be the cross-archiver: a program which can manipulate
1389archive files (linker libraries) in the target machine's format.
1390
1391@item ranlib
1392This should be a program to construct a symbol table in an archive file.
1393@end table
1394
1395The installation of GCC will find these programs in that directory,
1396and copy or link them to the proper place to for the cross-compiler to
1397find them when run later.
1398
1399The easiest way to provide these files is to build the Binutils package.
1400Configure it with the same @option{--host} and @option{--target}
1401options that you use for configuring GCC, then build and install
1402them. They install their executables automatically into the proper
1403directory. Alas, they do not support all the targets that GCC
1404supports.
1405
1406If you are not building a C library in the same source tree as GCC,
1407you should also provide the target libraries and headers before
1408configuring GCC, specifying the directories with
1409@option{--with-sysroot} or @option{--with-headers} and
1410@option{--with-libs}. Many targets also require ``start files'' such
1411as @file{crt0.o} and
1412@file{crtn.o} which are linked into each executable. There may be several
1413alternatives for @file{crt0.o}, for use with profiling or other
1414compilation options. Check your target's definition of
1415@code{STARTFILE_SPEC} to find out what start files it uses.
1416
f42974dc
DW
1417@section Building in parallel
1418
27a3e494
DE
1419You can use @samp{make bootstrap MAKE="make -j 2" -j 2}, or just
1420@samp{make -j 2 bootstrap} for GNU Make 3.79 and above, instead of
1421@samp{make bootstrap} to build GCC in parallel.
1422You can also specify a bigger number, and in most cases using a value
1423greater than the number of processors in your machine will result in
1424fewer and shorter I/O latency hits, thus improving overall throughput;
1425this is especially true for slow drives and network filesystems.
f42974dc 1426
e23381df
GB
1427@section Building the Ada compiler
1428
1429In order to build GNAT, the Ada compiler, you need a working GNAT
3e98a119 1430compiler (GNAT version 3.14 or later, or GCC version 3.1 or later),
af5734de 1431including GNAT tools such as @command{gnatmake} and @command{gnatlink},
38e23049 1432since the Ada front end is written in Ada (with some
e23381df
GB
1433GNAT-specific extensions), and GNU make.
1434
38e23049
JM
1435@command{configure} does not test whether the GNAT installation works
1436and has a sufficiently recent version; if too old a GNAT version is
1437installed, the build will fail unless @option{--enable-languages} is
1438used to disable building the Ada front end.
e23381df 1439
e23381df 1440At the moment, the GNAT library and several tools for GNAT are not built
436d7715 1441by @samp{make bootstrap}. For a native build, you have to invoke
e23381df
GB
1442@samp{make gnatlib_and_tools} in the @file{@var{objdir}/gcc}
1443subdirectory before proceeding with the next steps.
436d7715 1444For a cross build, you need to invoke
e9da8a5a
AS
1445@samp{make gnatlib cross-gnattools ada.all.cross}. For a canadian
1446cross you only need to invoke @samp{make cross-gnattools}; the GNAT
1447library would be the same as the one built for the cross compiler.
e23381df
GB
1448
1449For example, you can build a native Ada compiler by issuing the
1450following commands (assuming @command{make} is GNU make):
1451
3ab51846 1452@smallexample
e23381df 1453 cd @var{objdir}
f282ffb3 1454 @var{srcdir}/configure --enable-languages=c,ada
f282ffb3 1455 cd @var{objdir}
e23381df
GB
1456 make bootstrap
1457 cd gcc
1458 make gnatlib_and_tools
1459 cd ..
3ab51846 1460@end smallexample
e23381df
GB
1461
1462Currently, when compiling the Ada front end, you cannot use the parallel
1463build feature described in the previous section.
1464
8f231b5d
JH
1465@section Building with profile feedback
1466
1467It is possible to use profile feedback to optimize the compiler itself. This
1468should result in a faster compiler binary. Experiments done on x86 using gcc
14693.3 showed approximately 7 percent speedup on compiling C programs. To
1470bootstrap compiler with profile feedback, use @code{make profiledbootstrap}.
1471
1472When @samp{make profiledbootstrap} is run, it will first build a @code{stage1}
1473compiler. This compiler is used to build a @code{stageprofile} compiler
1474instrumented to collect execution counts of instruction and branch
1475probabilities. Then runtime libraries are compiled with profile collected.
1476Finally a @code{stagefeedback} compiler is built using the information collected.
1477
1478Unlike @samp{make bootstrap} several additional restrictions apply. The
1479compiler used to build @code{stage1} needs to support a 64-bit integral type.
1480It is recommended to only use GCC for this. Also parallel make is currently
1481not supported since collisions in profile collecting may occur.
1482
f42974dc 1483@html
b8db17af 1484<hr />
f42974dc
DW
1485<p>
1486@end html
1487@ifhtml
1488@uref{./index.html,,Return to the GCC Installation page}
1489@end ifhtml
1490@end ifset
1491
1492@c ***Testing*****************************************************************
6cfb3f16 1493@ifnothtml
f42974dc
DW
1494@comment node-name, next, previous, up
1495@node Testing, Final install, Building, Installing GCC
6cfb3f16 1496@end ifnothtml
f42974dc 1497@ifset testhtml
f42974dc
DW
1498@ifnothtml
1499@chapter Installing GCC: Testing
1500@end ifnothtml
1501@cindex Testing
1502@cindex Installing GCC: Testing
1503@cindex Testsuite
1504
f97903cc
JJ
1505Before you install GCC, we encourage you to run the testsuites and to
1506compare your results with results from a similar configuration that have
1507been submitted to the
1508@uref{http://gcc.gnu.org/ml/gcc-testresults/,,gcc-testresults mailing list}.
05253aed
JJ
1509Some of these archived results are linked from the build status lists
1510at @uref{http://gcc.gnu.org/buildstat.html}, although not everyone who
1511reports a successful build runs the testsuites and submits the results.
f97903cc
JJ
1512This step is optional and may require you to download additional software,
1513but it can give you confidence in your new GCC installation or point out
1514problems before you install and start using your new GCC.
f42974dc 1515
f9047ed3 1516First, you must have @uref{download.html,,downloaded the testsuites}.
f97903cc
JJ
1517These are part of the full distribution, but if you downloaded the
1518``core'' compiler plus any front ends, you must download the testsuites
1519separately.
f42974dc 1520
f97903cc 1521Second, you must have the testing tools installed. This includes
6cbf57c9
GP
1522@uref{http://www.gnu.org/software/dejagnu/,,DejaGnu} 1.4.1 or 1.4.3
1523and later, Tcl, and Expect; the DejaGnu site has links to these.
f42974dc 1524
8cacda7c
GP
1525If the directories where @command{runtest} and @command{expect} were
1526installed are not in the @env{PATH}, you may need to set the following
1527environment variables appropriately, as in the following example (which
1528assumes that DejaGnu has been installed under @file{/usr/local}):
f42974dc 1529
3ab51846 1530@smallexample
f42974dc
DW
1531 TCL_LIBRARY = /usr/local/share/tcl8.0
1532 DEJAGNULIBS = /usr/local/share/dejagnu
3ab51846 1533@end smallexample
f42974dc 1534
8cacda7c 1535(On systems such as Cygwin, these paths are required to be actual
f42974dc 1536paths, not mounts or links; presumably this is due to some lack of
8cacda7c 1537portability in the DejaGnu code.)
ecb7d6b3 1538
f42974dc
DW
1539
1540Finally, you can run the testsuite (which may take a long time):
3ab51846 1541@smallexample
ef88b07d 1542 cd @var{objdir}; make -k check
3ab51846 1543@end smallexample
f42974dc 1544
794aca5d
WB
1545This will test various components of GCC, such as compiler
1546front ends and runtime libraries. While running the testsuite, DejaGnu
1547might emit some harmless messages resembling
daf2f129 1548@samp{WARNING: Couldn't find the global config file.} or
794aca5d 1549@samp{WARNING: Couldn't find tool init file} that can be ignored.
06809951 1550
f42974dc
DW
1551@section How can I run the test suite on selected tests?
1552
794aca5d
WB
1553In order to run sets of tests selectively, there are targets
1554@samp{make check-gcc} and @samp{make check-g++}
1555in the @file{gcc} subdirectory of the object directory. You can also
1556just run @samp{make check} in a subdirectory of the object directory.
1557
1558
1559A more selective way to just run all @command{gcc} execute tests in the
1560testsuite is to use
f42974dc 1561
3ab51846 1562@smallexample
6cfb3f16 1563 make check-gcc RUNTESTFLAGS="execute.exp @var{other-options}"
3ab51846 1564@end smallexample
f42974dc 1565
794aca5d
WB
1566Likewise, in order to run only the @command{g++} ``old-deja'' tests in
1567the testsuite with filenames matching @samp{9805*}, you would use
f42974dc 1568
3ab51846 1569@smallexample
6cfb3f16 1570 make check-g++ RUNTESTFLAGS="old-deja.exp=9805* @var{other-options}"
3ab51846 1571@end smallexample
f42974dc 1572
6cfb3f16
JM
1573The @file{*.exp} files are located in the testsuite directories of the GCC
1574source, the most important ones being @file{compile.exp},
1575@file{execute.exp}, @file{dg.exp} and @file{old-deja.exp}.
1576To get a list of the possible @file{*.exp} files, pipe the
38209993 1577output of @samp{make check} into a file and look at the
6cfb3f16 1578@samp{Running @dots{} .exp} lines.
f42974dc 1579
e08737dc
PE
1580@section Passing options and running multiple testsuites
1581
1582You can pass multiple options to the testsuite using the
1583@samp{--target_board} option of DejaGNU, either passed as part of
1584@samp{RUNTESTFLAGS}, or directly to @command{runtest} if you prefer to
1585work outside the makefiles. For example,
1586
3ab51846 1587@smallexample
e08737dc 1588 make check-g++ RUNTESTFLAGS="--target_board=unix/-O3/-fno-strength-reduce"
3ab51846 1589@end smallexample
e08737dc
PE
1590
1591will run the standard @command{g++} testsuites (``unix'' is the target name
1592for a standard native testsuite situation), passing
1593@samp{-O3 -fno-strength-reduce} to the compiler on every test, i.e.,
1594slashes separate options.
1595
1596You can run the testsuites multiple times using combinations of options
1597with a syntax similar to the brace expansion of popular shells:
1598
3ab51846 1599@smallexample
e08737dc 1600 @dots{}"--target_board=arm-sim@{-mhard-float,-msoft-float@}@{-O1,-O2,-O3,@}"
3ab51846 1601@end smallexample
e08737dc
PE
1602
1603(Note the empty option caused by the trailing comma in the final group.)
1604The following will run each testsuite eight times using the @samp{arm-sim}
1605target, as if you had specified all possible combinations yourself:
1606
3ab51846 1607@smallexample
e08737dc
PE
1608 --target_board=arm-sim/-mhard-float/-O1
1609 --target_board=arm-sim/-mhard-float/-O2
1610 --target_board=arm-sim/-mhard-float/-O3
1611 --target_board=arm-sim/-mhard-float
1612 --target_board=arm-sim/-msoft-float/-O1
1613 --target_board=arm-sim/-msoft-float/-O2
1614 --target_board=arm-sim/-msoft-float/-O3
1615 --target_board=arm-sim/-msoft-float
3ab51846 1616@end smallexample
e08737dc
PE
1617
1618They can be combined as many times as you wish, in arbitrary ways. This
1619list:
1620
3ab51846 1621@smallexample
e08737dc 1622 @dots{}"--target_board=unix/-Wextra@{-O3,-fno-strength-reduce@}@{-fomit-frame-pointer,@}"
3ab51846 1623@end smallexample
e08737dc
PE
1624
1625will generate four combinations, all involving @samp{-Wextra}.
1626
1627The disadvantage to this method is that the testsuites are run in serial,
1628which is a waste on multiprocessor systems. For users with GNU Make and
1629a shell which performs brace expansion, you can run the testsuites in
1630parallel by having the shell perform the combinations and @command{make}
1631do the parallel runs. Instead of using @samp{--target_board}, use a
1632special makefile target:
1633
3ab51846 1634@smallexample
e08737dc 1635 make -j@var{N} check-@var{testsuite}//@var{test-target}/@var{option1}/@var{option2}/@dots{}
3ab51846 1636@end smallexample
e08737dc
PE
1637
1638For example,
1639
3ab51846 1640@smallexample
e08737dc 1641 make -j3 check-gcc//sh-hms-sim/@{-m1,-m2,-m3,-m3e,-m4@}/@{,-nofpu@}
3ab51846 1642@end smallexample
e08737dc
PE
1643
1644will run three concurrent ``make-gcc'' testsuites, eventually testing all
1645ten combinations as described above. Note that this is currently only
1646supported in the @file{gcc} subdirectory. (To see how this works, try
1647typing @command{echo} before the example given here.)
1648
1649
1650@section Additional testing for Java Class Libraries
1651
688d8b84
RM
1652The Java runtime tests can be executed via @samp{make check}
1653in the @file{@var{target}/libjava/testsuite} directory in
1654the build tree.
f702e700 1655
f702e700
JJ
1656The @uref{http://sources.redhat.com/mauve/,,Mauve Project} provides
1657a suite of tests for the Java Class Libraries. This suite can be run
1658as part of libgcj testing by placing the Mauve tree within the libjava
1659testsuite at @file{libjava/testsuite/libjava.mauve/mauve}, or by
1660specifying the location of that tree when invoking @samp{make}, as in
1661@samp{make MAUVEDIR=~/mauve check}.
1662
582f6e6d
TT
1663@uref{http://www-124.ibm.com/developerworks/oss/cvs/jikes/~checkout~/jacks/jacks.html,,Jacks}
1664is a free test suite that tests Java compiler front ends. This suite
3b41afd9 1665can be run as part of libgcj testing by placing the Jacks tree within
582f6e6d
TT
1666the libjava testsuite at @file{libjava/testsuite/libjava.jacks/jacks}.
1667
f42974dc
DW
1668@section How to interpret test results
1669
794aca5d 1670The result of running the testsuite are various @file{*.sum} and @file{*.log}
767094dd 1671files in the testsuite subdirectories. The @file{*.log} files contain a
f42974dc 1672detailed log of the compiler invocations and the corresponding
daf2f129
JM
1673results, the @file{*.sum} files summarize the results. These summaries
1674contain status codes for all tests:
f42974dc
DW
1675
1676@itemize @bullet
1677@item
1678PASS: the test passed as expected
1679@item
1680XPASS: the test unexpectedly passed
1681@item
1682FAIL: the test unexpectedly failed
1683@item
1684XFAIL: the test failed as expected
1685@item
1686UNSUPPORTED: the test is not supported on this platform
1687@item
1688ERROR: the testsuite detected an error
1689@item
1690WARNING: the testsuite detected a possible problem
1691@end itemize
1692
38209993
LG
1693It is normal for some tests to report unexpected failures. At the
1694current time our testing harness does not allow fine grained control
1695over whether or not a test is expected to fail. We expect to fix this
1696problem in future releases.
f42974dc
DW
1697
1698
1699@section Submitting test results
1700
1701If you want to report the results to the GCC project, use the
767094dd 1702@file{contrib/test_summary} shell script. Start it in the @var{objdir} with
f42974dc 1703
3ab51846 1704@smallexample
6cfb3f16
JM
1705 @var{srcdir}/contrib/test_summary -p your_commentary.txt \
1706 -m gcc-testresults@@gcc.gnu.org |sh
3ab51846 1707@end smallexample
f42974dc 1708
6cfb3f16 1709This script uses the @command{Mail} program to send the results, so
767094dd 1710make sure it is in your @env{PATH}. The file @file{your_commentary.txt} is
f42974dc 1711prepended to the testsuite summary and should contain any special
767094dd 1712remarks you have on your results or your build environment. Please
f42974dc 1713do not edit the testsuite result block or the subject line, as these
05c425a9 1714messages may be automatically processed.
f42974dc 1715
aed5964b 1716@html
b8db17af 1717<hr />
aed5964b
JM
1718<p>
1719@end html
1720@ifhtml
1721@uref{./index.html,,Return to the GCC Installation page}
1722@end ifhtml
f42974dc
DW
1723@end ifset
1724
1725@c ***Final install***********************************************************
6cfb3f16 1726@ifnothtml
f42974dc
DW
1727@comment node-name, next, previous, up
1728@node Final install, , Testing, Installing GCC
6cfb3f16 1729@end ifnothtml
f42974dc 1730@ifset finalinstallhtml
f42974dc
DW
1731@ifnothtml
1732@chapter Installing GCC: Final installation
1733@end ifnothtml
1734
eea81d3e 1735Now that GCC has been built (and optionally tested), you can install it with
3ab51846 1736@smallexample
eea81d3e 1737cd @var{objdir}; make install
3ab51846 1738@end smallexample
f42974dc 1739
06809951
GP
1740We strongly recommend to install into a target directory where there is
1741no previous version of GCC present.
1742
f42974dc 1743That step completes the installation of GCC; user level binaries can
8e5f33ff
GK
1744be found in @file{@var{prefix}/bin} where @var{prefix} is the value
1745you specified with the @option{--prefix} to configure (or
1746@file{/usr/local} by default). (If you specified @option{--bindir},
1747that directory will be used instead; otherwise, if you specified
1748@option{--exec-prefix}, @file{@var{exec-prefix}/bin} will be used.)
1749Headers for the C++ and Java libraries are installed in
1750@file{@var{prefix}/include}; libraries in @file{@var{libdir}}
1751(normally @file{@var{prefix}/lib}); internal parts of the compiler in
1752@file{@var{libdir}/gcc} and @file{@var{libexecdir}/gcc}; documentation
1753in info format in @file{@var{infodir}} (normally
1754@file{@var{prefix}/info}).
f42974dc 1755
53b50ac1
CC
1756When installing cross-compilers, GCC's executables
1757are not only installed into @file{@var{bindir}}, that
1758is, @file{@var{exec-prefix}/bin}, but additionally into
1759@file{@var{exec-prefix}/@var{target-alias}/bin}, if that directory
1760exists. Typically, such @dfn{tooldirs} hold target-specific
1761binutils, including assembler and linker.
1762
1763Installation into a temporary staging area or into a @command{chroot}
1764jail can be achieved with the command
1765
3ab51846 1766@smallexample
53b50ac1 1767make DESTDIR=@var{path-to-rootdir} install
3ab51846 1768@end smallexample
53b50ac1
CC
1769
1770@noindent where @var{path-to-rootdir} is the absolute path of
1771a directory relative to which all installation paths will be
1772interpreted. Note that the directory specified by @code{DESTDIR}
1773need not exist yet; it will be created if necessary.
1774
1775There is a subtle point with tooldirs and @code{DESTDIR}:
1776If you relocate a cross-compiler installation with
1777e.g.@: @samp{DESTDIR=@var{rootdir}}, then the directory
1778@file{@var{rootdir}/@var{exec-prefix}/@var{target-alias}/bin} will
1779be filled with duplicated GCC executables only if it already exists,
1780it will not be created otherwise. This is regarded as a feature,
1781not as a bug, because it gives slightly more control to the packagers
1782using the @code{DESTDIR} feature.
1783
2b46bc67 1784If you built a released version of GCC using @samp{make bootstrap} then please
f97a5bda
JJ
1785quickly review the build status page for your release, available from
1786@uref{http://gcc.gnu.org/buildstat.html}.
c5997381
JJ
1787If your system is not listed for the version of GCC that you built,
1788send a note to
eea81d3e
RO
1789@email{gcc@@gcc.gnu.org} indicating
1790that you successfully built and installed GCC.
c5997381 1791Include the following information:
f42974dc 1792
c5997381
JJ
1793@itemize @bullet
1794@item
1795Output from running @file{@var{srcdir}/config.guess}. Do not send us
1796that file itself, just the one-line output from running it.
1797
1798@item
1799The output of @samp{gcc -v} for your newly installed gcc.
1800This tells us which version of GCC you built and the options you passed to
1801configure.
1802
2b46bc67
JJ
1803@item
1804Whether you enabled all languages or a subset of them. If you used a
1805full distribution then this information is part of the configure
1806options in the output of @samp{gcc -v}, but if you downloaded the
1807``core'' compiler plus additional front ends then it isn't apparent
1808which ones you built unless you tell us about it.
1809
c5997381
JJ
1810@item
1811If the build was for GNU/Linux, also include:
1812@itemize @bullet
1813@item
1814The distribution name and version (e.g., Red Hat 7.1 or Debian 2.2.3);
1815this information should be available from @file{/etc/issue}.
1816
1817@item
1818The version of the Linux kernel, available from @samp{uname --version}
1819or @samp{uname -a}.
1820
1821@item
1822The version of glibc you used; for RPM-based systems like Red Hat,
b9da07da
JJ
1823Mandrake, and SuSE type @samp{rpm -q glibc} to get the glibc version,
1824and on systems like Debian and Progeny use @samp{dpkg -l libc6}.
c5997381
JJ
1825@end itemize
1826For other systems, you can include similar information if you think it is
1827relevant.
1828
1829@item
1830Any other information that you think would be useful to people building
1831GCC on the same configuration. The new entry in the build status list
1832will include a link to the archived copy of your message.
1833@end itemize
c009f01f
JJ
1834
1835We'd also like to know if the
1836@ifnothtml
1837@ref{Specific, host/target specific installation notes}
1838@end ifnothtml
1839@ifhtml
1840@uref{specific.html,,host/target specific installation notes}
1841@end ifhtml
1842didn't include your host/target information or if that information is
1843incomplete or out of date. Send a note to
1844@email{gcc@@gcc.gnu.org} telling us how the information should be changed.
f42974dc
DW
1845
1846If you find a bug, please report it following our
1847@uref{../bugs.html,,bug reporting guidelines}.
1848
ab130aa5 1849If you want to print the GCC manuals, do @samp{cd @var{objdir}; make
a38f87a9 1850dvi}. You will need to have @command{texi2dvi} (version at least 4.2)
ab130aa5
JM
1851and @TeX{} installed. This creates a number of @file{.dvi} files in
1852subdirectories of @file{@var{objdir}}; these may be converted for
1853printing with programs such as @command{dvips}. You can also
1854@uref{http://www.gnu.org/order/order.html,,buy printed manuals from the
1855Free Software Foundation}, though such manuals may not be for the most
161d7b59 1856recent version of GCC@.
ab130aa5 1857
f42974dc 1858@html
b8db17af 1859<hr />
f42974dc
DW
1860<p>
1861@end html
1862@ifhtml
1863@uref{./index.html,,Return to the GCC Installation page}
1864@end ifhtml
1865@end ifset
1866
1867@c ***Binaries****************************************************************
6cfb3f16 1868@ifnothtml
f42974dc
DW
1869@comment node-name, next, previous, up
1870@node Binaries, Specific, Installing GCC, Top
6cfb3f16 1871@end ifnothtml
f42974dc 1872@ifset binarieshtml
f42974dc
DW
1873@ifnothtml
1874@chapter Installing GCC: Binaries
1875@end ifnothtml
1876@cindex Binaries
1877@cindex Installing GCC: Binaries
1878
161d7b59 1879We are often asked about pre-compiled versions of GCC@. While we cannot
f42974dc
DW
1880provide these for all platforms, below you'll find links to binaries for
1881various platforms where creating them by yourself is not easy due to various
1882reasons.
1883
1884Please note that we did not create these binaries, nor do we
1885support them. If you have any problems installing them, please
1886contact their makers.
1887
1888@itemize
1889@item
df002c7d
DE
1890AIX:
1891@itemize
1892@item
ff4c5e7b 1893@uref{http://www.bullfreeware.com,,Bull's Freeware and Shareware Archive for AIX};
df002c7d
DE
1894
1895@item
8d5362b7 1896@uref{http://aixpdslib.seas.ucla.edu,,UCLA Software Library for AIX}.
df002c7d 1897@end itemize
f42974dc
DW
1898
1899@item
8d5362b7
GP
1900DOS---@uref{http://www.delorie.com/djgpp/,,DJGPP}.
1901
1902@item
71c6b994
KH
1903Renesas H8/300[HS]---@uref{http://h8300-hms.sourceforge.net/,,GNU
1904Development Tools for the Renesas H8/300[HS] Series}.
f42974dc 1905
f404402c
MW
1906@item
1907HP-UX:
1908@itemize
f42974dc
DW
1909@item
1910@uref{http://hpux.cae.wisc.edu/,,HP-UX Porting Center};
1911
f404402c
MW
1912@item
1913@uref{ftp://sunsite.informatik.rwth-aachen.de/pub/packages/gcc_hpux/,,Binaries for HP-UX 11.00 at Aachen University of Technology}.
1914@end itemize
1915
3e35d143
SC
1916@item
1917Motorola 68HC11/68HC12---@uref{http://www.gnu-m68hc11.org,,GNU
1918Development Tools for the Motorola 68HC11/68HC12}.
1919
f42974dc 1920@item
38209993 1921@uref{http://www.sco.com/skunkware/devtools/index.html#gcc,,SCO
8d5362b7 1922OpenServer/Unixware}.
f42974dc
DW
1923
1924@item
35113fde 1925Sinix/Reliant Unix---@uref{ftp://ftp.fujitsu-siemens.com/pub/pd/gnu/gcc/,,Siemens}.
daf2f129 1926
8d5362b7
GP
1927@item
1928Solaris 2 (SPARC, Intel)---@uref{http://www.sunfreeware.com/,,Sunfreeware}.
f42974dc
DW
1929
1930@item
8d5362b7 1931SGI---@uref{http://freeware.sgi.com/,,SGI Freeware}.
f42974dc
DW
1932
1933@item
05c425a9 1934Microsoft Windows:
f42974dc
DW
1935@itemize
1936@item
1937The @uref{http://sources.redhat.com/cygwin/,,Cygwin} project;
1938@item
cc92b8ab 1939The @uref{http://www.mingw.org/,,MinGW} project.
f42974dc
DW
1940@end itemize
1941
1942@item
616de62f
GP
1943@uref{ftp://ftp.thewrittenword.com/packages/by-name/,,The
1944Written Word} offers binaries for
1945AIX 4.3.2.
1946IRIX 6.5,
1947Digital UNIX 4.0D and 5.1,
1948GNU/Linux (i386),
1949HP-UX 10.20, 11.00, and 11.11, and
1950Solaris/SPARC 2.5.1, 2.6, 2.7, 8, and 9,
f42974dc
DW
1951@end itemize
1952
1953In addition to those specific offerings, you can get a binary
1954distribution CD-ROM from the
f9047ed3 1955@uref{http://www.fsf.org/order/order.html,,Free Software Foundation}.
f42974dc 1956It contains binaries for a number of platforms, and
767094dd 1957includes not only GCC, but other stuff as well. The current CD does
f42974dc 1958not contain the latest version of GCC, but it should allow
767094dd 1959bootstrapping the compiler. An updated version of that disk is in the
f42974dc
DW
1960works.
1961
1962@html
b8db17af 1963<hr />
f42974dc
DW
1964<p>
1965@end html
1966@ifhtml
1967@uref{./index.html,,Return to the GCC Installation page}
1968@end ifhtml
1969@end ifset
1970
1971@c ***Specific****************************************************************
6cfb3f16 1972@ifnothtml
f42974dc 1973@comment node-name, next, previous, up
73e2155a 1974@node Specific, Old, Binaries, Top
6cfb3f16 1975@end ifnothtml
f42974dc 1976@ifset specifichtml
f42974dc
DW
1977@ifnothtml
1978@chapter Host/target specific installation notes for GCC
1979@end ifnothtml
1980@cindex Specific
1981@cindex Specific installation notes
1982@cindex Target specific installation
1983@cindex Host specific installation
1984@cindex Target specific installation notes
1985
1986Please read this document carefully @emph{before} installing the
1987GNU Compiler Collection on your machine.
1988
ef88b07d 1989@ifhtml
f42974dc
DW
1990@itemize
1991@item
333e14b0 1992@uref{#alpha*-*-*,,alpha*-*-*}
f42974dc
DW
1993@item
1994@uref{#alpha*-dec-osf*,,alpha*-dec-osf*}
1995@item
71b96724
RL
1996@uref{#alphaev5-cray-unicosmk*,,alphaev5-cray-unicosmk*}
1997@item
b8df899a
JM
1998@uref{#arc-*-elf,,arc-*-elf}
1999@item
34e8290f
NC
2000@uref{#arm-*-elf,,arm-*-elf}
2001@uref{#arm-*-coff,,arm-*-coff}
34e8290f 2002@uref{#arm-*-aout,,arm-*-aout}
b8df899a 2003@item
2aea0b53 2004@uref{#xscale-*-*,,xscale-*-*}
476c334e 2005@item
f42974dc
DW
2006@uref{#avr,,avr}
2007@item
0132e321
MH
2008@uref{#c4x,,c4x}
2009@item
f42974dc
DW
2010@uref{#dos,,DOS}
2011@item
b8df899a
JM
2012@uref{#dsp16xx,,dsp16xx}
2013@item
021c4bfd
RO
2014@uref{#*-*-freebsd*,,*-*-freebsd*}
2015@item
f42974dc
DW
2016@uref{#h8300-hms,,h8300-hms}
2017@item
2018@uref{#hppa*-hp-hpux*,,hppa*-hp-hpux*}
2019@item
f42974dc
DW
2020@uref{#hppa*-hp-hpux10,,hppa*-hp-hpux10}
2021@item
2022@uref{#hppa*-hp-hpux11,,hppa*-hp-hpux11}
2023@item
b8df899a
JM
2024@uref{#i370-*-*,,i370-*-*}
2025@item
f42974dc
DW
2026@uref{#*-*-linux-gnu,,*-*-linux-gnu}
2027@item
b8df899a
JM
2028@uref{#ix86-*-linux*aout,,i?86-*-linux*aout}
2029@item
f42974dc
DW
2030@uref{#ix86-*-linux*,,i?86-*-linux*}
2031@item
2032@uref{#ix86-*-sco3.2v5*,,i?86-*-sco3.2v5*}
2033@item
f42974dc
DW
2034@uref{#ix86-*-udk,,i?86-*-udk}
2035@item
b8df899a
JM
2036@uref{#ix86-*-esix,,i?86-*-esix}
2037@item
b499d9ab
JJ
2038@uref{#ia64-*-linux,,ia64-*-linux}
2039@item
959a73a4
DH
2040@uref{#ia64-*-hpux*,,ia64-*-hpux*}
2041@item
f42974dc
DW
2042@uref{#*-ibm-aix*,,*-ibm-aix*}
2043@item
e3223ea2
DC
2044@uref{#ip2k-*-elf,,ip2k-*-elf}
2045@item
6b3d1e47
SC
2046@uref{#iq2000-*-elf,,iq2000-*-elf}
2047@item
b8df899a
JM
2048@uref{#m32r-*-elf,,m32r-*-elf}
2049@item
b8df899a
JM
2050@uref{#m6811-elf,,m6811-elf}
2051@item
2052@uref{#m6812-elf,,m6812-elf}
2053@item
b8df899a
JM
2054@uref{#m68k-hp-hpux,,m68k-hp-hpux}
2055@item
b8df899a
JM
2056@uref{#mips-*-*,,mips-*-*}
2057@item
b953cc4b 2058@uref{#mips-sgi-irix5,,mips-sgi-irix5}
f42974dc 2059@item
b953cc4b 2060@uref{#mips-sgi-irix6,,mips-sgi-irix6}
f42974dc 2061@item
021c4bfd
RO
2062@uref{#powerpc*-*-*,,powerpc*-*-*, powerpc-*-sysv4}
2063@item
4f2b1139
SS
2064@uref{#powerpc-*-darwin*,,powerpc-*-darwin*}
2065@item
b8df899a
JM
2066@uref{#powerpc-*-elf,,powerpc-*-elf, powerpc-*-sysv4}
2067@item
f42974dc
DW
2068@uref{#powerpc-*-linux-gnu*,,powerpc-*-linux-gnu*}
2069@item
edf1b3f3
AC
2070@uref{#powerpc-*-netbsd*,,powerpc-*-netbsd*}
2071@item
b8df899a
JM
2072@uref{#powerpc-*-eabiaix,,powerpc-*-eabiaix}
2073@item
2074@uref{#powerpc-*-eabisim,,powerpc-*-eabisim}
2075@item
2076@uref{#powerpc-*-eabi,,powerpc-*-eabi}
2077@item
2078@uref{#powerpcle-*-elf,,powerpcle-*-elf, powerpcle-*-sysv4}
2079@item
2080@uref{#powerpcle-*-eabisim,,powerpcle-*-eabisim}
2081@item
2082@uref{#powerpcle-*-eabi,,powerpcle-*-eabi}
2083@item
225cee28 2084@uref{#s390-*-linux*,,s390-*-linux*}
91abf72d 2085@item
225cee28 2086@uref{#s390x-*-linux*,,s390x-*-linux*}
91abf72d 2087@item
8bf06993
UW
2088@uref{#s390x-ibm-tpf*,,s390x-ibm-tpf*}
2089@item
250d5688 2090@uref{#*-*-solaris2*,,*-*-solaris2*}
f42974dc 2091@item
250d5688 2092@uref{#sparc-sun-solaris2*,,sparc-sun-solaris2*}
f42974dc
DW
2093@item
2094@uref{#sparc-sun-solaris2.7,,sparc-sun-solaris2.7}
2095@item
c6fa9728
JS
2096@uref{#sparc-*-linux*,,sparc-*-linux*}
2097@item
0dc7ee3c 2098@uref{#sparc64-*-solaris2*,,sparc64-*-solaris2*}
f42974dc 2099@item
e403b4bc
CR
2100@uref{#sparcv9-*-solaris2*,,sparcv9-*-solaris2*}
2101@item
b8df899a
JM
2102@uref{#*-*-sysv*,,*-*-sysv*}
2103@item
2104@uref{#vax-dec-ultrix,,vax-dec-ultrix}
2105@item
4977bab6
ZW
2106@uref{#*-*-vxworks*,,*-*-vxworks*}
2107@item
7e081a0c
AJ
2108@uref{#x86_64-*-*,,x86_64-*-*, amd64-*-*}
2109@item
fd29f6ea
BW
2110@uref{#xtensa-*-elf,,xtensa-*-elf}
2111@item
2112@uref{#xtensa-*-linux*,,xtensa-*-linux*}
2113@item
f42974dc
DW
2114@uref{#windows,,Microsoft Windows}
2115@item
2116@uref{#os2,,OS/2}
2117@item
2118@uref{#older,,Older systems}
2119@end itemize
2120
2121@itemize
2122@item
250d5688 2123@uref{#elf_targets,,all ELF targets} (SVR4, Solaris 2, etc.)
f42974dc 2124@end itemize
ef88b07d 2125@end ifhtml
f42974dc
DW
2126
2127
2128@html
2129<!-- -------- host/target specific issues start here ---------------- -->
b8db17af 2130<hr />
f42974dc 2131@end html
333e14b0
LR
2132@heading @anchor{alpha*-*-*}alpha*-*-*
2133
2134This section contains general configuration information for all
2135alpha-based platforms using ELF (in particular, ignore this section for
161d7b59 2136DEC OSF/1, Digital UNIX and Tru64 UNIX)@. In addition to reading this
f2541106 2137section, please read all other sections that match your target.
333e14b0 2138
021c4bfd
RO
2139We require binutils 2.11.2 or newer.
2140Previous binutils releases had a number of problems with DWARF 2
333e14b0
LR
2141debugging information, not the least of which is incorrect linking of
2142shared libraries.
2143
b8df899a 2144@html
b8db17af 2145<hr />
b8df899a 2146@end html
f2541106 2147@heading @anchor{alpha*-dec-osf*}alpha*-dec-osf*
b8df899a 2148Systems using processors that implement the DEC Alpha architecture and
f2541106
RO
2149are running the DEC/Compaq Unix (DEC OSF/1, Digital UNIX, or Compaq
2150Tru64 UNIX) operating system, for example the DEC Alpha AXP systems.
2151
c7bdf0a6
ZW
2152As of GCC 3.2, versions before @code{alpha*-dec-osf4} are no longer
2153supported. (These are the versions which identify themselves as DEC
2154OSF/1.)
9340544b 2155
6e92b3a1
RB
2156In Digital Unix V4.0, virtual memory exhausted bootstrap failures
2157may be fixed by configuring with @option{--with-gc=simple},
2158reconfiguring Kernel Virtual Memory and Swap parameters
2159per the @command{/usr/sbin/sys_check} Tuning Suggestions,
2160or applying the patch in
2161@uref{http://gcc.gnu.org/ml/gcc/2002-08/msg00822.html}.
2162
f2541106
RO
2163In Tru64 UNIX V5.1, Compaq introduced a new assembler that does not
2164currently (2001-06-13) work with @command{mips-tfile}. As a workaround,
2165we need to use the old assembler, invoked via the barely documented
2166@option{-oldas} option. To bootstrap GCC, you either need to use the
2167Compaq C Compiler:
2168
3ab51846 2169@smallexample
eea81d3e 2170 % CC=cc @var{srcdir}/configure [@var{options}] [@var{target}]
3ab51846 2171@end smallexample
f2541106
RO
2172
2173or you can use a copy of GCC 2.95.3 or higher built on Tru64 UNIX V4.0:
2174
3ab51846 2175@smallexample
eea81d3e 2176 % CC=gcc -Wa,-oldas @var{srcdir}/configure [@var{options}] [@var{target}]
3ab51846 2177@end smallexample
b8df899a 2178
b953cc4b
RO
2179As of GNU binutils 2.11.2, neither GNU @command{as} nor GNU @command{ld}
2180are supported on Tru64 UNIX, so you must not configure GCC with
2181@option{--with-gnu-as} or @option{--with-gnu-ld}.
2182
f0523f02 2183GCC writes a @samp{.verstamp} directive to the assembler output file
b8df899a
JM
2184unless it is built as a cross-compiler. It gets the version to use from
2185the system header file @file{/usr/include/stamp.h}. If you install a
2186new version of DEC Unix, you should rebuild GCC to pick up the new version
2187stamp.
2188
2189Note that since the Alpha is a 64-bit architecture, cross-compilers from
219032-bit machines will not generate code as efficient as that generated
2191when the compiler is running on a 64-bit machine because many
2192optimizations that depend on being able to represent a word on the
2193target in an integral value on the host cannot be performed. Building
2194cross-compilers on the Alpha for 32-bit machines has only been tested in
2195a few cases and may not work properly.
2196
7ba4ca63 2197@samp{make compare} may fail on old versions of DEC Unix unless you add
6cfb3f16 2198@option{-save-temps} to @code{CFLAGS}. On these systems, the name of the
b8df899a
JM
2199assembler input file is stored in the object file, and that makes
2200comparison fail if it differs between the @code{stage1} and
6cfb3f16 2201@code{stage2} compilations. The option @option{-save-temps} forces a
b8df899a 2202fixed name to be used for the assembler input file, instead of a
6cfb3f16 2203randomly chosen name in @file{/tmp}. Do not add @option{-save-temps}
b8df899a 2204unless the comparisons fail without that option. If you add
6cfb3f16 2205@option{-save-temps}, you will have to manually delete the @samp{.i} and
b8df899a
JM
2206@samp{.s} files after each series of compilations.
2207
f0523f02 2208GCC now supports both the native (ECOFF) debugging format used by DBX
161d7b59 2209and GDB and an encapsulated STABS format for use only with GDB@. See the
6cfb3f16 2210discussion of the @option{--with-stabs} option of @file{configure} above
b8df899a
JM
2211for more information on these formats and how to select them.
2212
2213There is a bug in DEC's assembler that produces incorrect line numbers
2214for ECOFF format when the @samp{.align} directive is used. To work
f0523f02 2215around this problem, GCC will not emit such alignment directives
b8df899a
JM
2216while writing ECOFF format debugging information even if optimization is
2217being performed. Unfortunately, this has the very undesirable
6cfb3f16
JM
2218side-effect that code addresses when @option{-O} is specified are
2219different depending on whether or not @option{-g} is also specified.
b8df899a 2220
6cfb3f16 2221To avoid this behavior, specify @option{-gstabs+} and use GDB instead of
161d7b59 2222DBX@. DEC is now aware of this problem with the assembler and hopes to
b8df899a
JM
2223provide a fix shortly.
2224
71b96724 2225@html
b8db17af 2226<hr />
71b96724
RL
2227@end html
2228@heading @anchor{alphaev5-cray-unicosmk*}alphaev5-cray-unicosmk*
2229Cray T3E systems running Unicos/Mk.
2230
2231This port is incomplete and has many known bugs. We hope to improve the
2232support for this target soon. Currently, only the C front end is supported,
2233and it is not possible to build parallel applications. Cray modules are not
2234supported; in particular, Craylibs are assumed to be in
2235@file{/opt/ctl/craylibs/craylibs}.
2236
2237You absolutely @strong{must} use GNU make on this platform. Also, you
2238need to tell GCC where to find the assembler and the linker. The
2239simplest way to do so is by providing @option{--with-as} and
2240@option{--with-ld} to @file{configure}, e.g.@:
2241
3ab51846 2242@smallexample
8c085f6f
JJ
2243 configure --with-as=/opt/ctl/bin/cam --with-ld=/opt/ctl/bin/cld \
2244 --enable-languages=c
3ab51846 2245@end smallexample
71b96724
RL
2246
2247The comparison test during @samp{make bootstrap} fails on Unicos/Mk
2248because the assembler inserts timestamps into object files. You should
2249be able to work around this by doing @samp{make all} after getting this
2250failure.
2251
b8df899a 2252@html
b8db17af 2253<hr />
b8df899a
JM
2254@end html
2255@heading @anchor{arc-*-elf}arc-*-elf
2256Argonaut ARC processor.
2257This configuration is intended for embedded systems.
2258
2259@html
b8db17af 2260<hr />
b8df899a 2261@end html
34e8290f 2262@heading @anchor{arm-*-elf}arm-*-elf
2aea0b53 2263@heading @anchor{xscale-*-*}xscale-*-*
34e8290f
NC
2264ARM-family processors. Subtargets that use the ELF object format
2265require GNU binutils 2.13 or newer. Such subtargets include:
2266@code{arm-*-freebsd}, @code{arm-*-netbsdelf}, @code{arm-*-*linux},
2267@code{arm-*-rtems} and @code{arm-*-kaos}.
2268
2269@html
2270<hr />
2271@end html
2272@heading @anchor{arm-*-coff}arm-*-coff
61aeb06f 2273ARM-family processors. Note that there are two different varieties
34e8290f
NC
2274of PE format subtarget supported: @code{arm-wince-pe} and
2275@code{arm-pe} as well as a standard COFF target @code{arm-*-coff}.
2276
34e8290f
NC
2277@html
2278<hr />
2279@end html
2280@heading @anchor{arm-*-aout}arm-*-aout
2281ARM-family processors. These targets support the AOUT file format:
2282@code{arm-*-aout}, @code{arm-*-netbsd}.
476c334e 2283
f42974dc 2284@html
b8db17af 2285<hr />
f42974dc 2286@end html
ef88b07d 2287@heading @anchor{avr}avr
f42974dc 2288
b8df899a 2289ATMEL AVR-family micro controllers. These are used in embedded
ca52d046
GP
2290applications. There are no standard Unix configurations.
2291@ifnothtml
2292@xref{AVR Options,, AVR Options, gcc, Using and Porting the GNU Compiler
2293Collection (GCC)},
2294@end ifnothtml
98999d8b 2295@ifhtml
ca52d046 2296See ``AVR Options'' in the main manual
98999d8b 2297@end ifhtml
ca52d046 2298for the list of supported MCU types.
b8df899a 2299
161d7b59 2300Use @samp{configure --target=avr --enable-languages="c"} to configure GCC@.
f42974dc
DW
2301
2302Further installation notes and other useful information about AVR tools
2303can also be obtained from:
2304
2305@itemize @bullet
2306@item
de7999ba
MM
2307@uref{http://www.openavr.org,,http://www.openavr.org}
2308@item
d1a86812 2309@uref{http://home.overta.ru/users/denisc/,,http://home.overta.ru/users/denisc/}
f42974dc 2310@item
d1a86812 2311@uref{http://www.amelek.gda.pl/avr/,,http://www.amelek.gda.pl/avr/}
f42974dc
DW
2312@end itemize
2313
de7999ba 2314We @emph{strongly} recommend using binutils 2.13 or newer.
f42974dc
DW
2315
2316The following error:
3ab51846 2317@smallexample
f42974dc 2318 Error: register required
3ab51846 2319@end smallexample
f42974dc
DW
2320
2321indicates that you should upgrade to a newer version of the binutils.
2322
0132e321 2323@html
b8db17af 2324<hr />
0132e321
MH
2325@end html
2326@heading @anchor{c4x}c4x
2327
2328Texas Instruments TMS320C3x and TMS320C4x Floating Point Digital Signal
2329Processors. These are used in embedded applications. There are no
d8393f64
GP
2330standard Unix configurations.
2331@ifnothtml
2332@xref{TMS320C3x/C4x Options,, TMS320C3x/C4x Options, gcc, Using and
2333Porting the GNU Compiler Collection (GCC)},
2334@end ifnothtml
98999d8b 2335@ifhtml
d8393f64 2336See ``TMS320C3x/C4x Options'' in the main manual
98999d8b 2337@end ifhtml
d8393f64 2338for the list of supported MCU types.
0132e321
MH
2339
2340GCC can be configured as a cross compiler for both the C3x and C4x
2341architectures on the same system. Use @samp{configure --target=c4x
2342--enable-languages="c,c++"} to configure.
2343
2344
2345Further installation notes and other useful information about C4x tools
2346can also be obtained from:
2347
2348@itemize @bullet
2349@item
d8393f64 2350@uref{http://www.elec.canterbury.ac.nz/c4x/,,http://www.elec.canterbury.ac.nz/c4x/}
0132e321
MH
2351@end itemize
2352
0b85d816 2353@html
b8db17af 2354<hr />
0b85d816
HPN
2355@end html
2356@heading @anchor{cris}CRIS
2357
2358CRIS is the CPU architecture in Axis Communications ETRAX system-on-a-chip
2359series. These are used in embedded applications.
2360
2361@ifnothtml
2362@xref{CRIS Options,, CRIS Options, gcc, Using and Porting the GNU Compiler
2363Collection (GCC)},
2364@end ifnothtml
2365@ifhtml
2366See ``CRIS Options'' in the main manual
2367@end ifhtml
2368for a list of CRIS-specific options.
2369
2370There are a few different CRIS targets:
2371@table @code
2372@item cris-axis-aout
2373Old target. Includes a multilib for the @samp{elinux} a.out-based
2374target. No multilibs for newer architecture variants.
2375@item cris-axis-elf
2376Mainly for monolithic embedded systems. Includes a multilib for the
2377@samp{v10} core used in @samp{ETRAX 100 LX}.
2378@item cris-axis-linux-gnu
2379A GNU/Linux port for the CRIS architecture, currently targeting
2380@samp{ETRAX 100 LX} by default.
2381@end table
2382
2383For @code{cris-axis-aout} and @code{cris-axis-elf} you need binutils 2.11
2384or newer. For @code{cris-axis-linux-gnu} you need binutils 2.12 or newer.
2385
2386Pre-packaged tools can be obtained from
2387@uref{ftp://ftp.axis.com/pub/axis/tools/cris/compiler-kit/}. More
2388information about this platform is available at
2389@uref{http://developer.axis.com/}.
2390
f42974dc 2391@html
b8db17af 2392<hr />
f42974dc 2393@end html
ef88b07d 2394@heading @anchor{dos}DOS
f42974dc
DW
2395
2396Please have a look at our @uref{binaries.html,,binaries page}.
2397
f0523f02 2398You cannot install GCC by itself on MSDOS; it will not compile under
f85b8d1a
JM
2399any MSDOS compiler except itself. You need to get the complete
2400compilation package DJGPP, which includes binaries as well as sources,
2401and includes all the necessary compilation tools and libraries.
2402
b8df899a 2403@html
b8db17af 2404<hr />
b8df899a
JM
2405@end html
2406@heading @anchor{dsp16xx}dsp16xx
2407A port to the AT&T DSP1610 family of processors.
2408
021c4bfd 2409@html
b8db17af 2410<hr />
021c4bfd
RO
2411@end html
2412@heading @anchor{*-*-freebsd*}*-*-freebsd*
2413
2414The version of binutils installed in @file{/usr/bin} is known to work unless
2415otherwise specified in any per-architecture notes. However, binutils
6b976d99 24162.12.1 or greater is known to improve overall testsuite results.
021c4bfd 2417
6a1dbbaf 2418Support for FreeBSD 1 was discontinued in GCC 3.2.
c7bdf0a6
ZW
2419
2420For FreeBSD 2 or any mutant a.out versions of FreeBSD 3: All
021c4bfd
RO
2421configuration support and files as shipped with GCC 2.95 are still in
2422place. FreeBSD 2.2.7 has been known to bootstrap completely; however,
2423it is unknown which version of binutils was used (it is assumed that it
2424was the system copy in @file{/usr/bin}) and C++ EH failures were noted.
2425
2426For FreeBSD using the ELF file format: DWARF 2 debugging is now the
2427default for all CPU architectures. It had been the default on
2428FreeBSD/alpha since its inception. You may use @option{-gstabs} instead
2429of @option{-g}, if you really want the old debugging format. There are
2430no known issues with mixing object files and libraries with different
2431debugging formats. Otherwise, this release of GCC should now match more
2432of the configuration used in the stock FreeBSD configuration of GCC. In
2433particular, @option{--enable-threads} is now configured by default.
2434However, as a general user, do not attempt to replace the system
2435compiler with this release. Known to bootstrap and check with good
e4e7d312
LR
2436results on FreeBSD 4.8-STABLE and 5-CURRENT@. In the past, known to
2437bootstrap and check with good results on FreeBSD 3.0, 3.4, 4.0, 4.2,
24384.3, 4.4, 4.5-STABLE@.
46fc709d
LR
2439
2440In principle, @option{--enable-threads} is now compatible with
2441@option{--enable-libgcj} on FreeBSD@. However, it has only been built
e4e7d312 2442and tested on @samp{i386-*-freebsd[45]} and @samp{alpha-*-freebsd[45]}.
8c085f6f 2443The static
6b976d99
LR
2444library may be incorrectly built (symbols are missing at link time).
2445There is a rare timing-based startup hang (probably involves an
c0478a66 2446assumption about the thread library). Multi-threaded boehm-gc (required for
46fc709d 2447libjava) exposes severe threaded signal-handling bugs on FreeBSD before
e4e7d312 24484.5-RELEASE@. Other CPU architectures
46fc709d
LR
2449supported by FreeBSD will require additional configuration tuning in, at
2450the very least, both boehm-gc and libffi.
021c4bfd 2451
bc3a44db
LR
2452Shared @file{libgcc_s.so} is now built and installed by default.
2453
f42974dc 2454@html
b8db17af 2455<hr />
f42974dc 2456@end html
ef88b07d 2457@heading @anchor{h8300-hms}h8300-hms
71c6b994 2458Renesas H8/300 series of processors.
f42974dc
DW
2459
2460Please have a look at our @uref{binaries.html,,binaries page}.
2461
b8df899a
JM
2462The calling convention and structure layout has changed in release 2.6.
2463All code must be recompiled. The calling convention now passes the
2464first three arguments in function calls in registers. Structures are no
2465longer a multiple of 2 bytes.
2466
f42974dc 2467@html
b8db17af 2468<hr />
f42974dc 2469@end html
ef88b07d 2470@heading @anchor{hppa*-hp-hpux*}hppa*-hp-hpux*
6a1dbbaf 2471Support for HP-UX version 9 and older was discontinued in GCC 3.4.
f42974dc 2472
021c4bfd 2473We @emph{highly} recommend using gas/binutils 2.8 or newer on all hppa
f9047ed3 2474platforms; you may encounter a variety of problems when using the HP
581d9404 2475assembler.
f42974dc
DW
2476
2477Specifically, @option{-g} does not work on HP-UX (since that system
2478uses a peculiar debugging format which GCC does not know about), unless you
38209993
LG
2479use GAS and GDB and configure GCC with the
2480@uref{./configure.html#with-gnu-as,,@option{--with-gnu-as}} and
6cfb3f16 2481@option{--with-as=@dots{}} options.
f42974dc 2482
08b3d104
JDA
2483If you wish to use the pa-risc 2.0 architecture support with a 32-bit
2484runtime, you must use either the HP assembler, gas/binutils 2.11 or newer,
2485or a recent
f42974dc
DW
2486@uref{ftp://sources.redhat.com/pub/binutils/snapshots,,snapshot of gas}.
2487
d5355cb2
JDA
2488There are two default scheduling models for instructions. These are
2489PROCESSOR_7100LC and PROCESSOR_8000. They are selected from the pa-risc
2490architecture specified for the target machine when configuring.
2491PROCESSOR_8000 is the default. PROCESSOR_7100LC is selected when
2492the target is a @samp{hppa1*} machine.
806bf413
JDA
2493
2494The PROCESSOR_8000 model is not well suited to older processors. Thus,
2495it is important to completely specify the machine architecture when
2496configuring if you want a model other than PROCESSOR_8000. The macro
2497TARGET_SCHED_DEFAULT can be defined in BOOT_CFLAGS if a different
2498default scheduling model is desired.
2499
021c4bfd 2500More specific information to @samp{hppa*-hp-hpux*} targets follows.
f42974dc 2501
f42974dc 2502@html
b8db17af 2503<hr />
f42974dc 2504@end html
ef88b07d 2505@heading @anchor{hppa*-hp-hpux10}hppa*-hp-hpux10
f42974dc 2506
f9047ed3 2507For hpux10.20, we @emph{highly} recommend you pick up the latest sed patch
161d7b59 2508@code{PHCO_19798} from HP@. HP has two sites which provide patches free of
f42974dc
DW
2509charge:
2510
2511@itemize @bullet
2512@item
2513@html
f401d0f5 2514<a href="http://us.itrc.hp.com/service/home/home.do">US, Canada, Asia-Pacific, and
f42974dc
DW
2515Latin-America</a>
2516@end html
2517@ifnothtml
f401d0f5
JDA
2518@uref{http://us.itrc.hp.com/service/home/home.do,,} US, Canada, Asia-Pacific,
2519and Latin-America.
f42974dc
DW
2520@end ifnothtml
2521@item
f401d0f5 2522@uref{http://europe.itrc.hp.com/service/home/home.do,,} Europe.
f42974dc
DW
2523@end itemize
2524
2aea0b53
ZW
2525The HP assembler on these systems has some problems. Most notably the
2526assembler inserts timestamps into each object file it creates, causing
2527the 3-stage comparison test to fail during a @samp{make bootstrap}.
2528You should be able to continue by saying @samp{make all} after getting
2529the failure from @samp{make bootstrap}.
f42974dc
DW
2530
2531
2532@html
b8db17af 2533<hr />
f42974dc 2534@end html
ef88b07d 2535@heading @anchor{hppa*-hp-hpux11}hppa*-hp-hpux11
f42974dc 2536
08b3d104
JDA
2537GCC 3.0 and up support HP-UX 11. On 64-bit capable systems, there
2538are two distinct ports. The @samp{hppa2.0w-hp-hpux11*} port generates
2539code for the 32-bit pa-risc runtime architecture. It uses the HP
f269f54f
JDA
2540linker. The @samp{hppa64-hp-hpux11*} port generates 64-bit code for the
2541pa-risc 2.0 architecture. The script config.guess now selects the port
2542type based on the type compiler detected during configuration. You must
2543set your @env{PATH} or define @env{CC} so that configure finds an appropriate
2544compiler for the initial bootstrap. Different prefixes must be used if
2545both ports are to be installed on the same system.
2546
f401d0f5
JDA
2547It is best to explicitly configure the @samp{hppa64-hp-hpux11*} target
2548with the @option{--with-ld=@dots{}} option. We support both the HP
2549and GNU linkers for this target. The two linkers require different
2550link commands. Thus, it's not possible to switch linkers during a
2551GCC build. This has been been reported to occur in a unified build
2552of binutils and GCC.
2553
f269f54f
JDA
2554GCC 2.95.x is not supported under HP-UX 11 and cannot be used to
2555compile GCC 3.0 and up. Refer to @uref{binaries.html,,binaries} for
2556information about obtaining precompiled GCC binaries for HP-UX.
08b3d104
JDA
2557
2558You must use GNU binutils 2.11 or above with the 32-bit port. Thread
2559support is not currently implemented, so @option{--enable-threads} does
8c085f6f
JJ
2560not work. See:
2561
2562@itemize
2563@item @uref{http://gcc.gnu.org/ml/gcc-prs/2002-01/msg00551.html}
2564@item @uref{http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00663.html}
2565@end itemize
2566
f269f54f
JDA
2567GCC 3.3 and later support weak symbols on the 32-bit port using SOM
2568secondary definition symbols. This feature is not enabled for earlier
2569versions of HP-UX since there have been bugs in the linker support for
2570secondary symbols. The HP linker patches @code{PHSS_26559} and
2571@code{PHSS_24304} for HP-UX 11.00 and 11.11, respectively, correct the
2572problem of linker core dumps creating C++ libraries. Earlier patches
2573may work but they have not been tested.
2574
2575GCC 3.3 nows uses the ELF DT_INIT_ARRAY and DT_FINI_ARRAY capability
2576to run initializers and finalizers on the 64-bit port. The feature
2577requires CVS binutils as of January 2, 2003, or a subsequent release
2578to correct a problem arising from HP's non-standard use of the .init
2579and .fini sections. The 32-bit port uses the linker @option{+init}
2580and @option{+fini} options. As with the support for secondary symbols,
2581there have been bugs in the order in which these options are executed
2582by the HP linker. So, again a recent linker patch is recommended.
2583
2584The HP assembler has many limitations and is not recommended for either
2585the 32 or 64-bit ports. For example, it does not support weak symbols
2586or alias definitions. As a result, explicit template instantiations
f401d0f5
JDA
2587are required when using C++. This will make it difficult if not
2588impossible to build many C++ applications. You also can't generate
2589debugging information when using the HP assembler with GCC.
2590
2591There are a number of issues to consider in selecting which linker to
2592use with the 64-bit port. The GNU 64-bit linker can only create dynamic
2593binaries. The @option{-static} option causes linking with archive
2594libraries but doesn't produce a truly static binary. Dynamic binaries
2595still require final binding by the dynamic loader to resolve a set of
2596dynamic-loader-defined symbols. The default behavior of the HP linker
2597is the same as the GNU linker. However, it can generate true 64-bit
2598static binaries using the @option{+compat} option.
2599
2600The HP 64-bit linker doesn't support linkonce semantics. As a
2601result, C++ programs have many more sections than they should.
2602
2603The GNU 64-bit linker has some issues with shared library support
2604and exceptions. As a result, we only support libgcc in archive
2605format. For similar reasons, dwarf2 unwind and exception support
2606are disabled. The GNU linker also has problems creating binaries
2607with @option{-static}. It doesn't provide stubs for internal
2608calls to global functions in shared libraries, so these calls
2609can't be overloaded.
581d9404
JDA
2610
2611There are several possible approaches to building the distribution.
2612Binutils can be built first using the HP tools. Then, the GCC
2613distribution can be built. The second approach is to build GCC
2614first using the HP tools, then build binutils, then rebuild GCC.
2615There have been problems with various binary distributions, so
2616it is best not to start from a binary distribution.
2617
2aea0b53
ZW
2618Starting with GCC 3.4 an ISO C compiler is required to bootstrap.
2619The bundled compiler supports only traditional C; you will need
2620either HP's unbundled compiler, or a binary distribution of GCC@.
581d9404
JDA
2621
2622This port still is undergoing significant development.
08b3d104 2623
b8df899a 2624@html
b8db17af 2625<hr />
b8df899a
JM
2626@end html
2627@heading @anchor{i370-*-*}i370-*-*
2628This port is very preliminary and has many known bugs. We hope to
2629have a higher-quality port for this machine soon.
2630
f42974dc 2631@html
b8db17af 2632<hr />
f42974dc 2633@end html
ef88b07d 2634@heading @anchor{*-*-linux-gnu}*-*-linux-gnu
f42974dc 2635
9e80ada7
PE
2636Versions of libstdc++-v3 starting with 3.2.1 require bugfixes present
2637in glibc 2.2.5 and later. More information is available in the
2638libstdc++-v3 documentation.
2639
b8df899a 2640@html
b8db17af 2641<hr />
b8df899a
JM
2642@end html
2643@heading @anchor{ix86-*-linux*aout}i?86-*-linux*aout
2644Use this configuration to generate @file{a.out} binaries on Linux-based
41ca24de 2645GNU systems. This configuration is being superseded.
b8df899a 2646
f42974dc 2647@html
b8db17af 2648<hr />
f42974dc 2649@end html
ef88b07d 2650@heading @anchor{ix86-*-linux*}i?86-*-linux*
f42974dc 2651
1ea6f4c8
DH
2652As of GCC 3.3, binutils 2.13.1 or later is required for this platform.
2653See @uref{http://gcc.gnu.org/PR10877,,bug 10877} for more information.
f42974dc
DW
2654
2655If you receive Signal 11 errors when building on GNU/Linux, then it is
2656possible you have a hardware problem. Further information on this can be
2657found on @uref{http://www.bitwizard.nl/sig11/,,www.bitwizard.nl}.
2658
2659@html
b8db17af 2660<hr />
f42974dc 2661@end html
ef88b07d 2662@heading @anchor{ix86-*-sco3.2v5*}i?86-*-sco3.2v5*
b8df899a 2663Use this for the SCO OpenServer Release 5 family of operating systems.
f42974dc
DW
2664
2665Unlike earlier versions of GCC, the ability to generate COFF with this
2666target is no longer provided.
2667
021c4bfd 2668Earlier versions of GCC emitted DWARF 1 when generating ELF to allow
f42974dc 2669the system debugger to be used. That support was too burdensome to
021c4bfd 2670maintain. GCC now emits only DWARF 2 for this target. This means you
f42974dc 2671may use either the UDK debugger or GDB to debug programs built by this
161d7b59 2672version of GCC@.
f42974dc 2673
ac24fc99
KJ
2674GCC is now only supported on releases 5.0.4 and later, and requires that
2675you install Support Level Supplement OSS646B or later, and Support Level
2676Supplement OSS631C or later. If you are using release 5.0.7 of
2677OpenServer, you must have at least the first maintenance pack installed
2678(this includes the relevant portions of OSS646). OSS646, also known as
2679the "Execution Environment Update", provides updated link editors and
2680assemblers, as well as updated standard C and math libraries. The C
2681startup modules are also updated to support the System V gABI draft, and
0b4be7de 2682GCC relies on that behavior. OSS631 provides a collection of commonly
ac24fc99
KJ
2683used open source libraries, some of which GCC depends on (such as GNU
2684gettext and zlib). SCO OpenServer Release 5.0.7 has all of this built
2685in by default, but OSS631C and later also apply to that release. Please
2686visit
2687@uref{ftp://ftp.sco.com/pub/openserver5,,ftp://ftp.sco.com/pub/openserver5}
2688for the latest versions of these (and other potentially useful)
2689supplements.
2690
2691Although there is support for using the native assembler, it is
2692recommended that you configure GCC to use the GNU assembler. You do
2693this by using the flags
2694@uref{./configure.html#with-gnu-as,,@option{--with-gnu-as}}. You should
2695use a modern version of GNU binutils. Version 2.13.2.1 was used for all
2696testing. In general, only the @option{--with-gnu-as} option is tested.
2697A modern bintuils (as well as a plethora of other development related
2698GNU utilities) can be found in Support Level Supplement OSS658A, the
2699"GNU Development Tools" package. See the SCO web and ftp sites for details.
2700That package also contains the currently "officially supported" version of
daf2f129 2701GCC, version 2.95.3. It is useful for bootstrapping this version.
f42974dc 2702
f42974dc 2703@html
b8db17af 2704<hr />
f42974dc 2705@end html
ef88b07d 2706@heading @anchor{ix86-*-udk}i?86-*-udk
f42974dc
DW
2707
2708This target emulates the SCO Universal Development Kit and requires that
f9047ed3
JM
2709package be installed. (If it is installed, you will have a
2710@file{/udk/usr/ccs/bin/cc} file present.) It's very much like the
b953cc4b 2711@samp{i?86-*-unixware7*} target
f42974dc
DW
2712but is meant to be used when hosting on a system where UDK isn't the
2713default compiler such as OpenServer 5 or Unixware 2. This target will
f9047ed3 2714generate binaries that will run on OpenServer, Unixware 2, or Unixware 7,
161d7b59 2715with the same warnings and caveats as the SCO UDK@.
f42974dc 2716
f42974dc
DW
2717This target is a little tricky to build because we have to distinguish
2718it from the native tools (so it gets headers, startups, and libraries
f9047ed3 2719from the right place) while making the tools not think we're actually
f42974dc
DW
2720building a cross compiler. The easiest way to do this is with a configure
2721command like this:
2722
3ab51846 2723@smallexample
8c085f6f
JJ
2724 CC=/udk/usr/ccs/bin/cc @var{/your/path/to}/gcc/configure \
2725 --host=i686-pc-udk --target=i686-pc-udk --program-prefix=udk-
3ab51846 2726@end smallexample
f42974dc 2727
6cfb3f16 2728@emph{You should substitute @samp{i686} in the above command with the appropriate
f42974dc
DW
2729processor for your host.}
2730
021c4bfd
RO
2731After the usual @samp{make bootstrap} and
2732@samp{make install}, you can then access the UDK-targeted GCC
38209993
LG
2733tools by adding @command{udk-} before the commonly known name. For
2734example, to invoke the C compiler, you would use @command{udk-gcc}.
2735They will coexist peacefully with any native-target GCC tools you may
2736have installed.
f42974dc
DW
2737
2738
b499d9ab 2739@html
b8db17af 2740<hr />
b499d9ab
JJ
2741@end html
2742@heading @anchor{ia64-*-linux}ia64-*-linux
2743IA-64 processor (also known as IPF, or Itanium Processor Family)
2744running GNU/Linux.
2745
bcd11e5e
JW
2746If you are using the optional libunwind library, then you must use
2747libunwind 0.96 or later.
2748
b499d9ab
JJ
2749None of the following versions of GCC has an ABI that is compatible
2750with any of the other versions in this list, with the exception that
2751Red Hat 2.96 and Trillian 000171 are compatible with each other:
41ca24de 27523.1, 3.0.2, 3.0.1, 3.0, Red Hat 2.96, and Trillian 000717.
b499d9ab 2753This primarily affects C++ programs and programs that create shared libraries.
41ca24de
DH
2754GCC 3.1 or later is recommended for compiling linux, the kernel.
2755As of version 3.1 GCC is believed to be fully ABI compliant, and hence no
2756more major ABI changes are expected.
b499d9ab 2757
959a73a4
DH
2758@html
2759<hr />
2760@end html
2761@heading @anchor{ia64-*-hpux*}ia64-*-hpux*
2762Building GCC on this target requires the GNU Assembler. The bundled HP
2763assembler will not work. To prevent GCC from using the wrong assembler,
2764the option @option{--with-gnu-as} may be necessary.
2765
2766The GCC libunwind library has not been ported to HPUX. This means that for
2767GCC versions 3.2.3 and earlier, @option{--enable-libunwind-exceptions}
2768is required to build GCC. For GCC 3.3 and later, this is the default.
2769
f42974dc 2770@html
b8db17af 2771<hr />
f42974dc
DW
2772<!-- rs6000-ibm-aix*, powerpc-ibm-aix* -->
2773@end html
ef88b07d 2774@heading @anchor{*-ibm-aix*}*-ibm-aix*
6a1dbbaf 2775Support for AIX version 3 and older was discontinued in GCC 3.4.
f42974dc 2776
41ca24de 2777AIX Make frequently has problems with GCC makefiles. GNU Make 3.79.1 or
f42974dc
DW
2778newer is recommended to build on this platform.
2779
6cfb3f16 2780Errors involving @code{alloca} when building GCC generally are due
021c4bfd 2781to an incorrect definition of @code{CC} in the Makefile or mixing files
161d7b59 2782compiled with the native C compiler and GCC@. During the stage1 phase of
6cfb3f16
JM
2783the build, the native AIX compiler @strong{must} be invoked as @command{cc}
2784(not @command{xlc}). Once @command{configure} has been informed of
2785@command{xlc}, one needs to use @samp{make distclean} to remove the
38209993 2786configure cache files and ensure that @env{CC} environment variable
f42974dc
DW
2787does not provide a definition that will confuse @command{configure}.
2788If this error occurs during stage2 or later, then the problem most likely
2789is the version of Make (see above).
2790
f0483418
DE
2791The native @command{as} and @command{ld} are recommended for bootstrapping
2792on AIX 4 and required for bootstrapping on AIX 5L. The GNU Assembler
2793reports that it supports WEAK symbols on AIX 4, which causes GCC to try to
2794utilize weak symbol functionality although it is not supported. The GNU
2795Assembler and Linker do not support AIX 5L sufficiently to bootstrap GCC.
2796The native AIX tools do interoperate with GCC@.
df002c7d 2797
04d2be8e 2798Building @file{libstdc++.a} requires a fix for an AIX Assembler bug
2705baf5
DE
2799APAR IY26685 (AIX 4.3) or APAR IY25528 (AIX 5.1).
2800
fdf68669
DE
2801@samp{libstdc++} in GCC 3.2 increments the major version number of the
2802shared object and GCC installation places the @file{libstdc++.a}
2803shared library in a common location which will overwrite the GCC 3.1
2804version of the shared library. Applications either need to be
2805re-linked against the new shared library or the GCC 3.1 version of the
2806@samp{libstdc++} shared object needs to be available to the AIX
2807runtime loader. The GCC 3.1 @samp{libstdc++.so.4} shared object can
2808be installed for runtime dynamic loading using the following steps to
2809set the @samp{F_LOADONLY} flag in the shared object for @emph{each}
2810multilib @file{libstdc++.a} installed:
2811
2812Extract the shared object from each the GCC 3.1 @file{libstdc++.a}
2813archive:
3ab51846 2814@smallexample
35fb4cf6 2815 % ar -x libstdc++.a libstdc++.so.4
3ab51846 2816@end smallexample
fdf68669
DE
2817
2818Enable the @samp{F_LOADONLY} flag so that the shared object will be
2819available for runtime dynamic loading, but not linking:
3ab51846 2820@smallexample
fdf68669 2821 % strip -e libstdc++.so.4
3ab51846 2822@end smallexample
fdf68669
DE
2823
2824Archive the runtime-only shared object in the GCC 3.2
2825@file{libstdc++.a} archive:
3ab51846 2826@smallexample
35fb4cf6 2827 % ar -q libstdc++.a libstdc++.so.4
3ab51846 2828@end smallexample
fdf68669 2829
df002c7d
DE
2830Linking executables and shared libraries may produce warnings of
2831duplicate symbols. The assembly files generated by GCC for AIX always
2832have included multiple symbol definitions for certain global variable
2833and function declarations in the original program. The warnings should
2834not prevent the linker from producing a correct library or runnable
2835executable.
2836
6cfb3f16 2837AIX 4.3 utilizes a ``large format'' archive to support both 32-bit and
df002c7d
DE
283864-bit object modules. The routines provided in AIX 4.3.0 and AIX 4.3.1
2839to parse archive libraries did not handle the new format correctly.
2840These routines are used by GCC and result in error messages during
6cfb3f16 2841linking such as ``not a COFF file''. The version of the routines shipped
df002c7d
DE
2842with AIX 4.3.1 should work for a 32-bit environment. The @option{-g}
2843option of the archive command may be used to create archives of 32-bit
6cfb3f16 2844objects using the original ``small format''. A correct version of the
d5d8d540 2845routines is shipped with AIX 4.3.2 and above.
df002c7d 2846
f42974dc
DW
2847Some versions of the AIX binder (linker) can fail with a relocation
2848overflow severe error when the @option{-bbigtoc} option is used to link
161d7b59 2849GCC-produced object files into an executable that overflows the TOC@. A fix
f42974dc
DW
2850for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND -BBIGTOC) is
2851available from IBM Customer Support and from its
d5d8d540 2852@uref{http://techsupport.services.ibm.com/,,techsupport.services.ibm.com}
f42974dc
DW
2853website as PTF U455193.
2854
df002c7d 2855The AIX 4.3.2.1 linker (bos.rte.bind_cmds Level 4.3.2.1) will dump core
161d7b59 2856with a segmentation fault when invoked by any version of GCC@. A fix for
df002c7d 2857APAR IX87327 is available from IBM Customer Support and from its
d5d8d540 2858@uref{http://techsupport.services.ibm.com/,,techsupport.services.ibm.com}
df002c7d 2859website as PTF U461879. This fix is incorporated in AIX 4.3.3 and above.
f42974dc
DW
2860
2861The initial assembler shipped with AIX 4.3.0 generates incorrect object
2862files. A fix for APAR IX74254 (64BIT DISASSEMBLED OUTPUT FROM COMPILER FAILS
2863TO ASSEMBLE/BIND) is available from IBM Customer Support and from its
d5d8d540 2864@uref{http://techsupport.services.ibm.com/,,techsupport.services.ibm.com}
f42974dc
DW
2865website as PTF U453956. This fix is incorporated in AIX 4.3.1 and above.
2866
161d7b59 2867AIX provides National Language Support (NLS)@. Compilers and assemblers
df002c7d 2868use NLS to support locale-specific representations of various data
6cfb3f16 2869formats including floating-point numbers (e.g., @samp{.} vs @samp{,} for
df002c7d
DE
2870separating decimal fractions). There have been problems reported where
2871GCC does not produce the same floating-point formats that the assembler
c771326b 2872expects. If one encounters this problem, set the @env{LANG}
6cfb3f16 2873environment variable to @samp{C} or @samp{En_US}.
f42974dc 2874
5791e6da
DE
2875By default, GCC for AIX 4.1 and above produces code that can be used on
2876both Power or PowerPC processors.
2877
d5d8d540
DE
2878A default can be specified with the @option{-mcpu=@var{cpu_type}}
2879switch and using the configure option @option{--with-cpu-@var{cpu_type}}.
f42974dc 2880
e3223ea2 2881@html
b8db17af 2882<hr />
e3223ea2
DC
2883@end html
2884@heading @anchor{ip2k-*-elf}ip2k-*-elf
2885Ubicom IP2022 micro controller.
2886This configuration is intended for embedded systems.
2887There are no standard Unix configurations.
2888
2889Use @samp{configure --target=ip2k-elf --enable-languages=c} to configure GCC@.
2890
6b3d1e47
SC
2891@html
2892<hr />
2893@end html
2894@heading @anchor{iq2000-*-elf}iq2000-*-elf
2895Vitesse IQ2000 processors. These are used in embedded
2896applications. There are no standard Unix configurations.
2897
b8df899a 2898@html
b8db17af 2899<hr />
b8df899a
JM
2900@end html
2901@heading @anchor{m32r-*-elf}m32r-*-elf
25f47a4c 2902Renesas M32R processor.
b8df899a
JM
2903This configuration is intended for embedded systems.
2904
b8df899a 2905@html
b8db17af 2906<hr />
b8df899a
JM
2907@end html
2908@heading @anchor{m6811-elf}m6811-elf
2909Motorola 68HC11 family micro controllers. These are used in embedded
2910applications. There are no standard Unix configurations.
2911
2912@html
b8db17af 2913<hr />
b8df899a
JM
2914@end html
2915@heading @anchor{m6812-elf}m6812-elf
2916Motorola 68HC12 family micro controllers. These are used in embedded
2917applications. There are no standard Unix configurations.
2918
b8df899a 2919@html
b8db17af 2920<hr />
b8df899a
JM
2921@end html
2922@heading @anchor{m68k-hp-hpux}m68k-hp-hpux
161d7b59
JM
2923HP 9000 series 300 or 400 running HP-UX@. HP-UX version 8.0 has a bug in
2924the assembler that prevents compilation of GCC@. This
b8df899a
JM
2925bug manifests itself during the first stage of compilation, while
2926building @file{libgcc2.a}:
2927
2928@smallexample
2929_floatdisf
2930cc1: warning: `-g' option not supported on this version of GCC
2931cc1: warning: `-g1' option not supported on this version of GCC
2932./xgcc: Internal compiler error: program as got fatal signal 11
2933@end smallexample
2934
2935A patched version of the assembler is available as the file
2936@uref{ftp://altdorf.ai.mit.edu/archive/cph/hpux-8.0-assembler}. If you
2937have HP software support, the patch can also be obtained directly from
2938HP, as described in the following note:
2939
2940@quotation
2941This is the patched assembler, to patch SR#1653-010439, where the
2942assembler aborts on floating point constants.
2943
2944The bug is not really in the assembler, but in the shared library
2945version of the function ``cvtnum(3c)''. The bug on ``cvtnum(3c)'' is
2946SR#4701-078451. Anyway, the attached assembler uses the archive
2947library version of ``cvtnum(3c)'' and thus does not exhibit the bug.
2948@end quotation
2949
2950This patch is also known as PHCO_4484.
2951
41ca24de 2952In addition gdb does not understand that native HP-UX format, so
b8df899a
JM
2953you must use gas if you wish to use gdb.
2954
2955On HP-UX version 8.05, but not on 8.07 or more recent versions, the
7ba4ca63 2956@command{fixproto} shell script triggers a bug in the system shell. If you
b8df899a 2957encounter this problem, upgrade your operating system or use BASH (the
7ba4ca63 2958GNU shell) to run @command{fixproto}. This bug will cause the fixproto
b8df899a
JM
2959program to report an error of the form:
2960
3ab51846 2961@smallexample
b8df899a 2962./fixproto: sh internal 1K buffer overflow
3ab51846 2963@end smallexample
b8df899a
JM
2964
2965To fix this, you can also change the first line of the fixproto script
2966to look like:
2967
3ab51846 2968@smallexample
b8df899a 2969#!/bin/ksh
3ab51846 2970@end smallexample
b8df899a 2971
b8df899a 2972@html
b8db17af 2973<hr />
b8df899a
JM
2974@end html
2975@heading @anchor{mips-*-*}mips-*-*
b8df899a
JM
2976If on a MIPS system you get an error message saying ``does not have gp
2977sections for all it's [sic] sectons [sic]'', don't worry about it. This
2978happens whenever you use GAS with the MIPS linker, but there is not
2979really anything wrong, and it is okay to use the output file. You can
2980stop such warnings by installing the GNU linker.
2981
2982It would be nice to extend GAS to produce the gp tables, but they are
2983optional, and there should not be a warning about their absence.
2984
26979a17
PE
2985The libstdc++ atomic locking routines for MIPS targets requires MIPS II
2986and later. A patch went in just after the GCC 3.3 release to
2987make @samp{mips*-*-*} use the generic implementation instead. You can also
2988configure for @samp{mipsel-elf} as a workaround. The
2989@samp{mips*-*-linux*} target continues to use the MIPS II routines. More
2990work on this is expected in future releases.
2991
01e97976
JM
2992Cross-compilers for the Mips as target using the Mips assembler
2993currently do not work, because the auxiliary programs
2994@file{mips-tdump.c} and @file{mips-tfile.c} can't be compiled on
2995anything but a Mips. It does work to cross compile for a Mips
2996if you use the GNU assembler and linker.
2997
5fb57097
EB
2998@html
2999<hr />
3000@end html
b953cc4b
RO
3001@heading @anchor{mips-sgi-irix5}mips-sgi-irix5
3002
3003This configuration has considerable problems, which will be fixed in a
3004future release.
f42974dc 3005
213ba345
RO
3006In order to compile GCC on an SGI running IRIX 5, the ``compiler_dev.hdr''
3007subsystem must be installed from the IDO CD-ROM supplied by Silicon
3008Graphics. It is also available for download from
3009@uref{http://www.sgi.com/developers/devtools/apis/ido.html,,http://www.sgi.com/developers/devtools/apis/ido.html}.
f42974dc 3010
7ba4ca63 3011@samp{make compare} may fail on version 5 of IRIX unless you add
213ba345
RO
3012@option{-save-temps} to @code{CFLAGS}. On these systems, the name of the
3013assembler input file is stored in the object file, and that makes
3014comparison fail if it differs between the @code{stage1} and
3015@code{stage2} compilations. The option @option{-save-temps} forces a
3016fixed name to be used for the assembler input file, instead of a
3017randomly chosen name in @file{/tmp}. Do not add @option{-save-temps}
3018unless the comparisons fail without that option. If you do you
3019@option{-save-temps}, you will have to manually delete the @samp{.i} and
3020@samp{.s} files after each series of compilations.
f42974dc 3021
213ba345
RO
3022If you use the MIPS C compiler to bootstrap, it may be necessary
3023to increase its table size for switch statements with the
3024@option{-Wf,-XNg1500} option. If you use the @option{-O2}
3025optimization option, you also need to use @option{-Olimit 3000}.
f42974dc 3026
b953cc4b 3027To enable debugging under IRIX 5, you must use GNU @command{as} 2.11.2
f282ffb3 3028or later,
213ba345
RO
3029and use the @option{--with-gnu-as} configure option when configuring GCC.
3030GNU @command{as} is distributed as part of the binutils package.
f282ffb3 3031When using release 2.11.2, you need to apply a patch
b953cc4b
RO
3032@uref{http://sources.redhat.com/ml/binutils/2001-07/msg00352.html,,http://sources.redhat.com/ml/binutils/2001-07/msg00352.html}
3033which will be included in the next release of binutils.
f42974dc 3034
213ba345
RO
3035When building GCC, the build process loops rebuilding @command{cc1} over
3036and over again. This happens on @samp{mips-sgi-irix5.2}, and possibly
3037other platforms. It has been reported that this is a known bug in the
3038@command{make} shipped with IRIX 5.2. We recommend you use GNU
3039@command{make} instead of the vendor supplied @command{make} program;
3040however, you may have success with @command{smake} on IRIX 5.2 if you do
3041not have GNU @command{make} available.
f42974dc
DW
3042
3043@html
b8db17af 3044<hr />
f42974dc 3045@end html
b953cc4b 3046@heading @anchor{mips-sgi-irix6}mips-sgi-irix6
f42974dc 3047
213ba345 3048If you are using IRIX @command{cc} as your bootstrap compiler, you must
f42974dc
DW
3049ensure that the N32 ABI is in use. To test this, compile a simple C
3050file with @command{cc} and then run @command{file} on the
3051resulting object file. The output should look like:
3052
3ab51846 3053@smallexample
213ba345 3054test.o: ELF N32 MSB @dots{}
3ab51846 3055@end smallexample
f42974dc
DW
3056
3057If you see:
213ba345 3058
3ab51846 3059@smallexample
213ba345 3060test.o: ELF 32-bit MSB @dots{}
3ab51846 3061@end smallexample
213ba345
RO
3062
3063or
3064
3ab51846 3065@smallexample
213ba345 3066test.o: ELF 64-bit MSB @dots{}
3ab51846 3067@end smallexample
f42974dc 3068
213ba345 3069then your version of @command{cc} uses the O32 or N64 ABI by default. You
38209993 3070should set the environment variable @env{CC} to @samp{cc -n32}
161d7b59 3071before configuring GCC@.
f42974dc 3072
0fca60ab
RO
3073If you want the resulting @command{gcc} to run on old 32-bit systems
3074with the MIPS R4400 CPU, you need to ensure that only code for the mips3
3075instruction set architecture (ISA) is generated. While GCC 3.x does
3076this correctly, both GCC 2.95 and SGI's MIPSpro @command{cc} may change
3077the ISA depending on the machine where GCC is built. Using one of them
3078as the bootstrap compiler may result in mips4 code, which won't run at
3079all on mips3-only systems. For the test program above, you should see:
3080
3ab51846 3081@smallexample
0fca60ab 3082test.o: ELF N32 MSB mips-3 @dots{}
3ab51846 3083@end smallexample
0fca60ab
RO
3084
3085If you get:
3086
3ab51846 3087@smallexample
0fca60ab 3088test.o: ELF N32 MSB mips-4 @dots{}
3ab51846 3089@end smallexample
0fca60ab
RO
3090
3091instead, you should set the environment variable @env{CC} to @samp{cc
3092-n32 -mips3} or @samp{gcc -mips3} respectively before configuring GCC@.
3093
213ba345
RO
3094GCC on IRIX 6 is usually built to support both the N32 and N64 ABIs. If
3095you build GCC on a system that doesn't have the N64 libraries installed,
3096you need to configure with @option{--disable-multilib} so GCC doesn't
3097try to use them. Look for @file{/usr/lib64/libc.so.1} to see if you
3098have the 64-bit libraries installed.
3099
3100You must @emph{not} use GNU @command{as} (which isn't built anyway as of
3101binutils 2.11.2) on IRIX 6 platforms; doing so will only cause problems.
3102
f42974dc 3103GCC does not currently support generating O32 ABI binaries in the
b953cc4b 3104@samp{mips-sgi-irix6} configurations. It is possible to create a GCC
213ba345 3105with O32 ABI only support by configuring it for the @samp{mips-sgi-irix5}
b953cc4b
RO
3106target and using a patched GNU @command{as} 2.11.2 as documented in the
3107@uref{#mips-sgi-irix5,,@samp{mips-sgi-irix5}} section above. Using the
3108native assembler requires patches to GCC which will be included in a
3109future release. It is
213ba345 3110expected that O32 ABI support will be available again in a future release.
f42974dc 3111
b953cc4b
RO
3112The @option{--enable-threads} option doesn't currently work, a patch is
3113in preparation for a future release. The @option{--enable-libgcj}
3114option is disabled by default: IRIX 6 uses a very low default limit
3115(20480) for the command line length. Although libtool contains a
3116workaround for this problem, at least the N64 @samp{libgcj} is known not
3117to build despite this, running into an internal error of the native
3118@command{ld}. A sure fix is to increase this limit (@samp{ncargs}) to
3119its maximum of 262144 bytes. If you have root access, you can use the
3120@command{systune} command to do this.
3121
f42974dc 3122GCC does not correctly pass/return structures which are
767094dd
JM
3123smaller than 16 bytes and which are not 8 bytes. The problem is very
3124involved and difficult to fix. It affects a number of other targets also,
57694e40 3125but IRIX 6 is affected the most, because it is a 64-bit target, and 4 byte
767094dd 3126structures are common. The exact problem is that structures are being padded
e979f9e8 3127at the wrong end, e.g.@: a 4 byte structure is loaded into the lower 4 bytes
f42974dc
DW
3128of the register when it should be loaded into the upper 4 bytes of the
3129register.
3130
3131GCC is consistent with itself, but not consistent with the SGI C compiler
3132(and the SGI supplied runtime libraries), so the only failures that can
3133happen are when there are library functions that take/return such
213ba345
RO
3134structures. There are very few such library functions. Currently this
3135is known to affect @code{inet_ntoa}, @code{inet_lnaof},
46d2e8d7
RO
3136@code{inet_netof}, @code{inet_makeaddr}, and @code{semctl}. Until the
3137bug is fixed, GCC contains workarounds for the known affected functions.
f42974dc 3138
3aa8219e
GP
3139See @uref{http://freeware.sgi.com/,,http://freeware.sgi.com/} for more
3140information about using GCC on IRIX platforms.
f42974dc 3141
b8df899a 3142@html
b8db17af 3143<hr />
b8df899a 3144@end html
021c4bfd 3145@heading @anchor{powerpc*-*-*}powerpc-*-*
b8df899a 3146
6cfb3f16
JM
3147You can specify a default version for the @option{-mcpu=@var{cpu_type}}
3148switch by using the configure option @option{--with-cpu-@var{cpu_type}}.
b8df899a 3149
4f2b1139 3150@html
b8db17af 3151<hr />
4f2b1139
SS
3152@end html
3153@heading @anchor{powerpc-*-darwin*}powerpc-*-darwin*
3154PowerPC running Darwin (Mac OS X kernel).
3155
4f2b1139
SS
3156Pre-installed versions of Mac OS X may not include any developer tools,
3157meaning that you will not be able to build GCC from source. Tool
3158binaries are available at
11292480 3159@uref{http://developer.apple.com/tools/compilers.html} (free
4f2b1139
SS
3160registration required).
3161
b89a3806
GK
3162The default stack limit of 512K is too small, which may cause compiles
3163to fail with 'Bus error'. Set the stack larger, for instance
3164by doing @samp{limit stack 800}. It's a good idea to use the GNU
3165preprocessor instead of Apple's @file{cpp-precomp} during the first stage of
3166bootstrapping; this is automatic when doing @samp{make bootstrap}, but
3167to do it from the toplevel objdir you will need to say @samp{make
3168CC='cc -no-cpp-precomp' bootstrap}.
3169
3170The version of GCC shipped by Apple typically includes a number of
3171extensions not available in a standard GCC release. These extensions
3172are generally specific to Mac programming.
4f2b1139 3173
021c4bfd 3174@html
b8db17af 3175<hr />
021c4bfd
RO
3176@end html
3177@heading @anchor{powerpc-*-elf}powerpc-*-elf, powerpc-*-sysv4
3178PowerPC system in big endian mode, running System V.4.
3179
f42974dc 3180@html
b8db17af 3181<hr />
f42974dc 3182@end html
ef88b07d 3183@heading @anchor{powerpc-*-linux-gnu*}powerpc-*-linux-gnu*
f42974dc 3184
f9047ed3 3185You will need
e8a7b0c2 3186@uref{ftp://ftp.kernel.org/pub/linux/devel/binutils,,binutils 2.13.90.0.10}
791a949f 3187or newer for a working GCC@.
f42974dc 3188
edf1b3f3 3189@html
b8db17af 3190<hr />
edf1b3f3
AC
3191@end html
3192@heading @anchor{powerpc-*-netbsd*}powerpc-*-netbsd*
3193PowerPC system in big endian mode running NetBSD@. To build the
a38f87a9 3194documentation you will need Texinfo version 4.2 (NetBSD 1.5.1 included
edf1b3f3
AC
3195Texinfo version 3.12).
3196
b8df899a 3197@html
b8db17af 3198<hr />
b8df899a
JM
3199@end html
3200@heading @anchor{powerpc-*-eabisim}powerpc-*-eabisim
3201Embedded PowerPC system in big endian mode for use in running under the
3202PSIM simulator.
3203
b8df899a 3204@html
b8db17af 3205<hr />
b8df899a
JM
3206@end html
3207@heading @anchor{powerpc-*-eabi}powerpc-*-eabi
3208Embedded PowerPC system in big endian mode.
3209
b8df899a 3210@html
b8db17af 3211<hr />
b8df899a
JM
3212@end html
3213@heading @anchor{powerpcle-*-elf}powerpcle-*-elf, powerpcle-*-sysv4
3214PowerPC system in little endian mode, running System V.4.
3215
b8df899a 3216@html
b8db17af 3217<hr />
b8df899a
JM
3218@end html
3219@heading @anchor{powerpcle-*-eabisim}powerpcle-*-eabisim
3220Embedded PowerPC system in little endian mode for use in running under
3221the PSIM simulator.
3222
3223@html
b8db17af 3224<hr />
b8df899a
JM
3225@end html
3226@heading @anchor{powerpcle-*-eabi}powerpcle-*-eabi
3227Embedded PowerPC system in little endian mode.
3228
91abf72d 3229@html
b8db17af 3230<hr />
91abf72d
HP
3231@end html
3232@heading @anchor{s390-*-linux*}s390-*-linux*
95fef11f 3233S/390 system running GNU/Linux for S/390@.
91abf72d
HP
3234
3235@html
b8db17af 3236<hr />
91abf72d
HP
3237@end html
3238@heading @anchor{s390x-*-linux*}s390x-*-linux*
95fef11f 3239zSeries system (64-bit) running GNU/Linux for zSeries@.
91abf72d 3240
8bf06993
UW
3241@html
3242<hr />
3243@end html
3244@heading @anchor{s390x-ibm-tpf*}s390x-ibm-tpf*
daf2f129 3245zSeries system (64-bit) running TPF. This platform is
8bf06993
UW
3246supported as cross-compilation target only.
3247
f42974dc 3248@html
b8db17af 3249<hr />
f42974dc 3250@end html
250d5688
RO
3251@c Please use Solaris 2 to refer to all release of Solaris, starting
3252@c with 2.0 until 2.6, 7, and 8. Solaris 1 was a marketing name for
3253@c SunOS 4 releases which we don't use to avoid confusion. Solaris
3254@c alone is too unspecific and must be avoided.
3255@heading @anchor{*-*-solaris2*}*-*-solaris2*
f42974dc 3256
250d5688 3257Sun does not ship a C compiler with Solaris 2. To bootstrap and install
dbd210ef
KC
3258GCC you first have to install a pre-built compiler, see our
3259@uref{binaries.html,,binaries page} for details.
f42974dc 3260
250d5688 3261The Solaris 2 @command{/bin/sh} will often fail to configure
92441f83 3262@file{libstdc++-v3}, @file{boehm-gc} or @file{libjava}. We therefore
bc890961
EB
3263recommend to use the following sequence of commands to bootstrap and
3264install GCC:
3265
3266@smallexample
3267 % CONFIG_SHELL=/bin/ksh
3268 % export CONFIG_SHELL
bc890961
EB
3269@end smallexample
3270
1cba0a4e
PE
3271and then proceed as described in @uref{build.html,,the build instructions},
3272where we strongly recommend using GNU make and specifying an absolute path
3273to invoke @var{srcdir}/configure.
e6855a2d 3274
b8df899a 3275Solaris 2 comes with a number of optional OS packages. Some of these
92441f83 3276are needed to use GCC fully, namely @code{SUNWarc},
dbd210ef
KC
3277@code{SUNWbtool}, @code{SUNWesu}, @code{SUNWhea}, @code{SUNWlibm},
3278@code{SUNWsprot}, and @code{SUNWtoo}. If you did not install all
250d5688 3279optional packages when installing Solaris 2, you will need to verify that
b8df899a
JM
3280the packages that GCC needs are installed.
3281
3282To check whether an optional package is installed, use
dbd210ef 3283the @command{pkginfo} command. To add an optional package, use the
250d5688 3284@command{pkgadd} command. For further details, see the Solaris 2
b8df899a
JM
3285documentation.
3286
250d5688 3287Trying to use the linker and other tools in
b8df899a
JM
3288@file{/usr/ucb} to install GCC has been observed to cause trouble.
3289For example, the linker may hang indefinitely. The fix is to remove
250d5688 3290@file{/usr/ucb} from your @env{PATH}.
f42974dc 3291
bc890961
EB
3292The build process works more smoothly with the legacy Sun tools so, if you
3293have @file{/usr/xpg4/bin} in your @env{PATH}, we recommend that you place
3294@file{/usr/bin} before @file{/usr/xpg4/bin} for the duration of the build.
3295
021c4bfd
RO
3296All releases of GNU binutils prior to 2.11.2 have known bugs on this
3297platform. We recommend the use of GNU binutils 2.11.2 or the vendor
3298tools (Sun @command{as}, Sun @command{ld}).
f42974dc 3299
250d5688
RO
3300Sun bug 4296832 turns up when compiling X11 headers with GCC 2.95 or
3301newer: @command{g++} will complain that types are missing. These headers assume
3302that omitting the type means @code{int}; this assumption worked for C89 but
3303is wrong for C++, and is now wrong for C99 also.
3304
13ba36b4 3305@command{g++} accepts such (invalid) constructs with the option
250d5688
RO
3306@option{-fpermissive}; it
3307will assume that any missing type is @code{int} (as defined by C89).
3308
3309There are patches for Solaris 2.6 (105633-56 or newer for SPARC,
3310106248-42 or newer for Intel), Solaris 7 (108376-21 or newer for SPARC,
3311108377-20 for Intel), and Solaris 8 (108652-24 or newer for SPARC,
3312108653-22 for Intel) that fix this bug.
f42974dc 3313
dbd210ef 3314@html
b8db17af 3315<hr />
dbd210ef 3316@end html
250d5688 3317@heading @anchor{sparc-sun-solaris2*}sparc-sun-solaris2*
dbd210ef 3318
1405141b
DN
3319When GCC is configured to use binutils 2.11.2 or later the binaries
3320produced are smaller than the ones produced using Sun's native tools;
3321this difference is quite significant for binaries containing debugging
3322information.
3323
250d5688 3324Sun @command{as} 4.x is broken in that it cannot cope with long symbol names.
dbd210ef
KC
3325A typical error message might look similar to the following:
3326
8c085f6f
JJ
3327@smallexample
3328/usr/ccs/bin/as: "/var/tmp/ccMsw135.s", line 11041: error:
3329 can't compute value of an expression involving an external symbol.
3330@end smallexample
dbd210ef 3331
250d5688
RO
3332This is Sun bug 4237974. This is fixed with patch 108908-02 for Solaris
33332.6 and has been fixed in later (5.x) versions of the assembler,
3334starting with Solaris 7.
dbd210ef 3335
03b272d2 3336Starting with Solaris 7, the operating system is capable of executing
975c6e4e
RO
333764-bit SPARC V9 binaries. GCC 3.1 and later properly supports
3338this; the @option{-m64} option enables 64-bit code generation.
3339However, if all you want is code tuned for the UltraSPARC CPU, you
3340should try the @option{-mtune=ultrasparc} option instead, which produces
3341code that, unlike full 64-bit code, can still run on non-UltraSPARC
edf1c8df 3342machines.
03b272d2 3343
975c6e4e 3344When configuring on a Solaris 7 or later system that is running a kernel
8947df0c
RH
3345that supports only 32-bit binaries, one must configure with
3346@option{--disable-multilib}, since we will not be able to build the
334764-bit target libraries.
3fc602a0 3348
f42974dc 3349@html
b8db17af 3350<hr />
f42974dc 3351@end html
ef88b07d 3352@heading @anchor{sparc-sun-solaris2.7}sparc-sun-solaris2.7
f42974dc 3353
250d5688 3354Sun patch 107058-01 (1999-01-13) for Solaris 7/SPARC triggers a bug in
f42974dc
DW
3355the dynamic linker. This problem (Sun bug 4210064) affects GCC 2.8
3356and later, including all EGCS releases. Sun formerly recommended
3357107058-01 for all Solaris 7 users, but around 1999-09-01 it started to
3358recommend it only for people who use Sun's compilers.
f9047ed3 3359
f42974dc
DW
3360Here are some workarounds to this problem:
3361@itemize @bullet
3362@item
3363Do not install Sun patch 107058-01 until after Sun releases a
3364complete patch for bug 4210064. This is the simplest course to take,
3365unless you must also use Sun's C compiler. Unfortunately 107058-01
250d5688 3366is preinstalled on some new Solaris 7-based hosts, so you may have to
f42974dc 3367back it out.
f9047ed3 3368
f42974dc
DW
3369@item
3370Copy the original, unpatched Solaris 7
3371@command{/usr/ccs/bin/as} into
8e5f33ff 3372@command{/usr/local/libexec/gcc/sparc-sun-solaris2.7/3.4/as},
f42974dc
DW
3373adjusting the latter name to fit your local conventions and software
3374version numbers.
3375
3376@item
3377Install Sun patch 106950-03 (1999-05-25) or later. Nobody with
3378both 107058-01 and 106950-03 installed has reported the bug with GCC
3379and Sun's dynamic linker. This last course of action is riskiest,
3380for two reasons. First, you must install 106950 on all hosts that
3381run code generated by GCC; it doesn't suffice to install it only on
3382the hosts that run GCC itself. Second, Sun says that 106950-03 is
3383only a partial fix for bug 4210064, but Sun doesn't know whether the
161d7b59 3384partial fix is adequate for GCC@. Revision -08 or later should fix
250d5688 3385the bug. The current (as of 2001-09-24) revision is -14, and is included in
f282ffb3 3386the Solaris 7 Recommended Patch Cluster.
f9047ed3 3387@end itemize
f42974dc 3388
fdbf04c8
EB
3389GCC 3.3 triggers a bug in version 5.0 Alpha 03/27/98 of the Sun assembler,
3390which causes a bootstrap failure when linking the 64-bit shared version of
3391libgcc. A typical error message is:
3392
3393@smallexample
3394ld: fatal: relocation error: R_SPARC_32: file libgcc/sparcv9/_muldi3.o:
3395 symbol <unknown>: offset 0xffffffff7ec133e7 is non-aligned.
3396@end smallexample
3397
3398This bug has been fixed in the final 5.0 version of the assembler.
f42974dc 3399
c6fa9728 3400@html
b8db17af 3401<hr />
c6fa9728
JS
3402@end html
3403@heading @anchor{sparc-*-linux*}sparc-*-linux*
3404
3405GCC versions 3.0 and higher require binutils 2.11.2 and glibc 2.2.4
3406or newer on this platform. All earlier binutils and glibc
3407releases mishandled unaligned relocations on @code{sparc-*-*} targets.
3408
3409
f42974dc 3410@html
b8db17af 3411<hr />
f42974dc 3412@end html
0dc7ee3c 3413@heading @anchor{sparc64-*-solaris2*}sparc64-*-solaris2*
e403b4bc
CR
3414
3415The following compiler flags must be specified in the configure
3416step in order to bootstrap this target with the Sun compiler:
3417
3ab51846 3418@smallexample
e403b4bc 3419 % CC="cc -xildoff -xarch=v9" @var{srcdir}/configure [@var{options}] [@var{target}]
3ab51846 3420@end smallexample
e403b4bc
CR
3421
3422@option{-xildoff} turns off the incremental linker, and @option{-xarch=v9}
0dc7ee3c
EB
3423specifies the SPARC-V9 architecture to the Sun linker and assembler.
3424
3425@html
3426<hr />
3427@end html
3428@heading @anchor{sparcv9-*-solaris2*}sparcv9-*-solaris2*
3429
3430This is a synonym for sparc64-*-solaris2*.
f42974dc 3431
b8df899a 3432@html
b8db17af 3433<hr />
b8df899a
JM
3434@end html
3435@heading @anchor{#*-*-sysv*}*-*-sysv*
3436On System V release 3, you may get this error message
3437while linking:
3438
3439@smallexample
3440ld fatal: failed to write symbol name @var{something}
3441 in strings table for file @var{whatever}
3442@end smallexample
3443
021c4bfd 3444This probably indicates that the disk is full or your ulimit won't allow
b8df899a
JM
3445the file to be as large as it needs to be.
3446
3447This problem can also result because the kernel parameter @code{MAXUMEM}
3448is too small. If so, you must regenerate the kernel and make the value
3449much larger. The default value is reported to be 1024; a value of 32768
3450is said to work. Smaller values may also work.
3451
3452On System V, if you get an error like this,
3453
3ab51846 3454@smallexample
b8df899a
JM
3455/usr/local/lib/bison.simple: In function `yyparse':
3456/usr/local/lib/bison.simple:625: virtual memory exhausted
3ab51846 3457@end smallexample
b8df899a
JM
3458
3459@noindent
021c4bfd 3460that too indicates a problem with disk space, ulimit, or @code{MAXUMEM}.
b8df899a 3461
f85b8d1a 3462On a System V release 4 system, make sure @file{/usr/bin} precedes
7ba4ca63 3463@file{/usr/ucb} in @code{PATH}. The @command{cc} command in
f85b8d1a 3464@file{/usr/ucb} uses libraries which have bugs.
b8df899a
JM
3465
3466@html
b8db17af 3467<hr />
b8df899a
JM
3468@end html
3469@heading @anchor{vax-dec-ultrix}vax-dec-ultrix
7ba4ca63 3470Don't try compiling with VAX C (@command{vcc}). It produces incorrect code
b8df899a
JM
3471in some cases (for example, when @code{alloca} is used).
3472
4977bab6
ZW
3473@html
3474<hr />
3475@end html
3476@heading @anchor{*-*-vxworks*}*-*-vxworks*
3477Support for VxWorks is in flux. At present GCC supports @emph{only} the
3478very recent VxWorks 5.5 (aka Tornado 2.2) release, and only on PowerPC.
3479We welcome patches for other architectures supported by VxWorks 5.5.
3480Support for VxWorks AE would also be welcome; we believe this is merely
3481a matter of writing an appropriate ``configlette'' (see below). We are
3482not interested in supporting older, a.out or COFF-based, versions of
3483VxWorks in GCC 3.
3484
3485VxWorks comes with an older version of GCC installed in
3486@file{@var{$WIND_BASE}/host}; we recommend you do not overwrite it.
3487Choose an installation @var{prefix} entirely outside @var{$WIND_BASE}.
3488Before running @command{configure}, create the directories @file{@var{prefix}}
3489and @file{@var{prefix}/bin}. Link or copy the appropriate assembler,
3490linker, etc. into @file{@var{prefix}/bin}, and set your @var{PATH} to
3491include that directory while running both @command{configure} and
3492@command{make}.
3493
3494You must give @command{configure} the
3495@option{--with-headers=@var{$WIND_BASE}/target/h} switch so that it can
3496find the VxWorks system headers. Since VxWorks is a cross compilation
3497target only, you must also specify @option{--target=@var{target}}.
3498@command{configure} will attempt to create the directory
3499@file{@var{prefix}/@var{target}/sys-include} and copy files into it;
3500make sure the user running @command{configure} has sufficient privilege
3501to do so.
3502
3503GCC's exception handling runtime requires a special ``configlette''
3504module, @file{contrib/gthr_supp_vxw_5x.c}. Follow the instructions in
3505that file to add the module to your kernel build. (Future versions of
daf2f129 3506VxWorks will incorporate this module.)
4977bab6 3507
7e081a0c
AJ
3508@html
3509<hr />
3510@end html
3511@heading @anchor{x86_64-*-*}x86_64-*-*, amd64-*-*
3512
3513GCC supports the x86-64 architecture implemented by the AMD64 processor
3514(amd64-*-* is an alias for x86_64-*-*) on GNU/Linux, FreeBSD and NetBSD.
3515On GNU/Linux the default is a bi-arch compiler which is able to generate
3516both 64-bit x86-64 and 32-bit x86 code (via the @option{-m32} switch).
3517
fd29f6ea 3518@html
b8db17af 3519<hr />
fd29f6ea
BW
3520@end html
3521@heading @anchor{xtensa-*-elf}xtensa-*-elf
3522
3523This target is intended for embedded Xtensa systems using the
3524@samp{newlib} C library. It uses ELF but does not support shared
3525objects. Designed-defined instructions specified via the
3526Tensilica Instruction Extension (TIE) language are only supported
3527through inline assembly.
3528
3529The Xtensa configuration information must be specified prior to
e677f70c 3530building GCC@. The @file{include/xtensa-config.h} header
fd29f6ea
BW
3531file contains the configuration information. If you created your
3532own Xtensa configuration with the Xtensa Processor Generator, the
3533downloaded files include a customized copy of this header file,
3534which you can use to replace the default header file.
3535
3536@html
b8db17af 3537<hr />
fd29f6ea
BW
3538@end html
3539@heading @anchor{xtensa-*-linux*}xtensa-*-linux*
3540
3541This target is for Xtensa systems running GNU/Linux. It supports ELF
3542shared objects and the GNU C library (glibc). It also generates
3543position-independent code (PIC) regardless of whether the
3544@option{-fpic} or @option{-fPIC} options are used. In other
f282ffb3 3545respects, this target is the same as the
fd29f6ea
BW
3546@uref{#xtensa-*-elf,,@samp{xtensa-*-elf}} target.
3547
f42974dc 3548@html
b8db17af 3549<hr />
f42974dc 3550@end html
57694e40 3551@heading @anchor{windows}Microsoft Windows (32-bit)
f42974dc 3552
ccc1ce6e 3553A port of GCC 2.95.2 and 3.x is included with the
f42974dc
DW
3554@uref{http://www.cygwin.com/,,Cygwin environment}.
3555
3556Current (as of early 2001) snapshots of GCC will build under Cygwin
3557without modification.
3558
ccc1ce6e
CF
3559GCC does not currently build with Microsoft's C++ compiler and there
3560are no plans to make it do so.
3561
f42974dc 3562@html
b8db17af 3563<hr />
f42974dc 3564@end html
ef88b07d 3565@heading @anchor{os2}OS/2
f42974dc
DW
3566
3567GCC does not currently support OS/2. However, Andrew Zabolotny has been
14976c58 3568working on a generic OS/2 port with pgcc. The current code can be found
f42974dc
DW
3569at @uref{http://www.goof.com/pcg/os2/,,http://www.goof.com/pcg/os2/}.
3570
f9047ed3 3571An older copy of GCC 2.8.1 is included with the EMX tools available at
f42974dc
DW
3572@uref{ftp://ftp.leo.org/pub/comp/os/os2/leo/devtools/emx+gcc/,,
3573ftp://ftp.leo.org/pub/comp/os/os2/leo/devtools/emx+gcc/}.
3574
3575@html
b8db17af 3576<hr />
f42974dc 3577@end html
ef88b07d 3578@heading @anchor{older}Older systems
f9047ed3
JM
3579
3580GCC contains support files for many older (1980s and early
35811990s) Unix variants. For the most part, support for these systems
3582has not been deliberately removed, but it has not been maintained for
c7bdf0a6 3583several years and may suffer from bitrot.
f9047ed3 3584
c7bdf0a6 3585Starting with GCC 3.1, each release has a list of ``obsoleted'' systems.
9340544b
ZW
3586Support for these systems is still present in that release, but
3587@command{configure} will fail unless the @option{--enable-obsolete}
c7bdf0a6
ZW
3588option is given. Unless a maintainer steps forward, support for these
3589systems will be removed from the next release of GCC@.
f9047ed3
JM
3590
3591Support for old systems as hosts for GCC can cause problems if the
3592workarounds for compiler, library and operating system bugs affect the
161d7b59 3593cleanliness or maintainability of the rest of GCC@. In some cases, to
f9047ed3
JM
3594bring GCC up on such a system, if still possible with current GCC, may
3595require first installing an old version of GCC which did work on that
c7bdf0a6
ZW
3596system, and using it to compile a more recent GCC, to avoid bugs in the
3597vendor compiler. Old releases of GCC 1 and GCC 2 are available in the
3598@file{old-releases} directory on the @uref{../mirrors.html,,GCC mirror
3599sites}. Header bugs may generally be avoided using
3600@command{fixincludes}, but bugs or deficiencies in libraries and the
3601operating system may still cause problems.
3602
3603Support for older systems as targets for cross-compilation is less
3604problematic than support for them as hosts for GCC; if an enthusiast
3605wishes to make such a target work again (including resurrecting any of
3606the targets that never worked with GCC 2, starting from the last CVS
3607version before they were removed), patches
3608@uref{../contribute.html,,following the usual requirements} would be
3609likely to be accepted, since they should not affect the support for more
3610modern targets.
f9047ed3
JM
3611
3612For some systems, old versions of GNU binutils may also be useful,
021c4bfd 3613and are available from @file{pub/binutils/old-releases} on
f42974dc 3614@uref{http://sources.redhat.com/mirrors.html,,sources.redhat.com mirror sites}.
f9047ed3
JM
3615
3616Some of the information on specific systems above relates to
3617such older systems, but much of the information
3618about GCC on such systems (which may no longer be applicable to
f42974dc 3619current GCC) is to be found in the GCC texinfo manual.
f9047ed3 3620
f42974dc 3621@html
b8db17af 3622<hr />
f42974dc 3623@end html
250d5688 3624@heading @anchor{elf_targets}all ELF targets (SVR4, Solaris 2, etc.)
f42974dc 3625
38209993
LG
3626C++ support is significantly better on ELF targets if you use the
3627@uref{./configure.html#with-gnu-ld,,GNU linker}; duplicate copies of
3628inlines, vtables and template instantiations will be discarded
3629automatically.
f42974dc
DW
3630
3631
3632@html
b8db17af 3633<hr />
f42974dc
DW
3634<p>
3635@end html
3636@ifhtml
3637@uref{./index.html,,Return to the GCC Installation page}
3638@end ifhtml
3639@end ifset
3640
73e2155a
JM
3641@c ***Old documentation******************************************************
3642@ifset oldhtml
3643@include install-old.texi
3644@html
b8db17af 3645<hr />
73e2155a
JM
3646<p>
3647@end html
3648@ifhtml
3649@uref{./index.html,,Return to the GCC Installation page}
3650@end ifhtml
3651@end ifset
3652
aed5964b
JM
3653@c ***GFDL********************************************************************
3654@ifset gfdlhtml
3655@include fdl.texi
3656@html
b8db17af 3657<hr />
aed5964b
JM
3658<p>
3659@end html
3660@ifhtml
3661@uref{./index.html,,Return to the GCC Installation page}
3662@end ifhtml
3663@end ifset
3664
f42974dc
DW
3665@c ***************************************************************************
3666@c Part 6 The End of the Document
3667@ifinfo
3668@comment node-name, next, previous, up
aed5964b 3669@node Concept Index, , GNU Free Documentation License, Top
f42974dc
DW
3670@end ifinfo
3671
3672@ifinfo
3673@unnumbered Concept Index
3674
3675@printindex cp
3676
3677@contents
3678@end ifinfo
3679@bye