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