OSDN Git Service

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