1 This is doc/gccinstall.info, produced by makeinfo version 4.2 from
2 ../../gcc/gcc/doc/install.texi.
4 Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
5 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
7 Permission is granted to copy, distribute and/or modify this document
8 under the terms of the GNU Free Documentation License, Version 1.2 or
9 any later version published by the Free Software Foundation; with no
10 Invariant Sections, the Front-Cover texts being (a) (see below), and
11 with the Back-Cover Texts being (b) (see below). A copy of the license
12 is included in the section entitled "GNU Free Documentation License".
14 (a) The FSF's Front-Cover Text is:
18 (b) The FSF's Back-Cover Text is:
20 You have freedom to copy and modify this GNU Manual, like GNU
21 software. Copies published by the Free Software Foundation raise
22 funds for GNU development.
23 Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
24 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
26 Permission is granted to copy, distribute and/or modify this document
27 under the terms of the GNU Free Documentation License, Version 1.2 or
28 any later version published by the Free Software Foundation; with no
29 Invariant Sections, the Front-Cover texts being (a) (see below), and
30 with the Back-Cover Texts being (b) (see below). A copy of the license
31 is included in the section entitled "GNU Free Documentation License".
33 (a) The FSF's Front-Cover Text is:
37 (b) The FSF's Back-Cover Text is:
39 You have freedom to copy and modify this GNU Manual, like GNU
40 software. Copies published by the Free Software Foundation raise
41 funds for GNU development.
42 INFO-DIR-SECTION Programming
44 * gccinstall: (gccinstall). Installing the GNU Compiler Collection.
48 File: gccinstall.info, Node: Top, Up: (dir)
52 * Installing GCC:: This document describes the generic installation
53 procedure for GCC as well as detailing some target
54 specific installation instructions.
56 * Specific:: Host/target specific installation notes for GCC.
57 * Binaries:: Where to get pre-compiled binaries.
59 * Old:: Old installation documentation.
61 * GNU Free Documentation License:: How you can copy and share this manual.
62 * Concept Index:: This index has two entries.
65 File: gccinstall.info, Node: Installing GCC, Next: Binaries, Up: Top
70 The latest version of this document is always available at
71 http://gcc.gnu.org/install/.
73 This document describes the generic installation procedure for GCC
74 as well as detailing some target specific installation instructions.
76 GCC includes several components that previously were separate
77 distributions with their own installation instructions. This document
78 supersedes all package specific installation instructions.
80 _Before_ starting the build/install procedure please check the *Note
81 host/target specific installation notes: Specific. We recommend you
82 browse the entire generic installation instructions before you proceed.
84 Lists of successful builds for released versions of GCC are
85 available at `http://gcc.gnu.org/buildstat.html'. These lists are
86 updated as new information becomes available.
88 The installation procedure itself is broken into five steps.
93 * Downloading the source::
96 * Testing:: (optional)
99 Please note that GCC does not support `make uninstall' and probably
100 won't do so in the near future as this would open a can of worms.
101 Instead, we suggest that you install GCC into a directory of its own
102 and simply remove that directory when you do not need that specific
103 version of GCC any longer, and, if shared libraries are installed there
104 as well, no more binaries exist that use them.
107 File: gccinstall.info, Node: Prerequisites, Next: Downloading the source, Up: Installing GCC
112 GCC requires that various tools and packages be available for use in
113 the build procedure. Modifying GCC sources requires additional tools
116 Tools/packages necessary for building GCC
117 =========================================
120 Necessary to bootstrap the GCC package, although versions of GCC
121 prior to 3.4 also allow bootstrapping with a traditional (K&R) C
124 To make all languages in a cross-compiler or other configuration
125 where 3-stage bootstrap is not performed, you need to start with
126 an existing GCC binary (version 2.95 or later) because source code
127 for language frontends other than C might use GCC extensions.
130 In order to build the Ada compiler (GNAT) you must already have
131 GNAT installed because portions of the Ada frontend are written in
132 Ada (with GNAT extensions.) Refer to the Ada installation
133 instructions for more specific information.
135 A "working" POSIX compatible shell, or GNU bash
136 Necessary when running `configure' because some `/bin/sh' shells
137 have bugs and may crash when configuring the target libraries. In
138 other cases, `/bin/sh' or even some `ksh' have disastrous
139 corner-case performance problems. This can cause target
140 `configure' runs to literally take days to complete in some cases.
142 So on some platforms `/bin/ksh' is sufficient, on others it isn't.
143 See the host/target specific instructions for your platform, or
144 use `bash' to be sure. Then set `CONFIG_SHELL' in your
145 environment to your "good" shell prior to running
148 `zsh' is not a fully compliant POSIX shell and will not work when
152 Necessary in some circumstances, optional in others. See the
153 host/target specific instructions for your platform for the exact
156 gzip version 1.2.4 (or later) or
157 bzip2 version 1.0.2 (or later)
158 Necessary to uncompress GCC `tar' files when source code is
159 obtained via FTP mirror sites.
161 GNU make version 3.79.1 (or later)
162 You must have GNU make installed to build GCC.
164 GNU tar version 1.12 (or later)
165 Necessary (only on some platforms) to untar the source code. Many
166 systems' `tar' programs will also work, only try GNU `tar' if you
169 Tools/packages necessary for modifying GCC
170 ==========================================
172 autoconf versions 2.13 and 2.57
173 GNU m4 version 1.4 (or later)
174 Necessary when modifying `configure.in', `aclocal.m4', etc. to
175 regenerate `configure' and `config.in' files. Most directories
176 require autoconf 2.13 (exactly), but `libiberty', `fastjar',
177 `libstdc++-v3', `libjava/libltdl', and `gcc' require autoconf 2.57
180 automake versions 1.4-gcj and 1.7.9
181 Necessary when modifying a `Makefile.am' file to regenerate its
182 associated `Makefile.in'.
184 Much of GCC does not use automake, so directly edit the
185 `Makefile.in' file. Specifically this applies to the `gcc',
186 `intl', `libf2c', `libiberty', `libobjc' directories as well as any
187 of their subdirectories.
189 The `libstdc++-v3', `libjava/libltdl', and `fastjar' directories
190 require automake 1.7.9. However, the Java directories, which
191 include `boehm-gc', `libffi', `libjava', and `zlib', require a
192 modified version of automake 1.4 downloadable from
193 `ftp://gcc.gnu.org/pub/java/automake-gcj-1.4.tar.gz'.
195 gettext version 0.12 (or later)
196 Needed to regenerate `gcc.pot'.
198 gperf version 2.7.2 (or later)
199 Necessary when modifying `gperf' input files, e.g.
200 `gcc/cp/cfns.gperf' to regenerate its associated header file, e.g.
206 Necessary to run the GCC testsuite.
208 autogen version 5.5.4 (or later) and
209 guile version 1.4.1 (or later)
210 Necessary to regenerate `fixinc/fixincl.x' from
211 `fixinc/inclhack.def' and `fixinc/*.tpl'.
213 Necessary to run the `fixinc' `make check'.
215 Necessary to regenerate the top level `Makefile.in' file from
216 `Makefile.tpl' and `Makefile.def'.
218 GNU Bison version 1.28 (or later)
219 Berkeley `yacc' (`byacc') is also reported to work other than for
222 Necessary when modifying `*.y' files.
224 Necessary to build GCC during development because the generated
225 output files are not included in the CVS repository. They are
226 included in releases.
228 Flex version 2.5.4 (or later)
229 Necessary when modifying `*.l' files.
231 Necessary to build GCC during development because the generated
232 output files are not included in the CVS repository. They are
233 included in releases.
235 Texinfo version 4.2 (or later)
236 Necessary for running `makeinfo' when modifying `*.texi' files to
239 Necessary to build GCC documentation during development because the
240 generated output files are not included in the CVS repository.
241 They are included in releases.
243 TeX (any working version)
244 Necessary for running `texi2dvi', used when running `make dvi' to
247 cvs version 1.10 (or later)
249 Necessary to access the CVS repository. Public releases and weekly
250 snapshots of the development sources are also available via FTP.
252 perl version 5.6.1 (or later)
253 Necessary when regenerating `Makefile' dependencies in libiberty.
254 Necessary when regenerating `libiberty/functions.texi'. Necessary
255 when generating manpages from Texinfo manuals. Used by various
256 scripts to generate some files included in CVS (mainly
257 Unicode-related and rarely changing) from source tables.
259 GNU diffutils version 2.7 (or later)
260 Necessary when creating changes to GCC source code to submit for
263 patch version 2.5.4 (or later)
264 Necessary when applying patches, created with `diff', to one's own
268 File: gccinstall.info, Node: Downloading the source, Next: Configuration, Prev: Prerequisites, Up: Installing GCC
273 GCC is distributed via CVS and FTP tarballs compressed with `gzip' or
274 `bzip2'. It is possible to download a full distribution or specific
277 Please refer to the releases web page for information on how to
280 The full distribution includes the C, C++, Objective-C, Fortran,
281 Java, and Ada (in case of GCC 3.1 and later) compilers. The full
282 distribution also includes runtime libraries for C++, Objective-C,
283 Fortran, and Java. In GCC 3.0 and later versions, GNU compiler
284 testsuites are also included in the full distribution.
286 If you choose to download specific components, you must download the
287 core GCC distribution plus any language specific distributions you wish
288 to use. The core distribution includes the C language front end as
289 well as the shared components. Each language has a tarball which
290 includes the language front end as well as the language runtime (when
293 Unpack the core distribution as well as any language specific
294 distributions in the same directory.
296 If you also intend to build binutils (either to upgrade an existing
297 installation or for use in place of the corresponding tools of your
298 OS), unpack the binutils distribution either in the same directory or a
299 separate one. In the latter case, add symbolic links to any components
300 of the binutils you intend to build alongside the compiler (`bfd',
301 `binutils', `gas', `gprof', `ld', `opcodes', ...) to the directory
302 containing the GCC sources.
305 File: gccinstall.info, Node: Configuration, Next: Building, Prev: Downloading the source, Up: Installing GCC
307 Installing GCC: Configuration
308 *****************************
310 Like most GNU software, GCC must be configured before it can be
311 built. This document describes the recommended configuration procedure
312 for both native and cross targets.
314 We use SRCDIR to refer to the toplevel source directory for GCC; we
315 use OBJDIR to refer to the toplevel build/object directory.
317 If you obtained the sources via CVS, SRCDIR must refer to the top
318 `gcc' directory, the one where the `MAINTAINERS' can be found, and not
319 its `gcc' subdirectory, otherwise the build will fail.
321 If either SRCDIR or OBJDIR is located on an automounted NFS file
322 system, the shell's built-in `pwd' command will return temporary
323 pathnames. Using these can lead to various sorts of build problems.
324 To avoid this issue, set the `PWDCMD' environment variable to an
325 automounter-aware `pwd' command, e.g., `pawd' or `amq -w', during the
326 configuration and build phases.
328 First, we *highly* recommend that GCC be built into a separate
329 directory than the sources which does *not* reside within the source
330 tree. This is how we generally build GCC; building where SRCDIR ==
331 OBJDIR should still work, but doesn't get extensive testing; building
332 where OBJDIR is a subdirectory of SRCDIR is unsupported.
334 If you have previously built GCC in the same directory for a
335 different target machine, do `make distclean' to delete all files that
336 might be invalid. One of the files this deletes is `Makefile'; if
337 `make distclean' complains that `Makefile' does not exist or issues a
338 message like "don't know how to make distclean" it probably means that
339 the directory is already suitably clean. However, with the recommended
340 method of building in a separate OBJDIR, you should simply use a
341 different OBJDIR for each target.
343 Second, when configuring a native system, either `cc' or `gcc' must
344 be in your path or you must set `CC' in your environment before running
345 configure. Otherwise the configuration scripts may fail.
347 Note that the bootstrap compiler and the resulting GCC must be link
348 compatible, else the bootstrap will fail with linker errors about
349 incompatible object file formats. Several multilibed targets are
350 affected by this requirement, see *Note host/target specific
351 installation notes: Specific.
357 % SRCDIR/configure [OPTIONS] [TARGET]
362 * GCC has code to correctly determine the correct value for TARGET
363 for nearly all native systems. Therefore, we highly recommend you
364 not provide a configure target when configuring a native compiler.
366 * TARGET must be specified as `--target=TARGET' when configuring a
367 cross compiler; examples of valid targets would be i960-rtems,
368 m68k-coff, sh-elf, etc.
370 * Specifying just TARGET instead of `--target=TARGET' implies that
371 the host defaults to TARGET.
373 Options specification
374 =====================
376 Use OPTIONS to override several configure time options for GCC. A
377 list of supported OPTIONS follows; `configure --help' may list other
378 options, but those not listed below may not work and should not
381 Note that each `--enable' option has a corresponding `--disable'
382 option and that each `--with' option has a corresponding `--without'
386 Specify the toplevel installation directory. This is the
387 recommended way to install the tools into a directory other than
388 the default. The toplevel installation directory defaults to
391 We *highly* recommend against DIRNAME being the same or a
392 subdirectory of OBJDIR or vice versa. If specifying a directory
393 beneath a user's home directory tree, some shells will not expand
394 DIRNAME correctly if it contains the `~' metacharacter; use
397 The following standard `autoconf' options are supported. Normally
398 you should not need to use these options.
399 `--exec-prefix=DIRNAME'
400 Specify the toplevel installation directory for
401 architecture-dependent files. The default is `PREFIX'.
404 Specify the installation directory for the executables called
405 by users (such as `gcc' and `g++'). The default is
409 Specify the installation directory for object code libraries
410 and internal data files of GCC. The default is
413 `--libexecdir=DIRNAME'
414 Specify the installation directory for internal executables
415 of GCC. The default is `EXEC-PREFIX/libexec'.
417 `--with-slibdir=DIRNAME'
418 Specify the installation directory for the shared libgcc
419 library. The default is `LIBDIR'.
422 Specify the installation directory for documentation in info
423 format. The default is `PREFIX/info'.
426 Specify the installation directory for some
427 architecture-independent data files referenced by GCC. The
428 default is `PREFIX/share'.
431 Specify the installation directory for manual pages. The
432 default is `PREFIX/man'. (Note that the manual pages are
433 only extracts from the full GCC manuals, which are provided
434 in Texinfo format. The manpages are derived by an automatic
435 conversion process from parts of the full manual.)
437 `--with-gxx-include-dir=DIRNAME'
438 Specify the installation directory for G++ header files. The
439 default is `PREFIX/include/c++/VERSION'.
441 `--program-prefix=PREFIX'
442 GCC supports some transformations of the names of its programs when
443 installing them. This option prepends PREFIX to the names of
444 programs to install in BINDIR (see above). For example, specifying
445 `--program-prefix=foo-' would result in `gcc' being installed as
446 `/usr/local/bin/foo-gcc'.
448 `--program-suffix=SUFFIX'
449 Appends SUFFIX to the names of programs to install in BINDIR (see
450 above). For example, specifying `--program-suffix=-3.1' would
451 result in `gcc' being installed as `/usr/local/bin/gcc-3.1'.
453 `--program-transform-name=PATTERN'
454 Applies the `sed' script PATTERN to be applied to the names of
455 programs to install in BINDIR (see above). PATTERN has to consist
456 of one or more basic `sed' editing commands, separated by
457 semicolons. For example, if you want the `gcc' program name to be
458 transformed to the installed program `/usr/local/bin/myowngcc' and
459 the `g++' program name to be transformed to
460 `/usr/local/bin/gspecial++' without changing other program names,
461 you could use the pattern
462 `--program-transform-name='s/^gcc$/myowngcc/; s/^g++$/gspecial++/''
463 to achieve this effect.
465 All three options can be combined and used together, resulting in
466 more complex conversion patterns. As a basic rule, PREFIX (and
467 SUFFIX) are prepended (appended) before further transformations
468 can happen with a special transformation script PATTERN.
470 As currently implemented, this option only takes effect for native
471 builds; cross compiler binaries' names are not transformed even
472 when a transformation is explicitly asked for by one of these
475 For native builds, some of the installed programs are also
476 installed with the target alias in front of their name, as in
477 `i686-pc-linux-gnu-gcc'. All of the above transformations happen
478 before the target alias is prepended to the name - so, specifying
479 `--program-prefix=foo-' and `program-suffix=-3.1', the resulting
480 binary would be installed as
481 `/usr/local/bin/i686-pc-linux-gnu-foo-gcc-3.1'.
483 As a last shortcoming, none of the installed Ada programs are
484 transformed yet, which will be fixed in some time.
486 `--with-local-prefix=DIRNAME'
487 Specify the installation directory for local include files. The
488 default is `/usr/local'. Specify this option if you want the
489 compiler to search directory `DIRNAME/include' for locally
490 installed header files _instead_ of `/usr/local/include'.
492 You should specify `--with-local-prefix' *only* if your site has a
493 different convention (not `/usr/local') for where to put
496 The default value for `--with-local-prefix' is `/usr/local'
497 regardless of the value of `--prefix'. Specifying `--prefix' has
498 no effect on which directory GCC searches for local header files.
499 This may seem counterintuitive, but actually it is logical.
501 The purpose of `--prefix' is to specify where to _install GCC_.
502 The local header files in `/usr/local/include'--if you put any in
503 that directory--are not part of GCC. They are part of other
504 programs--perhaps many others. (GCC installs its own header files
505 in another directory which is based on the `--prefix' value.)
507 Both the local-prefix include directory and the GCC-prefix include
508 directory are part of GCC's "system include" directories.
509 Although these two directories are not fixed, they need to be
510 searched in the proper order for the correct processing of the
511 include_next directive. The local-prefix include directory is
512 searched before the GCC-prefix include directory. Another
513 characteristic of system include directories is that pedantic
514 warnings are turned off for headers in these directories.
516 Some autoconf macros add `-I DIRECTORY' options to the compiler
517 command line, to ensure that directories containing installed
518 packages' headers are searched. When DIRECTORY is one of GCC's
519 system include directories, GCC will ignore the option so that
520 system directories continue to be processed in the correct order.
521 This may result in a search order different from what was
522 specified but the directory will still be searched.
524 GCC automatically searches for ordinary libraries using
525 `GCC_EXEC_PREFIX'. Thus, when the same installation prefix is
526 used for both GCC and packages, GCC will automatically search for
527 both headers and libraries. This provides a configuration that is
528 easy to use. GCC behaves in a manner similar to that when it is
529 installed as a system compiler in `/usr'.
531 Sites that need to install multiple versions of GCC may not want to
532 use the above simple configuration. It is possible to use the
533 `--program-prefix', `--program-suffix' and
534 `--program-transform-name' options to install multiple versions
535 into a single directory, but it may be simpler to use different
536 prefixes and the `--with-local-prefix' option to specify the
537 location of the site-specific files for each version. It will
538 then be necessary for users to specify explicitly the location of
539 local site libraries (e.g., with `LIBRARY_PATH').
541 The same value can be used for both `--with-local-prefix' and
542 `--prefix' provided it is not `/usr'. This can be used to avoid
543 the default search of `/usr/local/include'.
545 *Do not* specify `/usr' as the `--with-local-prefix'! The
546 directory you use for `--with-local-prefix' *must not* contain any
547 of the system's standard header files. If it did contain them,
548 certain programs would be miscompiled (including GNU Emacs, on
549 certain targets), because this would override and nullify the
550 header file corrections made by the `fixincludes' script.
552 Indications are that people who use this option use it based on
553 mistaken ideas of what it is for. People use it as if it
554 specified where to install part of GCC. Perhaps they make this
555 assumption because installing GCC creates the directory.
557 `--enable-shared[=PACKAGE[,...]]'
558 Build shared versions of libraries, if shared libraries are
559 supported on the target platform. Unlike GCC 2.95.x and earlier,
560 shared libraries are enabled by default on all platforms that
561 support shared libraries, except for `libobjc' which is built as a
562 static library only by default.
564 If a list of packages is given as an argument, build shared
565 libraries only for the listed packages. For other packages, only
566 static libraries will be built. Package names currently
567 recognized in the GCC tree are `libgcc' (also known as `gcc'),
568 `libstdc++' (not `libstdc++-v3'), `libffi', `zlib', `boehm-gc' and
569 `libjava'. Note that `libobjc' does not recognize itself by any
570 name, so, if you list package names in `--enable-shared', you will
571 only get static Objective-C libraries. `libf2c' and `libiberty'
572 do not support shared libraries at all.
574 Use `--disable-shared' to build only static libraries. Note that
575 `--disable-shared' does not accept a list of package names as
576 argument, only `--enable-shared' does.
579 Specify that the compiler should assume that the assembler it
580 finds is the GNU assembler. However, this does not modify the
581 rules to find an assembler and will result in confusion if the
582 assembler found is not actually the GNU assembler. (Confusion may
583 also result if the compiler finds the GNU assembler but has not
584 been configured with `--with-gnu-as'.) If you have more than one
585 assembler installed on your system, you may want to use this
586 option in connection with `--with-as=PATHNAME'.
588 The following systems are the only ones where it makes a difference
589 whether you use the GNU assembler. On any other system,
590 `--with-gnu-as' has no effect.
610 * `sparc-sun-solaris2.ANY'
612 * `sparc64-ANY-solaris2.ANY'
614 On the systems listed above (except for the HP-PA, the SPARC, for
615 ISC on the 386, and for `mips-sgi-irix5.*'), if you use the GNU
616 assembler, you should also use the GNU linker (and specify
620 Specify that the compiler should use the assembler pointed to by
621 PATHNAME, rather than the one found by the standard rules to find
622 an assembler, which are:
623 * Check the `LIBEXEC/gcc/TARGET/VERSION' directory, where
624 LIBEXEC defaults to `EXEC-PREFIX/libexec' and EXEC-PREFIX
625 defaults to PREFIX which defaults to `/usr/local' unless
626 overridden by the `--prefix=PATHNAME' switch described above.
627 TARGET is the target system triple, such as
628 `sparc-sun-solaris2.7', and VERSION denotes the GCC version,
631 * Check operating system specific directories (e.g.
632 `/usr/ccs/bin' on Sun Solaris 2).
633 Note that these rules do not check for the value of `PATH'. You
634 may want to use `--with-as' if no assembler is installed in the
635 directories listed above, or if you have multiple assemblers
636 installed and want to choose one that is not found by the above
640 Same as `--with-gnu-as' but for the linker.
643 Same as `--with-as' but for the linker.
646 Specify that stabs debugging information should be used instead of
647 whatever format the host normally uses. Normally GCC uses the
648 same debug format as the host system.
650 On MIPS based systems and on Alphas, you must specify whether you
651 want GCC to create the normal ECOFF debugging format, or to use
652 BSD-style stabs passed through the ECOFF symbol table. The normal
653 ECOFF debug format cannot fully handle languages other than C.
654 BSD stabs format can handle other languages, but it only works
655 with the GNU debugger GDB.
657 Normally, GCC uses the ECOFF debugging format by default; if you
658 prefer BSD stabs, specify `--with-stabs' when you configure GCC.
660 No matter which default you choose when you configure GCC, the user
661 can use the `-gcoff' and `-gstabs+' options to specify explicitly
662 the debug format for a particular compilation.
664 `--with-stabs' is meaningful on the ISC system on the 386, also, if
665 `--with-gas' is used. It selects use of stabs debugging
666 information embedded in COFF output. This kind of debugging
667 information supports C++ well; ordinary COFF debugging information
670 `--with-stabs' is also meaningful on 386 systems running SVR4. It
671 selects use of stabs debugging information embedded in ELF output.
672 The C++ compiler currently (2.6.0) does not support the DWARF
673 debugging information normally used on 386 SVR4 platforms; stabs
674 provide a workable alternative. This requires gas and gdb, as the
675 normal SVR4 tools can not generate or interpret stabs.
678 Specify that multiple target libraries to support different target
679 variants, calling conventions, etc should not be built. The
680 default is to build a predefined set of them.
682 Some targets provide finer-grained control over which multilibs
683 are built (e.g., `--disable-softfloat'):
688 fpu, 26bit, underscore, interwork, biendian, nofmult.
691 softfloat, m68881, m68000, m68020.
694 single-float, biendian, softfloat.
696 `powerpc*-*-*, rs6000*-*-*'
697 aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos,
701 Specify that the target supports threads. This affects the
702 Objective-C compiler and runtime library, and exception handling
703 for other languages like C++ and Java. On some systems, this is
706 In general, the best (and, in many cases, the only known) threading
707 model available will be configured for use. Beware that on some
708 systems, GCC has not been taught what threading models are
709 generally available for the system. In this case,
710 `--enable-threads' is an alias for `--enable-threads=single'.
713 Specify that threading support should be disabled for the system.
714 This is an alias for `--enable-threads=single'.
716 `--enable-threads=LIB'
717 Specify that LIB is the thread support library. This affects the
718 Objective-C compiler and runtime library, and exception handling
719 for other languages like C++ and Java. The possibilities for LIB
729 Ada tasking support. For non-Ada programs, this setting is
730 equivalent to `single'. When used in conjunction with the Ada
731 run time, it causes GCC to use the same thread primitives as
732 Ada uses. This option is necessary when using both Ada and
733 the back end exception handling, which is the default for
737 Generic MACH thread support, known to work on NeXTSTEP.
738 (Please note that the file needed to support this
739 configuration, `gthr-mach.h', is missing and thus this
740 setting will cause a known bootstrap failure.)
743 This is an alias for `single'.
746 Generic POSIX thread support.
749 RTEMS thread support.
752 Disable thread support, should work for all platforms.
755 Sun Solaris 2 thread support.
758 VxWorks thread support.
761 Microsoft Win32 API thread support.
764 Specify which cpu variant the compiler should generate code for by
765 default. CPU will be used as the default value of the `-mcpu='
766 switch. This option is only supported on some targets, including
767 ARM, i386, PowerPC, and SPARC.
769 `--with-schedule=CPU'
774 These configure options provide default values for the
775 `-mschedule=', `-march=', `-mtune=', and `-mabi=' options and for
776 `-mhard-float' or `-msoft-float'. As with `--with-cpu', which
777 switches will be accepted and acceptable values of the arguments
778 depend on the target.
781 Specify that the target supports AltiVec vector enhancements. This
782 option will adjust the ABI for AltiVec enhancements, as well as
783 generate AltiVec code when appropriate. This option is only
784 available for PowerPC systems.
786 `--enable-__cxa_atexit'
787 Define if you want to use __cxa_atexit, rather than atexit, to
788 register C++ destructors for local statics and global objects.
789 This is essential for fully standards-compliant handling of
790 destructors, but requires __cxa_atexit in libc. This option is
791 currently only available on systems with GNU libc. When enabled,
792 this will cause `-fuse-cxa-exit' to be passed by default.
794 `--enable-target-optspace'
795 Specify that target libraries should be optimized for code space
796 instead of code speed. This is the default for the m32r platform.
799 Specify that a user visible `cpp' program should not be installed.
801 `--with-cpp-install-dir=DIRNAME'
802 Specify that the user visible `cpp' program should be installed in
803 `PREFIX/DIRNAME/cpp', in addition to BINDIR.
805 `--enable-initfini-array'
806 Force the use of sections `.init_array' and `.fini_array' (instead
807 of `.init' and `.fini') for constructors and destructors. Option
808 `--disable-initfini-array' has the opposite effect. If neither
809 option is specified, the configure script will try to guess
810 whether the `.init_array' and `.fini_array' sections are supported
811 and, if they are, use them.
813 `--enable-maintainer-mode'
814 The build rules that regenerate the GCC master message catalog
815 `gcc.pot' are normally disabled. This is because it can only be
816 rebuilt if the complete source tree is present. If you have
817 changed the sources and want to rebuild the catalog, configuring
818 with `--enable-maintainer-mode' will enable this. Note that you
819 need a recent version of the `gettext' tools to do so.
821 `--enable-generated-files-in-srcdir'
822 Neither the .c and .h files that are generated from bison and flex
823 nor the info manuals and man pages that are built from the .texi
824 files are present in the CVS development tree. When building GCC
825 from that development tree, or from a snapshot which are created
826 from CVS, then those generated files are placed in your build
827 directory, which allows for the source to be in a readonly
830 If you configure with `--enable-generated-files-in-srcdir' then
831 those generated files will go into the source directory. This is
832 mainly intended for generating release or prerelease tarballs of
833 the GCC sources, since it is not a requirement that the users of
834 source releases to have flex, bison, or makeinfo.
836 `--enable-version-specific-runtime-libs'
837 Specify that runtime libraries should be installed in the compiler
838 specific subdirectory (`LIBDIR/gcc') rather than the usual places.
839 In addition, `libstdc++''s include files will be installed into
840 `LIBDIR' unless you overruled it by using
841 `--with-gxx-include-dir=DIRNAME'. Using this option is
842 particularly useful if you intend to use several versions of GCC in
843 parallel. This is currently supported by `libf2c' and `libstdc++',
844 and is the default for `libobjc' which cannot be changed in this
847 `--enable-languages=LANG1,LANG2,...'
848 Specify that only a particular subset of compilers and their
849 runtime libraries should be built. For a list of valid values for
850 LANGN you can issue the following command in the `gcc' directory
851 of your GCC source tree:
852 grep language= */config-lang.in
853 Currently, you can use any of the following: `ada', `c', `c++',
854 `f77', `java', `objc'. Building the Ada compiler has special
855 requirements, see below.
856 If you do not pass this flag, all languages available in the `gcc'
857 sub-tree will be configured. Re-defining `LANGUAGES' when calling
858 `make bootstrap' *does not* work anymore, as those language
859 sub-directories might not have been configured!
862 Specify that the compiler should use DWARF 2 debugging information
865 `--enable-win32-registry'
866 `--enable-win32-registry=KEY'
867 `--disable-win32-registry'
868 The `--enable-win32-registry' option enables Microsoft
869 Windows-hosted GCC to look up installations paths in the registry
870 using the following key:
872 `HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\KEY'
874 KEY defaults to GCC version number, and can be overridden by the
875 `--enable-win32-registry=KEY' option. Vendors and distributors who
876 use custom installers are encouraged to provide a different key,
877 perhaps one comprised of vendor name and GCC version number, to
878 avoid conflict with existing installations. This feature is
879 enabled by default, and can be disabled by
880 `--disable-win32-registry' option. This option has no effect on
884 Specify that the machine does not have a floating point unit. This
885 option only applies to `m68k-sun-sunosN'. On any other system,
886 `--nfp' has no effect.
890 `--enable-werror=yes'
892 When you specify this option, it controls whether certain files in
893 the compiler are built with `-Werror' in bootstrap stage2 and
894 later. If you don't specify it, `-Werror' is turned on for the
895 main development trunk. However it defaults to off for release
896 branches and final releases. The specific files which get
897 `-Werror' are controlled by the Makefiles.
900 `--enable-checking=LIST'
901 When you specify this option, the compiler is built to perform
902 checking of tree node types when referencing fields of that node,
903 and some other internal consistency checks. This does not change
904 the generated code, but adds error checking within the compiler.
905 This will slow down the compiler and may only work properly if you
906 are building the compiler with GCC. This is on by default when
907 building from CVS or snapshots, but off for releases. More
908 control over the checks may be had by specifying LIST; the
909 categories of checks available are `misc', `tree', `gc', `rtl',
910 `rtlflag', `fold', `gcac' and `valgrind'. The check `valgrind'
911 requires the external `valgrind' simulator, available from
912 `http://valgrind.kde.org/'. The default when LIST is not
913 specified is `misc,tree,gc,rtlflag'; the checks `rtl', `gcac' and
914 `valgrind' are very expensive.
917 `--enable-coverage=LEVEL'
918 With this option, the compiler is built to collect self coverage
919 information, every time it is run. This is for internal development
920 purposes, and only works when the compiler is being built with
921 gcc. The LEVEL argument controls whether the compiler is built
922 optimized or not, values are `opt' and `noopt'. For coverage
923 analysis you want to disable optimization, for performance
924 analysis you want to enable optimization. When coverage is
925 enabled, the default level is without optimization.
927 `--enable-gather-detailed-mem-stats'
928 When this option is specified more detailed information on memory
929 allocation is gathered. This information is printed when using
934 The `--enable-nls' option enables Native Language Support (NLS),
935 which lets GCC output diagnostics in languages other than American
936 English. Native Language Support is enabled by default if not
937 doing a canadian cross build. The `--disable-nls' option disables
940 `--with-included-gettext'
941 If NLS is enabled, the `--with-included-gettext' option causes the
942 build procedure to prefer its copy of GNU `gettext'.
945 If NLS is enabled, and if the host lacks `gettext' but has the
946 inferior `catgets' interface, the GCC build procedure normally
947 ignores `catgets' and instead uses GCC's copy of the GNU `gettext'
948 library. The `--with-catgets' option causes the build procedure
949 to use the host's `catgets' in this situation.
951 `--with-libiconv-prefix=DIR'
952 Search for libiconv header files in `DIR/include' and libiconv
953 library files in `DIR/lib'.
956 Enable configuration for an obsoleted system. If you attempt to
957 configure GCC for a system (build, host, or target) which has been
958 obsoleted, and you do not specify this flag, configure will halt
959 with an error message.
961 All support for systems which have been obsoleted in one release
962 of GCC is removed entirely in the next major release, unless
963 someone steps forward to maintain the port.
965 Cross-Compiler-Specific Options
966 -------------------------------
968 The following options only apply to building cross compilers.
971 Tells GCC to consider DIR as the root of a tree that contains a
972 (subset of) the root filesystem of the target operating system.
973 Target system headers, libraries and run-time object files will be
974 searched in there. The specified directory is not copied into the
975 install tree, unlike the options `--with-headers' and
976 `--with-libs' that this option obsoletes. The default value, in
977 case `--with-sysroot' is not given an argument, is
978 `${gcc_tooldir}/sys-root'. If the specified directory is a
979 subdirectory of `${exec_prefix}', then it will be found relative to
980 the GCC binaries if the installation tree is moved.
984 Deprecated in favor of `--with-sysroot'. Specifies that target
985 headers are available when building a cross compiler. The DIR
986 argument specifies a directory which has the target include files.
987 These include files will be copied into the `gcc' install
988 directory. _This option with the DIR argument is required_ when
989 building a cross compiler, if `PREFIX/TARGET/sys-include' doesn't
990 pre-exist. If `PREFIX/TARGET/sys-include' does pre-exist, the DIR
991 argument may be omitted. `fixincludes' will be run on these files
992 to make them compatible with GCC.
995 Tells GCC not use any target headers from a libc when building a
996 cross compiler. When crossing to GNU/Linux, you need the headers
997 so GCC can build the exception handling for libgcc. See CrossGCC
998 for more information on this option.
1001 `--with-libs=``DIR1 DIR2 ... DIRN'''
1002 Deprecated in favor of `--with-sysroot'. Specifies a list of
1003 directories which contain the target runtime libraries. These
1004 libraries will be copied into the `gcc' install directory. If the
1005 directory list is omitted, this option has no effect.
1008 Specifies that `newlib' is being used as the target C library.
1009 This causes `__eprintf' to be omitted from `libgcc.a' on the
1010 assumption that it will be provided by `newlib'.
1012 Java-Specific Options
1013 ---------------------
1015 The following option applies to the build of the Java front end.
1018 Specify that the run-time libraries used by GCJ should not be
1019 built. This is useful in case you intend to use GCJ with some
1020 other run-time, or you're going to install it separately, or it
1021 just happens not to build on your particular machine. In general,
1022 if the Java front end is enabled, the GCJ libraries will be
1023 enabled too, unless they're known to not work on the target
1024 platform. If GCJ is enabled but `libgcj' isn't built, you may
1025 need to port it; in this case, before modifying the top-level
1026 `configure.in' so that `libgcj' is enabled by default on this
1027 platform, you may use `--enable-libgcj' to override the default.
1029 The following options apply to building `libgcj'.
1034 `--disable-getenv-properties'
1035 Don't set system properties from `GCJ_PROPERTIES'.
1037 `--enable-hash-synchronization'
1038 Use a global hash table for monitor locks. Ordinarily, `libgcj''s
1039 `configure' script automatically makes the correct choice for this
1040 option for your platform. Only use this if you know you need the
1041 library to be configured differently.
1043 `--enable-interpreter'
1044 Enable the Java interpreter. The interpreter is automatically
1045 enabled by default on all platforms that support it. This option
1046 is really only useful if you want to disable the interpreter
1047 (using `--disable-interpreter').
1049 `--disable-java-net'
1050 Disable java.net. This disables the native part of java.net only,
1051 using non-functional stubs for native method implementations.
1054 Disable JVMPI support.
1057 Enable runtime eCos target support.
1060 Don't use `libffi'. This will disable the interpreter and JNI
1061 support as well, as these require `libffi' to work.
1063 `--enable-libgcj-debug'
1064 Enable runtime debugging code.
1066 `--enable-libgcj-multifile'
1067 If specified, causes all `.java' source files to be compiled into
1068 `.class' files in one invocation of `gcj'. This can speed up build
1069 time, but is more resource-intensive. If this option is
1070 unspecified or disabled, `gcj' is invoked once for each `.java'
1071 file to compile into a `.class' file.
1073 `--with-libiconv-prefix=DIR'
1074 Search for libiconv in `DIR/include' and `DIR/lib'.
1076 `--enable-sjlj-exceptions'
1077 Force use of `builtin_setjmp' for exceptions. `configure'
1078 ordinarily picks the correct value based on the platform. Only use
1079 this option if you are sure you need a different setting.
1081 `--with-system-zlib'
1082 Use installed `zlib' rather than that included with GCC.
1084 `--with-win32-nlsapi=ansi, unicows or unicode'
1085 Indicates how MinGW `libgcj' translates between UNICODE characters
1088 Use the single-byte `char' and the Win32 A functions natively,
1089 translating to and from UNICODE when using these functions. If
1090 unspecified, this is the default.
1093 Use the `WCHAR' and Win32 W functions natively. Adds
1094 `-lunicows' to `libgcj.spec' to link with `libunicows'.
1095 `unicows.dll' needs to be deployed on Microsoft Windows 9X
1096 machines running built executables. `libunicows.a', an
1097 open-source import library around Microsoft's `unicows.dll',
1098 is obtained from `http://libunicows.sourceforge.net/', which
1099 also gives details on getting `unicows.dll' from Microsoft.
1102 Use the `WCHAR' and Win32 W functions natively. Does _not_
1103 add `-lunicows' to `libgcj.spec'. The built executables will
1104 only run on Microsoft Windows NT and above.
1106 AWT-Specific Options
1107 ....................
1110 Use the X Window System.
1112 `--enable-java-awt=PEER(S)'
1113 Specifies the AWT peer library or libraries to build alongside
1114 `libgcj'. If this option is unspecified or disabled, AWT will be
1115 non-functional. Current valid values are `gtk' and `xlib'.
1116 Multiple libraries should be separated by a comma (i.e.
1117 `--enable-java-awt=gtk,xlib').
1119 `--enable-gtk-cairo'
1120 Build the cairo Graphics2D implementation on GTK.
1122 `--enable-java-gc=TYPE'
1123 Choose garbage collector. Defaults to `boehm' if unspecified.
1126 Do not try to compile and run a test GTK+ program.
1128 `--disable-glibtest'
1129 Do not try to compile and run a test GLIB program.
1131 `--with-libart-prefix=PFX'
1132 Prefix where libart is installed (optional).
1134 `--with-libart-exec-prefix=PFX'
1135 Exec prefix where libart is installed (optional).
1137 `--disable-libarttest'
1138 Do not try to compile and run a test libart program.
1141 File: gccinstall.info, Node: Building, Next: Testing, Prev: Configuration, Up: Installing GCC
1146 Now that GCC is configured, you are ready to build the compiler and
1149 Some commands executed when making the compiler may fail (return a
1150 nonzero status) and be ignored by `make'. These failures, which are
1151 often due to files that were not found, are expected, and can safely be
1154 It is normal to have compiler warnings when compiling certain files.
1155 Unless you are a GCC developer, you can generally ignore these warnings
1156 unless they cause compilation to fail. Developers should attempt to fix
1157 any warnings encountered, however they can temporarily continue past
1158 warnings-as-errors by specifying the configure flag `--disable-werror'.
1160 On certain old systems, defining certain environment variables such
1161 as `CC' can interfere with the functioning of `make'.
1163 If you encounter seemingly strange errors when trying to build the
1164 compiler in a directory other than the source directory, it could be
1165 because you have previously configured the compiler in the source
1166 directory. Make sure you have done all the necessary preparations.
1168 If you build GCC on a BSD system using a directory stored in an old
1169 System V file system, problems may occur in running `fixincludes' if the
1170 System V file system doesn't support symbolic links. These problems
1171 result in a failure to fix the declaration of `size_t' in
1172 `sys/types.h'. If you find that `size_t' is a signed type and that
1173 type mismatches occur, this could be the cause.
1175 The solution is not to use such a directory for building GCC.
1177 When building from CVS or snapshots, or if you modify parser sources,
1178 you need the Bison parser generator installed. Any version 1.25 or
1179 later should work; older versions may also work. If you do not modify
1180 parser sources, releases contain the Bison-generated files and you do
1181 not need Bison installed to build them.
1183 When building from CVS or snapshots, or if you modify Texinfo
1184 documentation, you need version 4.2 or later of Texinfo installed if you
1185 want Info documentation to be regenerated. Releases contain Info
1186 documentation pre-built for the unmodified documentation in the release.
1188 Building a native compiler
1189 ==========================
1191 For a native build issue the command `make bootstrap'. This will
1192 build the entire GCC system, which includes the following steps:
1194 * Build host tools necessary to build the compiler such as texinfo,
1197 * Build target tools for use by the compiler such as binutils (bfd,
1198 binutils, gas, gprof, ld, and opcodes) if they have been
1199 individually linked or moved into the top level GCC source tree
1202 * Perform a 3-stage bootstrap of the compiler.
1204 * Perform a comparison test of the stage2 and stage3 compilers.
1206 * Build runtime libraries using the stage3 compiler from the
1210 If you are short on disk space you might consider `make
1211 bootstrap-lean' instead. This is identical to `make bootstrap' except
1212 that object files from the stage1 and stage2 of the 3-stage bootstrap
1213 of the compiler are deleted as soon as they are no longer needed.
1215 If you want to save additional space during the bootstrap and in the
1216 final installation as well, you can build the compiler binaries without
1217 debugging information as in the following example. This will save
1218 roughly 40% of disk space both for the bootstrap and the final
1219 installation. (Libraries will still contain debugging information.)
1221 make CFLAGS='-O' LIBCFLAGS='-g -O2' \
1222 LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
1224 If you wish to use non-default GCC flags when compiling the stage2
1225 and stage3 compilers, set `BOOT_CFLAGS' on the command line when doing
1226 `make bootstrap'. Non-default optimization flags are less well tested
1227 here than the default of `-g -O2', but should still work. In a few
1228 cases, you may find that you need to specify special flags such as
1229 `-msoft-float' here to complete the bootstrap; or, if the native
1230 compiler miscompiles the stage1 compiler, you may need to work around
1231 this, by choosing `BOOT_CFLAGS' to avoid the parts of the stage1
1232 compiler that were miscompiled, or by using `make bootstrap4' to
1233 increase the number of stages of bootstrap.
1235 If you used the flag `--enable-languages=...' to restrict the
1236 compilers to be built, only those you've actually enabled will be
1237 built. This will of course only build those runtime libraries, for
1238 which the particular compiler has been built. Please note, that
1239 re-defining `LANGUAGES' when calling `make bootstrap' *does not* work
1242 If the comparison of stage2 and stage3 fails, this normally indicates
1243 that the stage2 compiler has compiled GCC incorrectly, and is therefore
1244 a potentially serious bug which you should investigate and report. (On
1245 a few systems, meaningful comparison of object files is impossible; they
1246 always appear "different". If you encounter this problem, you will
1247 need to disable comparison in the `Makefile'.)
1249 Building a cross compiler
1250 =========================
1252 We recommend reading the crossgcc FAQ for information about building
1255 When building a cross compiler, it is not generally possible to do a
1256 3-stage bootstrap of the compiler. This makes for an interesting
1257 problem as parts of GCC can only be built with GCC.
1259 To build a cross compiler, we first recommend building and
1260 installing a native compiler. You can then use the native GCC compiler
1261 to build the cross compiler. The installed native compiler needs to be
1262 GCC version 2.95 or later.
1264 Assuming you have already installed a native copy of GCC and
1265 configured your cross compiler, issue the command `make', which
1266 performs the following steps:
1268 * Build host tools necessary to build the compiler such as texinfo,
1271 * Build target tools for use by the compiler such as binutils (bfd,
1272 binutils, gas, gprof, ld, and opcodes) if they have been
1273 individually linked or moved into the top level GCC source tree
1276 * Build the compiler (single stage only).
1278 * Build runtime libraries using the compiler from the previous step.
1280 Note that if an error occurs in any step the make process will exit.
1282 If you are not building GNU binutils in the same source tree as GCC,
1283 you will need a cross-assembler and cross-linker installed before
1284 configuring GCC. Put them in the directory `PREFIX/TARGET/bin'. Here
1285 is a table of the tools you should put in this directory:
1288 This should be the cross-assembler.
1291 This should be the cross-linker.
1294 This should be the cross-archiver: a program which can manipulate
1295 archive files (linker libraries) in the target machine's format.
1298 This should be a program to construct a symbol table in an archive
1301 The installation of GCC will find these programs in that directory,
1302 and copy or link them to the proper place to for the cross-compiler to
1303 find them when run later.
1305 The easiest way to provide these files is to build the Binutils
1306 package. Configure it with the same `--host' and `--target' options
1307 that you use for configuring GCC, then build and install them. They
1308 install their executables automatically into the proper directory.
1309 Alas, they do not support all the targets that GCC supports.
1311 If you are not building a C library in the same source tree as GCC,
1312 you should also provide the target libraries and headers before
1313 configuring GCC, specifying the directories with `--with-sysroot' or
1314 `--with-headers' and `--with-libs'. Many targets also require "start
1315 files" such as `crt0.o' and `crtn.o' which are linked into each
1316 executable. There may be several alternatives for `crt0.o', for use
1317 with profiling or other compilation options. Check your target's
1318 definition of `STARTFILE_SPEC' to find out what start files it uses.
1320 Building in parallel
1321 ====================
1323 You can use `make bootstrap MAKE="make -j 2" -j 2', or just `make -j
1324 2 bootstrap' for GNU Make 3.79 and above, instead of `make bootstrap'
1325 to build GCC in parallel. You can also specify a bigger number, and in
1326 most cases using a value greater than the number of processors in your
1327 machine will result in fewer and shorter I/O latency hits, thus
1328 improving overall throughput; this is especially true for slow drives
1329 and network filesystems.
1331 Building the Ada compiler
1332 =========================
1334 In order to build GNAT, the Ada compiler, you need a working GNAT
1335 compiler (GNAT version 3.14 or later, or GCC version 3.1 or later),
1336 including GNAT tools such as `gnatmake' and `gnatlink', since the Ada
1337 front end is written in Ada (with some GNAT-specific extensions), and
1340 `configure' does not test whether the GNAT installation works and
1341 has a sufficiently recent version; if too old a GNAT version is
1342 installed, the build will fail unless `--enable-languages' is used to
1343 disable building the Ada front end.
1345 At the moment, the GNAT library and several tools for GNAT are not
1346 built by `make bootstrap'. For a native build, you have to invoke
1347 `make gnatlib_and_tools' in the `OBJDIR/gcc' subdirectory before
1348 proceeding with the next steps. For a cross build, you need to invoke
1349 `make gnatlib cross-gnattools ada.all.cross'. For a canadian cross you
1350 only need to invoke `make cross-gnattools'; the GNAT library would be
1351 the same as the one built for the cross compiler.
1353 For example, you can build a native Ada compiler by issuing the
1354 following commands (assuming `make' is GNU make):
1357 SRCDIR/configure --enable-languages=c,ada
1361 make gnatlib_and_tools
1364 Currently, when compiling the Ada front end, you cannot use the
1365 parallel build feature described in the previous section.
1367 Building with profile feedback
1368 ==============================
1370 It is possible to use profile feedback to optimize the compiler
1371 itself. This should result in a faster compiler binary. Experiments
1372 done on x86 using gcc 3.3 showed approximately 7 percent speedup on
1373 compiling C programs. To bootstrap compiler with profile feedback, use
1374 `make profiledbootstrap'.
1376 When `make profiledbootstrap' is run, it will first build a `stage1'
1377 compiler. This compiler is used to build a `stageprofile' compiler
1378 instrumented to collect execution counts of instruction and branch
1379 probabilities. Then runtime libraries are compiled with profile
1380 collected. Finally a `stagefeedback' compiler is built using the
1381 information collected.
1383 Unlike `make bootstrap' several additional restrictions apply. The
1384 compiler used to build `stage1' needs to support a 64-bit integral type.
1385 It is recommended to only use GCC for this. Also parallel make is
1386 currently not supported since collisions in profile collecting may
1390 File: gccinstall.info, Node: Testing, Next: Final install, Prev: Building, Up: Installing GCC
1392 Installing GCC: Testing
1393 ***********************
1395 Before you install GCC, we encourage you to run the testsuites and to
1396 compare your results with results from a similar configuration that have
1397 been submitted to the gcc-testresults mailing list. Some of these
1398 archived results are linked from the build status lists at
1399 `http://gcc.gnu.org/buildstat.html', although not everyone who reports
1400 a successful build runs the testsuites and submits the results. This
1401 step is optional and may require you to download additional software,
1402 but it can give you confidence in your new GCC installation or point out
1403 problems before you install and start using your new GCC.
1405 First, you must have downloaded the testsuites. These are part of
1406 the full distribution, but if you downloaded the "core" compiler plus
1407 any front ends, you must download the testsuites separately.
1409 Second, you must have the testing tools installed. This includes
1410 DejaGnu 1.4.1 or 1.4.3 and later, Tcl, and Expect; the DejaGnu site has
1413 If the directories where `runtest' and `expect' were installed are
1414 not in the `PATH', you may need to set the following environment
1415 variables appropriately, as in the following example (which assumes
1416 that DejaGnu has been installed under `/usr/local'):
1418 TCL_LIBRARY = /usr/local/share/tcl8.0
1419 DEJAGNULIBS = /usr/local/share/dejagnu
1421 (On systems such as Cygwin, these paths are required to be actual
1422 paths, not mounts or links; presumably this is due to some lack of
1423 portability in the DejaGnu code.)
1425 Finally, you can run the testsuite (which may take a long time):
1426 cd OBJDIR; make -k check
1428 This will test various components of GCC, such as compiler front
1429 ends and runtime libraries. While running the testsuite, DejaGnu might
1430 emit some harmless messages resembling `WARNING: Couldn't find the
1431 global config file.' or `WARNING: Couldn't find tool init file' that
1434 How can you run the testsuite on selected tests?
1435 ================================================
1437 In order to run sets of tests selectively, there are targets `make
1438 check-gcc' and `make check-g++' in the `gcc' subdirectory of the object
1439 directory. You can also just run `make check' in a subdirectory of the
1442 A more selective way to just run all `gcc' execute tests in the
1445 make check-gcc RUNTESTFLAGS="execute.exp OTHER-OPTIONS"
1447 Likewise, in order to run only the `g++' "old-deja" tests in the
1448 testsuite with filenames matching `9805*', you would use
1450 make check-g++ RUNTESTFLAGS="old-deja.exp=9805* OTHER-OPTIONS"
1452 The `*.exp' files are located in the testsuite directories of the GCC
1453 source, the most important ones being `compile.exp', `execute.exp',
1454 `dg.exp' and `old-deja.exp'. To get a list of the possible `*.exp'
1455 files, pipe the output of `make check' into a file and look at the
1456 `Running ... .exp' lines.
1458 Passing options and running multiple testsuites
1459 ===============================================
1461 You can pass multiple options to the testsuite using the
1462 `--target_board' option of DejaGNU, either passed as part of
1463 `RUNTESTFLAGS', or directly to `runtest' if you prefer to work outside
1464 the makefiles. For example,
1466 make check-g++ RUNTESTFLAGS="--target_board=unix/-O3/-fno-strength-reduce"
1468 will run the standard `g++' testsuites ("unix" is the target name
1469 for a standard native testsuite situation), passing `-O3
1470 -fno-strength-reduce' to the compiler on every test, i.e., slashes
1473 You can run the testsuites multiple times using combinations of
1474 options with a syntax similar to the brace expansion of popular shells:
1476 ..."--target_board=arm-sim{-mhard-float,-msoft-float}{-O1,-O2,-O3,}"
1478 (Note the empty option caused by the trailing comma in the final
1479 group.) The following will run each testsuite eight times using the
1480 `arm-sim' target, as if you had specified all possible combinations
1483 --target_board=arm-sim/-mhard-float/-O1
1484 --target_board=arm-sim/-mhard-float/-O2
1485 --target_board=arm-sim/-mhard-float/-O3
1486 --target_board=arm-sim/-mhard-float
1487 --target_board=arm-sim/-msoft-float/-O1
1488 --target_board=arm-sim/-msoft-float/-O2
1489 --target_board=arm-sim/-msoft-float/-O3
1490 --target_board=arm-sim/-msoft-float
1492 They can be combined as many times as you wish, in arbitrary ways.
1495 ..."--target_board=unix/-Wextra{-O3,-fno-strength-reduce}{-fomit-frame-pointer,}"
1497 will generate four combinations, all involving `-Wextra'.
1499 The disadvantage to this method is that the testsuites are run in
1500 serial, which is a waste on multiprocessor systems. For users with GNU
1501 Make and a shell which performs brace expansion, you can run the
1502 testsuites in parallel by having the shell perform the combinations and
1503 `make' do the parallel runs. Instead of using `--target_board', use a
1504 special makefile target:
1506 make -jN check-TESTSUITE//TEST-TARGET/OPTION1/OPTION2/...
1510 make -j3 check-gcc//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
1512 will run three concurrent "make-gcc" testsuites, eventually testing
1513 all ten combinations as described above. Note that this is currently
1514 only supported in the `gcc' subdirectory. (To see how this works, try
1515 typing `echo' before the example given here.)
1517 Additional testing for Java Class Libraries
1518 ===========================================
1520 The Java runtime tests can be executed via `make check' in the
1521 `TARGET/libjava/testsuite' directory in the build tree.
1523 The Mauve Project provides a suite of tests for the Java Class
1524 Libraries. This suite can be run as part of libgcj testing by placing
1525 the Mauve tree within the libjava testsuite at
1526 `libjava/testsuite/libjava.mauve/mauve', or by specifying the location
1527 of that tree when invoking `make', as in `make MAUVEDIR=~/mauve check'.
1529 Jacks is a free testsuite that tests Java compiler front ends. This
1530 suite can be run as part of libgcj testing by placing the Jacks tree
1531 within the libjava testsuite at `libjava/testsuite/libjava.jacks/jacks'.
1533 How to interpret test results
1534 =============================
1536 The result of running the testsuite are various `*.sum' and `*.log'
1537 files in the testsuite subdirectories. The `*.log' files contain a
1538 detailed log of the compiler invocations and the corresponding results,
1539 the `*.sum' files summarize the results. These summaries contain
1540 status codes for all tests:
1542 * PASS: the test passed as expected
1544 * XPASS: the test unexpectedly passed
1546 * FAIL: the test unexpectedly failed
1548 * XFAIL: the test failed as expected
1550 * UNSUPPORTED: the test is not supported on this platform
1552 * ERROR: the testsuite detected an error
1554 * WARNING: the testsuite detected a possible problem
1556 It is normal for some tests to report unexpected failures. At the
1557 current time the testing harness does not allow fine grained control
1558 over whether or not a test is expected to fail. This problem should be
1559 fixed in future releases.
1561 Submitting test results
1562 =======================
1564 If you want to report the results to the GCC project, use the
1565 `contrib/test_summary' shell script. Start it in the OBJDIR with
1567 SRCDIR/contrib/test_summary -p your_commentary.txt \
1568 -m gcc-testresults@gcc.gnu.org |sh
1570 This script uses the `Mail' program to send the results, so make
1571 sure it is in your `PATH'. The file `your_commentary.txt' is prepended
1572 to the testsuite summary and should contain any special remarks you
1573 have on your results or your build environment. Please do not edit the
1574 testsuite result block or the subject line, as these messages may be
1575 automatically processed.
1578 File: gccinstall.info, Node: Final install, Prev: Testing, Up: Installing GCC
1580 Installing GCC: Final installation
1581 **********************************
1583 Now that GCC has been built (and optionally tested), you can install
1585 cd OBJDIR; make install
1587 We strongly recommend to install into a target directory where there
1588 is no previous version of GCC present.
1590 That step completes the installation of GCC; user level binaries can
1591 be found in `PREFIX/bin' where PREFIX is the value you specified with
1592 the `--prefix' to configure (or `/usr/local' by default). (If you
1593 specified `--bindir', that directory will be used instead; otherwise,
1594 if you specified `--exec-prefix', `EXEC-PREFIX/bin' will be used.)
1595 Headers for the C++ and Java libraries are installed in
1596 `PREFIX/include'; libraries in `LIBDIR' (normally `PREFIX/lib');
1597 internal parts of the compiler in `LIBDIR/gcc' and `LIBEXECDIR/gcc';
1598 documentation in info format in `INFODIR' (normally `PREFIX/info').
1600 When installing cross-compilers, GCC's executables are not only
1601 installed into `BINDIR', that is, `EXEC-PREFIX/bin', but additionally
1602 into `EXEC-PREFIX/TARGET-ALIAS/bin', if that directory exists.
1603 Typically, such "tooldirs" hold target-specific binutils, including
1604 assembler and linker.
1606 Installation into a temporary staging area or into a `chroot' jail
1607 can be achieved with the command
1609 make DESTDIR=PATH-TO-ROOTDIR install
1611 where PATH-TO-ROOTDIR is the absolute path of a directory relative to
1612 which all installation paths will be interpreted. Note that the
1613 directory specified by `DESTDIR' need not exist yet; it will be created
1616 There is a subtle point with tooldirs and `DESTDIR': If you relocate
1617 a cross-compiler installation with e.g. `DESTDIR=ROOTDIR', then the
1618 directory `ROOTDIR/EXEC-PREFIX/TARGET-ALIAS/bin' will be filled with
1619 duplicated GCC executables only if it already exists, it will not be
1620 created otherwise. This is regarded as a feature, not as a bug,
1621 because it gives slightly more control to the packagers using the
1624 If you built a released version of GCC using `make bootstrap' then
1625 please quickly review the build status page for your release, available
1626 from `http://gcc.gnu.org/buildstat.html'. If your system is not listed
1627 for the version of GCC that you built, send a note to <gcc@gcc.gnu.org>
1628 indicating that you successfully built and installed GCC. Include the
1629 following information:
1631 * Output from running `SRCDIR/config.guess'. Do not send that file
1632 itself, just the one-line output from running it.
1634 * The output of `gcc -v' for your newly installed `gcc'. This tells
1635 us which version of GCC you built and the options you passed to
1638 * Whether you enabled all languages or a subset of them. If you
1639 used a full distribution then this information is part of the
1640 configure options in the output of `gcc -v', but if you downloaded
1641 the "core" compiler plus additional front ends then it isn't
1642 apparent which ones you built unless you tell us about it.
1644 * If the build was for GNU/Linux, also include:
1645 * The distribution name and version (e.g., Red Hat 7.1 or
1646 Debian 2.2.3); this information should be available from
1649 * The version of the Linux kernel, available from `uname
1650 --version' or `uname -a'.
1652 * The version of glibc you used; for RPM-based systems like Red
1653 Hat, Mandrake, and SuSE type `rpm -q glibc' to get the glibc
1654 version, and on systems like Debian and Progeny use `dpkg -l
1656 For other systems, you can include similar information if you
1657 think it is relevant.
1659 * Any other information that you think would be useful to people
1660 building GCC on the same configuration. The new entry in the
1661 build status list will include a link to the archived copy of your
1664 We'd also like to know if the *Note host/target specific
1665 installation notes: Specific didn't include your host/target
1666 information or if that information is incomplete or out of date. Send
1667 a note to <gcc@gcc.gnu.org> detailing how the information should be
1670 If you find a bug, please report it following the bug reporting
1673 If you want to print the GCC manuals, do `cd OBJDIR; make dvi'. You
1674 will need to have `texi2dvi' (version at least 4.2) and TeX installed.
1675 This creates a number of `.dvi' files in subdirectories of `OBJDIR';
1676 these may be converted for printing with programs such as `dvips'. You
1677 can also buy printed manuals from the Free Software Foundation, though
1678 such manuals may not be for the most recent version of GCC.
1681 File: gccinstall.info, Node: Binaries, Next: Specific, Prev: Installing GCC, Up: Top
1683 Installing GCC: Binaries
1684 ************************
1686 We are often asked about pre-compiled versions of GCC. While we
1687 cannot provide these for all platforms, below you'll find links to
1688 binaries for various platforms where creating them by yourself is not
1689 easy due to various reasons.
1691 Please note that we did not create these binaries, nor do we support
1692 them. If you have any problems installing them, please contact their
1696 * Bull's Freeware and Shareware Archive for AIX;
1698 * UCLA Software Library for AIX.
1702 * Renesas H8/300[HS]--GNU Development Tools for the Renesas
1706 * HP-UX Porting Center;
1708 * Binaries for HP-UX 11.00 at Aachen University of Technology.
1710 * Motorola 68HC11/68HC12--GNU Development Tools for the Motorola
1713 * SCO OpenServer/Unixware.
1715 * Sinix/Reliant Unix--Siemens.
1717 * Solaris 2 (SPARC, Intel)--Sunfreeware.
1719 * SGI--SGI Freeware.
1721 * Microsoft Windows:
1722 * The Cygwin project;
1724 * The MinGW project.
1726 * The Written Word offers binaries for AIX 4.3.2. IRIX 6.5, Digital
1727 UNIX 4.0D and 5.1, GNU/Linux (i386), HP-UX 10.20, 11.00, and
1728 11.11, and Solaris/SPARC 2.5.1, 2.6, 2.7, 8, and 9,
1730 * OpenPKG offers binaries for quite a number of platforms.
1732 In addition to those specific offerings, you can get a binary
1733 distribution CD-ROM from the Free Software Foundation. It contains
1734 binaries for a number of platforms, and includes not only GCC, but
1735 other stuff as well. The current CD does not contain the latest
1736 version of GCC, but it should allow bootstrapping the compiler. An
1737 updated version of that disk is in the works.
1740 File: gccinstall.info, Node: Specific, Next: Old, Prev: Binaries, Up: Top
1742 Host/target specific installation notes for GCC
1743 ***********************************************
1745 Please read this document carefully _before_ installing the GNU
1746 Compiler Collection on your machine.
1751 This section contains general configuration information for all
1752 alpha-based platforms using ELF (in particular, ignore this section for
1753 DEC OSF/1, Digital UNIX and Tru64 UNIX). In addition to reading this
1754 section, please read all other sections that match your target.
1756 We require binutils 2.11.2 or newer. Previous binutils releases had
1757 a number of problems with DWARF 2 debugging information, not the least
1758 of which is incorrect linking of shared libraries.
1763 Systems using processors that implement the DEC Alpha architecture
1764 and are running the DEC/Compaq Unix (DEC OSF/1, Digital UNIX, or Compaq
1765 Tru64 UNIX) operating system, for example the DEC Alpha AXP systems.
1767 As of GCC 3.2, versions before `alpha*-dec-osf4' are no longer
1768 supported. (These are the versions which identify themselves as DEC
1771 In Digital Unix V4.0, virtual memory exhausted bootstrap failures
1772 may be fixed by configuring with `--with-gc=simple', reconfiguring
1773 Kernel Virtual Memory and Swap parameters per the `/usr/sbin/sys_check'
1774 Tuning Suggestions, or applying the patch in
1775 `http://gcc.gnu.org/ml/gcc/2002-08/msg00822.html'.
1777 In Tru64 UNIX V5.1, Compaq introduced a new assembler that does not
1778 currently (2001-06-13) work with `mips-tfile'. As a workaround, we
1779 need to use the old assembler, invoked via the barely documented
1780 `-oldas' option. To bootstrap GCC, you either need to use the Compaq C
1783 % CC=cc SRCDIR/configure [OPTIONS] [TARGET]
1785 or you can use a copy of GCC 2.95.3 or higher built on Tru64 UNIX
1788 % CC=gcc -Wa,-oldas SRCDIR/configure [OPTIONS] [TARGET]
1790 As of GNU binutils 2.11.2, neither GNU `as' nor GNU `ld' are
1791 supported on Tru64 UNIX, so you must not configure GCC with
1792 `--with-gnu-as' or `--with-gnu-ld'.
1794 GCC writes a `.verstamp' directive to the assembler output file
1795 unless it is built as a cross-compiler. It gets the version to use from
1796 the system header file `/usr/include/stamp.h'. If you install a new
1797 version of DEC Unix, you should rebuild GCC to pick up the new version
1800 Note that since the Alpha is a 64-bit architecture, cross-compilers
1801 from 32-bit machines will not generate code as efficient as that
1802 generated when the compiler is running on a 64-bit machine because many
1803 optimizations that depend on being able to represent a word on the
1804 target in an integral value on the host cannot be performed. Building
1805 cross-compilers on the Alpha for 32-bit machines has only been tested in
1806 a few cases and may not work properly.
1808 `make compare' may fail on old versions of DEC Unix unless you add
1809 `-save-temps' to `CFLAGS'. On these systems, the name of the assembler
1810 input file is stored in the object file, and that makes comparison fail
1811 if it differs between the `stage1' and `stage2' compilations. The
1812 option `-save-temps' forces a fixed name to be used for the assembler
1813 input file, instead of a randomly chosen name in `/tmp'. Do not add
1814 `-save-temps' unless the comparisons fail without that option. If you
1815 add `-save-temps', you will have to manually delete the `.i' and `.s'
1816 files after each series of compilations.
1818 GCC now supports both the native (ECOFF) debugging format used by DBX
1819 and GDB and an encapsulated STABS format for use only with GDB. See the
1820 discussion of the `--with-stabs' option of `configure' above for more
1821 information on these formats and how to select them.
1823 There is a bug in DEC's assembler that produces incorrect line
1824 numbers for ECOFF format when the `.align' directive is used. To work
1825 around this problem, GCC will not emit such alignment directives while
1826 writing ECOFF format debugging information even if optimization is
1827 being performed. Unfortunately, this has the very undesirable
1828 side-effect that code addresses when `-O' is specified are different
1829 depending on whether or not `-g' is also specified.
1831 To avoid this behavior, specify `-gstabs+' and use GDB instead of
1832 DBX. DEC is now aware of this problem with the assembler and hopes to
1833 provide a fix shortly.
1835 alphaev5-cray-unicosmk*
1836 =======================
1838 Cray T3E systems running Unicos/Mk.
1840 This port is incomplete and has many known bugs. We hope to improve
1841 the support for this target soon. Currently, only the C front end is
1842 supported, and it is not possible to build parallel applications. Cray
1843 modules are not supported; in particular, Craylibs are assumed to be in
1844 `/opt/ctl/craylibs/craylibs'.
1846 You absolutely *must* use GNU make on this platform. Also, you need
1847 to tell GCC where to find the assembler and the linker. The simplest
1848 way to do so is by providing `--with-as' and `--with-ld' to
1851 configure --with-as=/opt/ctl/bin/cam --with-ld=/opt/ctl/bin/cld \
1852 --enable-languages=c
1854 The comparison test during `make bootstrap' fails on Unicos/Mk
1855 because the assembler inserts timestamps into object files. You should
1856 be able to work around this by doing `make all' after getting this
1862 Argonaut ARC processor. This configuration is intended for embedded
1871 ARM-family processors. Subtargets that use the ELF object format
1872 require GNU binutils 2.13 or newer. Such subtargets include:
1873 `arm-*-freebsd', `arm-*-netbsdelf', `arm-*-*linux', `arm-*-rtems' and
1879 ARM-family processors. Note that there are two different varieties
1880 of PE format subtarget supported: `arm-wince-pe' and `arm-pe' as well
1881 as a standard COFF target `arm-*-coff'.
1886 ARM-family processors. These targets support the AOUT file format:
1887 `arm-*-aout', `arm-*-netbsd'.
1892 ATMEL AVR-family micro controllers. These are used in embedded
1893 applications. There are no standard Unix configurations. *Note AVR
1894 Options: (gcc)AVR Options, for the list of supported MCU types.
1896 Use `configure --target=avr --enable-languages="c"' to configure GCC.
1898 Further installation notes and other useful information about AVR
1899 tools can also be obtained from:
1901 * http://www.openavr.org
1903 * http://home.overta.ru/users/denisc/
1905 * http://www.amelek.gda.pl/avr/
1907 We _strongly_ recommend using binutils 2.13 or newer.
1909 The following error:
1910 Error: register required
1912 indicates that you should upgrade to a newer version of the binutils.
1917 Texas Instruments TMS320C3x and TMS320C4x Floating Point Digital
1918 Signal Processors. These are used in embedded applications. There are
1919 no standard Unix configurations. *Note TMS320C3x/C4x Options:
1920 (gcc)TMS320C3x/C4x Options, for the list of supported MCU types.
1922 GCC can be configured as a cross compiler for both the C3x and C4x
1923 architectures on the same system. Use `configure --target=c4x
1924 --enable-languages="c,c++"' to configure.
1926 Further installation notes and other useful information about C4x
1927 tools can also be obtained from:
1929 * http://www.elec.canterbury.ac.nz/c4x/
1934 CRIS is the CPU architecture in Axis Communications ETRAX
1935 system-on-a-chip series. These are used in embedded applications.
1937 *Note CRIS Options: (gcc)CRIS Options, for a list of CRIS-specific
1940 There are a few different CRIS targets:
1942 Old target. Includes a multilib for the `elinux' a.out-based
1943 target. No multilibs for newer architecture variants.
1946 Mainly for monolithic embedded systems. Includes a multilib for
1947 the `v10' core used in `ETRAX 100 LX'.
1949 `cris-axis-linux-gnu'
1950 A GNU/Linux port for the CRIS architecture, currently targeting
1951 `ETRAX 100 LX' by default.
1953 For `cris-axis-aout' and `cris-axis-elf' you need binutils 2.11 or
1954 newer. For `cris-axis-linux-gnu' you need binutils 2.12 or newer.
1956 Pre-packaged tools can be obtained from
1957 `ftp://ftp.axis.com/pub/axis/tools/cris/compiler-kit/'. More
1958 information about this platform is available at
1959 `http://developer.axis.com/'.
1964 Please have a look at the binaries page.
1966 You cannot install GCC by itself on MSDOS; it will not compile under
1967 any MSDOS compiler except itself. You need to get the complete
1968 compilation package DJGPP, which includes binaries as well as sources,
1969 and includes all the necessary compilation tools and libraries.
1974 A port to the AT&T DSP1610 family of processors.
1979 The version of binutils installed in `/usr/bin' probably works with
1980 this release of GCC. However, on FreeBSD 4, bootstrapping against the
1981 latest FSF binutils is known to improve overall testsuite results; and,
1982 on FreeBSD/alpha, using binutils 2.14 or later is required to build
1985 Support for FreeBSD 1 was discontinued in GCC 3.2.
1987 Support for FreeBSD 2 will be discontinued after GCC 3.4. The
1988 following was true for GCC 3.1 but the current status is unknown. For
1989 FreeBSD 2 or any mutant a.out versions of FreeBSD 3: All configuration
1990 support and files as shipped with GCC 2.95 are still in place. FreeBSD
1991 2.2.7 has been known to bootstrap completely; however, it is unknown
1992 which version of binutils was used (it is assumed that it was the
1993 system copy in `/usr/bin') and C++ EH failures were noted.
1995 For FreeBSD using the ELF file format: DWARF 2 debugging is now the
1996 default for all CPU architectures. It had been the default on
1997 FreeBSD/alpha since its inception. You may use `-gstabs' instead of
1998 `-g', if you really want the old debugging format. There are no known
1999 issues with mixing object files and libraries with different debugging
2000 formats. Otherwise, this release of GCC should now match more of the
2001 configuration used in the stock FreeBSD configuration of GCC. In
2002 particular, `--enable-threads' is now configured by default. However,
2003 as a general user, do not attempt to replace the system compiler with
2004 this release. Known to bootstrap and check with good results on
2005 FreeBSD 4.9-STABLE and 5-CURRENT. In the past, known to bootstrap and
2006 check with good results on FreeBSD 3.0, 3.4, 4.0, 4.2, 4.3, 4.4, 4.5,
2009 In principle, `--enable-threads' is now compatible with
2010 `--enable-libgcj' on FreeBSD. However, it has only been built and
2011 tested on `i386-*-freebsd[45]' and `alpha-*-freebsd[45]'. The static
2012 library may be incorrectly built (symbols are missing at link time).
2013 There is a rare timing-based startup hang (probably involves an
2014 assumption about the thread library). Multi-threaded boehm-gc
2015 (required for libjava) exposes severe threaded signal-handling bugs on
2016 FreeBSD before 4.5-RELEASE. Other CPU architectures supported by
2017 FreeBSD will require additional configuration tuning in, at the very
2018 least, both boehm-gc and libffi.
2020 Shared `libgcc_s.so' is now built and installed by default.
2025 Renesas H8/300 series of processors.
2027 Please have a look at the binaries page.
2029 The calling convention and structure layout has changed in release
2030 2.6. All code must be recompiled. The calling convention now passes
2031 the first three arguments in function calls in registers. Structures
2032 are no longer a multiple of 2 bytes.
2037 Support for HP-UX version 9 and older was discontinued in GCC 3.4.
2039 We _highly_ recommend using gas/binutils 2.8 or newer on all hppa
2040 platforms; you may encounter a variety of problems when using the HP
2043 Specifically, `-g' does not work on HP-UX (since that system uses a
2044 peculiar debugging format which GCC does not know about), unless you
2045 use GAS and GDB and configure GCC with the `--with-gnu-as' and
2046 `--with-as=...' options.
2048 If you wish to use the pa-risc 2.0 architecture support with a 32-bit
2049 runtime, you must use either the HP assembler, or gas/binutils 2.11 or
2052 There are two default scheduling models for instructions. These are
2053 PROCESSOR_7100LC and PROCESSOR_8000. They are selected from the pa-risc
2054 architecture specified for the target machine when configuring.
2055 PROCESSOR_8000 is the default. PROCESSOR_7100LC is selected when the
2056 target is a `hppa1*' machine.
2058 The PROCESSOR_8000 model is not well suited to older processors.
2059 Thus, it is important to completely specify the machine architecture
2060 when configuring if you want a model other than PROCESSOR_8000. The
2061 macro TARGET_SCHED_DEFAULT can be defined in BOOT_CFLAGS if a different
2062 default scheduling model is desired.
2064 More specific information to `hppa*-hp-hpux*' targets follows.
2069 For hpux10.20, we _highly_ recommend you pick up the latest sed patch
2070 `PHCO_19798' from HP. HP has two sites which provide patches free of
2073 * `http://us.itrc.hp.com/service/home/home.do' US, Canada,
2074 Asia-Pacific, and Latin-America.
2076 * `http://europe.itrc.hp.com/service/home/home.do' Europe.
2078 The HP assembler on these systems has some problems. Most notably
2079 the assembler inserts timestamps into each object file it creates,
2080 causing the 3-stage comparison test to fail during a `make bootstrap'.
2081 You should be able to continue by saying `make all' after getting the
2082 failure from `make bootstrap'.
2087 GCC 3.0 and up support HP-UX 11. GCC 2.95.x is not supported and
2088 cannot be used to compile GCC 3.0 and up.
2090 Refer to binaries for information about obtaining precompiled GCC
2091 binaries for HP-UX. Precompiled binaries must be obtained to build the
2092 Ada language as it can't be bootstrapped using C. Ada is only
2093 available for the 32-bit PA-RISC runtime. The libffi and libjava
2094 haven't been ported to HP-UX and don't build.
2096 It is possible to build GCC 3.3 starting with the bundled HP
2097 compiler, but the process requires several steps. GCC 3.3 can then be
2098 used to build later versions. The fastjar program contains ISO C code
2099 and can't be built with the HP bundled compiler. This problem can be
2100 avoided by not building the Java language. For example, use the
2101 `--enable-languages="c,c++,f77,objc"' option in your configure command.
2103 Starting with GCC 3.4 an ISO C compiler is required to bootstrap.
2104 The bundled compiler supports only traditional C; you will need either
2105 HP's unbundled compiler, or a binary distribution of GCC.
2107 There are several possible approaches to building the distribution.
2108 Binutils can be built first using the HP tools. Then, the GCC
2109 distribution can be built. The second approach is to build GCC first
2110 using the HP tools, then build binutils, then rebuild GCC. There have
2111 been problems with various binary distributions, so it is best not to
2112 start from a binary distribution.
2114 On 64-bit capable systems, there are two distinct targets. Different
2115 installation prefixes must be used if both are to be installed on the
2116 same system. The `hppa[1-2]*-hp-hpux11*' target generates code for the
2117 32-bit PA-RISC runtime architecture and uses the HP linker. The
2118 `hppa64-hp-hpux11*' target generates 64-bit code for the PA-RISC 2.0
2119 architecture. The HP and GNU linkers are both supported for this
2122 The script config.guess now selects the target type based on the
2123 compiler detected during configuration. You must define `PATH' or `CC'
2124 so that configure finds an appropriate compiler for the initial
2125 bootstrap. When `CC' is used, the definition should contain the
2126 options that are needed whenever `CC' is used.
2128 Specifically, options that determine the runtime architecture must be
2129 in `CC' to correctly select the target for the build. It is also
2130 convenient to place many other compiler options in `CC'. For example,
2131 `CC="cc -Ac +DA2.0W -Wp,-H16376 -D_CLASSIC_TYPES -D_HPUX_SOURCE"' can
2132 be used to bootstrap the GCC 3.3 branch with the HP compiler in 64-bit
2133 K&R/bundled mode. The `+DA2.0W' option will result in the automatic
2134 selection of the `hppa64-hp-hpux11*' target. The macro definition
2135 table of cpp needs to be increased for a successful build with the HP
2136 compiler. _CLASSIC_TYPES and _HPUX_SOURCE need to be defined when
2137 building with the bundled compiler, or when using the `-Ac' option.
2138 These defines aren't necessary with `-Ae'.
2140 It is best to explicitly configure the `hppa64-hp-hpux11*' target
2141 with the `--with-ld=...' option. This overrides the standard search
2142 for ld. The two linkers supported on this target require different
2143 commands. The default linker is determined during configuration. As a
2144 result, it's not possible to switch linkers in the middle of a GCC
2145 build. This has been been reported to sometimes occur in unified
2146 builds of binutils and GCC.
2148 With GCC 3.0 through 3.2, you must use binutils 2.11 or above. As of
2149 GCC 3.3, binutils 2.14 or later is required.
2151 Although the HP assembler can be used for an initial build, it
2152 shouldn't be used with any languages other than C and perhaps Fortran
2153 due to its many limitations. For example, it does not support weak
2154 symbols or alias definitions. As a result, explicit template
2155 instantiations are required when using C++. This makes it difficult if
2156 not impossible to build many C++ applications. You can't generate
2157 debugging information when using the HP assembler. Finally, `make
2158 bootstrap' fails in the final comparison of object modules due to the
2159 time stamps that it inserts into the modules. The bootstrap can be
2160 continued from this point with `make all'.
2162 A recent linker patch must be installed for the correct operation of
2163 GCC 3.3 and later. `PHSS_26559' and `PHSS_24304' are the oldest linker
2164 patches that are known to work. They are for HP-UX 11.00 and 11.11,
2165 respectively. `PHSS_24303', the companion to `PHSS_24304', might be
2166 usable but it hasn't been tested. These patches have been superseded.
2167 Consult the HP patch database to obtain the currently recommended
2168 linker patch for your system.
2170 The patches are necessary for the support of weak symbols on the
2171 32-bit port, and for the running of initializers and finalizers. Weak
2172 symbols are implemented using SOM secondary definition symbols. Prior
2173 to HP-UX 11, there are bugs in the linker support for secondary symbols.
2174 The patches correct a problem of linker core dumps creating shared
2175 libraries containing secondary symbols, as well as various other
2176 linking issues involving secondary symbols.
2178 GCC 3.3 uses the ELF DT_INIT_ARRAY and DT_FINI_ARRAY capabilities to
2179 run initializers and finalizers on the 64-bit port. The 32-bit port
2180 uses the linker `+init' and `+fini' options for the same purpose. The
2181 patches correct various problems with the +init/+fini options,
2182 including program core dumps. Binutils 2.14 corrects a problem on the
2183 64-bit port resulting from HP's non-standard use of the .init and .fini
2184 sections for array initializers and finalizers.
2186 There are a number of issues to consider in selecting which linker to
2187 use with the 64-bit port. The GNU 64-bit linker can only create dynamic
2188 binaries. The `-static' option causes linking with archive libraries
2189 but doesn't produce a truly static binary. Dynamic binaries still
2190 require final binding by the dynamic loader to resolve a set of
2191 dynamic-loader-defined symbols. The default behavior of the HP linker
2192 is the same as the GNU linker. However, it can generate true 64-bit
2193 static binaries using the `+compat' option.
2195 The HP 64-bit linker doesn't support linkonce semantics. As a
2196 result, C++ programs have many more sections than they should.
2198 The GNU 64-bit linker has some issues with shared library support
2199 and exceptions. As a result, we only support libgcc in archive format.
2200 For similar reasons, dwarf2 unwind and exception support are disabled.
2201 The GNU linker also has problems creating binaries with `-static'. It
2202 doesn't provide stubs for internal calls to global functions in shared
2203 libraries, so these calls can't be overloaded.
2205 Thread support is not implemented in GCC 3.0 through 3.2, so the
2206 `--enable-threads' configure option does not work. In 3.3 and later,
2207 POSIX threads are supported. The optional DCE thread library is not
2210 This port still is undergoing significant development.
2215 This port is very preliminary and has many known bugs. We hope to
2216 have a higher-quality port for this machine soon.
2221 Versions of libstdc++-v3 starting with 3.2.1 require bugfixes present
2222 in glibc 2.2.5 and later. More information is available in the
2223 libstdc++-v3 documentation.
2228 Use this configuration to generate `a.out' binaries on Linux-based
2229 GNU systems. This configuration is being superseded.
2234 As of GCC 3.3, binutils 2.13.1 or later is required for this
2235 platform. See bug 10877 for more information.
2237 If you receive Signal 11 errors when building on GNU/Linux, then it
2238 is possible you have a hardware problem. Further information on this
2239 can be found on www.bitwizard.nl.
2241 Some recent versions of GNU/Linux, such as Fedora Core 1, support
2242 exec-shield-randomize. Turning this on interferes with precompiled
2243 headers. If you need to use precompiled headers, exec-shield-randomize
2244 can be turned off for the entire system by editing `/etc/sysctl.conf'
2246 kernel.exec-shield-randomize = 0
2247 You may then need to run `sysctl -p'.
2249 This will be fixed in future releases of GCC.
2254 Use this for the SCO OpenServer Release 5 family of operating
2257 Unlike earlier versions of GCC, the ability to generate COFF with
2258 this target is no longer provided.
2260 Earlier versions of GCC emitted DWARF 1 when generating ELF to allow
2261 the system debugger to be used. That support was too burdensome to
2262 maintain. GCC now emits only DWARF 2 for this target. This means you
2263 may use either the UDK debugger or GDB to debug programs built by this
2266 GCC is now only supported on releases 5.0.4 and later, and requires
2267 that you install Support Level Supplement OSS646B or later, and Support
2268 Level Supplement OSS631C or later. If you are using release 5.0.7 of
2269 OpenServer, you must have at least the first maintenance pack installed
2270 (this includes the relevant portions of OSS646). OSS646, also known as
2271 the "Execution Environment Update", provides updated link editors and
2272 assemblers, as well as updated standard C and math libraries. The C
2273 startup modules are also updated to support the System V gABI draft, and
2274 GCC relies on that behavior. OSS631 provides a collection of commonly
2275 used open source libraries, some of which GCC depends on (such as GNU
2276 gettext and zlib). SCO OpenServer Release 5.0.7 has all of this built
2277 in by default, but OSS631C and later also apply to that release. Please
2278 visit ftp://ftp.sco.com/pub/openserver5 for the latest versions of
2279 these (and other potentially useful) supplements.
2281 Although there is support for using the native assembler, it is
2282 recommended that you configure GCC to use the GNU assembler. You do
2283 this by using the flags `--with-gnu-as'. You should use a modern
2284 version of GNU binutils. Version 2.13.2.1 was used for all testing.
2285 In general, only the `--with-gnu-as' option is tested. A modern
2286 bintuils (as well as a plethora of other development related GNU
2287 utilities) can be found in Support Level Supplement OSS658A, the "GNU
2288 Development Tools" package. See the SCO web and ftp sites for details.
2289 That package also contains the currently "officially supported" version
2290 of GCC, version 2.95.3. It is useful for bootstrapping this version.
2295 This target emulates the SCO Universal Development Kit and requires
2296 that package be installed. (If it is installed, you will have a
2297 `/udk/usr/ccs/bin/cc' file present.) It's very much like the
2298 `i?86-*-unixware7*' target but is meant to be used when hosting on a
2299 system where UDK isn't the default compiler such as OpenServer 5 or
2300 Unixware 2. This target will generate binaries that will run on
2301 OpenServer, Unixware 2, or Unixware 7, with the same warnings and
2302 caveats as the SCO UDK.
2304 This target is a little tricky to build because we have to
2305 distinguish it from the native tools (so it gets headers, startups, and
2306 libraries from the right place) while making the tools not think we're
2307 actually building a cross compiler. The easiest way to do this is
2308 with a configure command like this:
2310 CC=/udk/usr/ccs/bin/cc /YOUR/PATH/TO/gcc/configure \
2311 --host=i686-pc-udk --target=i686-pc-udk --program-prefix=udk-
2313 _You should substitute `i686' in the above command with the
2314 appropriate processor for your host._
2316 After the usual `make bootstrap' and `make install', you can then
2317 access the UDK-targeted GCC tools by adding `udk-' before the commonly
2318 known name. For example, to invoke the C compiler, you would use
2319 `udk-gcc'. They will coexist peacefully with any native-target GCC
2320 tools you may have installed.
2325 IA-64 processor (also known as IPF, or Itanium Processor Family)
2328 If you are using the optional libunwind library, then you must use
2329 libunwind 0.96 or later.
2331 None of the following versions of GCC has an ABI that is compatible
2332 with any of the other versions in this list, with the exception that
2333 Red Hat 2.96 and Trillian 000171 are compatible with each other: 3.1,
2334 3.0.2, 3.0.1, 3.0, Red Hat 2.96, and Trillian 000717. This primarily
2335 affects C++ programs and programs that create shared libraries. GCC
2336 3.1 or later is recommended for compiling linux, the kernel. As of
2337 version 3.1 GCC is believed to be fully ABI compliant, and hence no
2338 more major ABI changes are expected.
2343 Building GCC on this target requires the GNU Assembler. The bundled
2344 HP assembler will not work. To prevent GCC from using the wrong
2345 assembler, the option `--with-gnu-as' may be necessary.
2347 The GCC libunwind library has not been ported to HPUX. This means
2348 that for GCC versions 3.2.3 and earlier, `--enable-libunwind-exceptions'
2349 is required to build GCC. For GCC 3.3 and later, this is the default.
2354 Support for AIX version 3 and older was discontinued in GCC 3.4.
2356 AIX Make frequently has problems with GCC makefiles. GNU Make
2357 3.79.1 or newer is recommended to build on this platform.
2359 To speed up the configuration phases of bootstrapping and installing
2360 GCC, one may use GNU Bash instead of AIX `/bin/sh', e.g.,
2362 % CONFIG_SHELL=/opt/freeware/bin/bash
2363 % export CONFIG_SHELL
2365 and then proceed as described in the build instructions, where we
2366 strongly recommend using GNU make and specifying an absolute path to
2367 invoke SRCDIR/configure.
2369 Errors involving `alloca' when building GCC generally are due to an
2370 incorrect definition of `CC' in the Makefile or mixing files compiled
2371 with the native C compiler and GCC. During the stage1 phase of the
2372 build, the native AIX compiler *must* be invoked as `cc' (not `xlc').
2373 Once `configure' has been informed of `xlc', one needs to use `make
2374 distclean' to remove the configure cache files and ensure that `CC'
2375 environment variable does not provide a definition that will confuse
2376 `configure'. If this error occurs during stage2 or later, then the
2377 problem most likely is the version of Make (see above).
2379 The native `as' and `ld' are recommended for bootstrapping on AIX 4
2380 and required for bootstrapping on AIX 5L. The GNU Assembler reports
2381 that it supports WEAK symbols on AIX 4, which causes GCC to try to
2382 utilize weak symbol functionality although it is not supported. The GNU
2383 Assembler and Linker do not support AIX 5L sufficiently to bootstrap
2384 GCC. The native AIX tools do interoperate with GCC.
2386 Building `libstdc++.a' requires a fix for an AIX Assembler bug APAR
2387 IY26685 (AIX 4.3) or APAR IY25528 (AIX 5.1). It also requires a fix
2388 for another AIX Assembler bug and a co-dependent AIX Archiver fix
2389 referenced as APAR IY53606 (AIX 5.2) or a APAR IY54774 (AIX 5.1)
2391 `libstdc++' in GCC 3.4 increments the major version number of the
2392 shared object and GCC installation places the `libstdc++.a' shared
2393 library in a common location which will overwrite the and GCC 3.3
2394 version of the shared library. Applications either need to be
2395 re-linked against the new shared library or the GCC 3.1 and GCC 3.3
2396 versions of the `libstdc++' shared object needs to be available to the
2397 AIX runtime loader. The GCC 3.1 `libstdc++.so.4', if present, and GCC
2398 3.3 `libstdc++.so.5' shared objects can be installed for runtime
2399 dynamic loading using the following steps to set the `F_LOADONLY' flag
2400 in the shared object for _each_ multilib `libstdc++.a' installed:
2402 Extract the shared objects from the currently installed
2403 `libstdc++.a' archive:
2404 % ar -x libstdc++.a libstdc++.so.4 libstdc++.so.5
2406 Enable the `F_LOADONLY' flag so that the shared object will be
2407 available for runtime dynamic loading, but not linking:
2408 % strip -e libstdc++.so.4 libstdc++.so.5
2410 Archive the runtime-only shared object in the GCC 3.4 `libstdc++.a'
2412 % ar -q libstdc++.a libstdc++.so.4 libstdc++.so.5
2414 Linking executables and shared libraries may produce warnings of
2415 duplicate symbols. The assembly files generated by GCC for AIX always
2416 have included multiple symbol definitions for certain global variable
2417 and function declarations in the original program. The warnings should
2418 not prevent the linker from producing a correct library or runnable
2421 AIX 4.3 utilizes a "large format" archive to support both 32-bit and
2422 64-bit object modules. The routines provided in AIX 4.3.0 and AIX 4.3.1
2423 to parse archive libraries did not handle the new format correctly.
2424 These routines are used by GCC and result in error messages during
2425 linking such as "not a COFF file". The version of the routines shipped
2426 with AIX 4.3.1 should work for a 32-bit environment. The `-g' option
2427 of the archive command may be used to create archives of 32-bit objects
2428 using the original "small format". A correct version of the routines
2429 is shipped with AIX 4.3.2 and above.
2431 Some versions of the AIX binder (linker) can fail with a relocation
2432 overflow severe error when the `-bbigtoc' option is used to link
2433 GCC-produced object files into an executable that overflows the TOC. A
2434 fix for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND -BBIGTOC)
2435 is available from IBM Customer Support and from its
2436 techsupport.services.ibm.com website as PTF U455193.
2438 The AIX 4.3.2.1 linker (bos.rte.bind_cmds Level 4.3.2.1) will dump
2439 core with a segmentation fault when invoked by any version of GCC. A
2440 fix for APAR IX87327 is available from IBM Customer Support and from its
2441 techsupport.services.ibm.com website as PTF U461879. This fix is
2442 incorporated in AIX 4.3.3 and above.
2444 The initial assembler shipped with AIX 4.3.0 generates incorrect
2445 object files. A fix for APAR IX74254 (64BIT DISASSEMBLED OUTPUT FROM
2446 COMPILER FAILS TO ASSEMBLE/BIND) is available from IBM Customer Support
2447 and from its techsupport.services.ibm.com website as PTF U453956. This
2448 fix is incorporated in AIX 4.3.1 and above.
2450 AIX provides National Language Support (NLS). Compilers and
2451 assemblers use NLS to support locale-specific representations of
2452 various data formats including floating-point numbers (e.g., `.' vs
2453 `,' for separating decimal fractions). There have been problems
2454 reported where GCC does not produce the same floating-point formats
2455 that the assembler expects. If one encounters this problem, set the
2456 `LANG' environment variable to `C' or `En_US'.
2458 By default, GCC for AIX 4.1 and above produces code that can be used
2459 on both Power or PowerPC processors.
2461 A default can be specified with the `-mcpu=CPU_TYPE' switch and
2462 using the configure option `--with-cpu-CPU_TYPE'.
2467 Ubicom IP2022 micro controller. This configuration is intended for
2468 embedded systems. There are no standard Unix configurations.
2470 Use `configure --target=ip2k-elf --enable-languages=c' to configure
2476 Vitesse IQ2000 processors. These are used in embedded applications.
2477 There are no standard Unix configurations.
2482 Renesas M32R processor. This configuration is intended for embedded
2488 Motorola 68HC11 family micro controllers. These are used in embedded
2489 applications. There are no standard Unix configurations.
2494 Motorola 68HC12 family micro controllers. These are used in embedded
2495 applications. There are no standard Unix configurations.
2500 HP 9000 series 300 or 400 running HP-UX. HP-UX version 8.0 has a
2501 bug in the assembler that prevents compilation of GCC. This bug
2502 manifests itself during the first stage of compilation, while building
2506 cc1: warning: `-g' option not supported on this version of GCC
2507 cc1: warning: `-g1' option not supported on this version of GCC
2508 ./xgcc: Internal compiler error: program as got fatal signal 11
2510 A patched version of the assembler is available as the file
2511 `ftp://altdorf.ai.mit.edu/archive/cph/hpux-8.0-assembler'. If you have
2512 HP software support, the patch can also be obtained directly from HP,
2513 as described in the following note:
2515 This is the patched assembler, to patch SR#1653-010439, where the
2516 assembler aborts on floating point constants.
2518 The bug is not really in the assembler, but in the shared library
2519 version of the function "cvtnum(3c)". The bug on "cvtnum(3c)" is
2520 SR#4701-078451. Anyway, the attached assembler uses the archive
2521 library version of "cvtnum(3c)" and thus does not exhibit the bug.
2523 This patch is also known as PHCO_4484.
2525 In addition gdb does not understand that native HP-UX format, so you
2526 must use gas if you wish to use gdb.
2528 On HP-UX version 8.05, but not on 8.07 or more recent versions, the
2529 `fixproto' shell script triggers a bug in the system shell. If you
2530 encounter this problem, upgrade your operating system or use BASH (the
2531 GNU shell) to run `fixproto'. This bug will cause the fixproto program
2532 to report an error of the form:
2534 ./fixproto: sh internal 1K buffer overflow
2536 To fix this, you can also change the first line of the fixproto
2537 script to look like:
2544 If on a MIPS system you get an error message saying "does not have gp
2545 sections for all it's [sic] sectons [sic]", don't worry about it. This
2546 happens whenever you use GAS with the MIPS linker, but there is not
2547 really anything wrong, and it is okay to use the output file. You can
2548 stop such warnings by installing the GNU linker.
2550 It would be nice to extend GAS to produce the gp tables, but they are
2551 optional, and there should not be a warning about their absence.
2553 The libstdc++ atomic locking routines for MIPS targets requires MIPS
2554 II and later. A patch went in just after the GCC 3.3 release to make
2555 `mips*-*-*' use the generic implementation instead. You can also
2556 configure for `mipsel-elf' as a workaround. The `mips*-*-linux*'
2557 target continues to use the MIPS II routines. More work on this is
2558 expected in future releases.
2560 Cross-compilers for the Mips as target using the Mips assembler
2561 currently do not work, because the auxiliary programs `mips-tdump.c'
2562 and `mips-tfile.c' can't be compiled on anything but a Mips. It does
2563 work to cross compile for a Mips if you use the GNU assembler and
2569 In order to compile GCC on an SGI running IRIX 5, the
2570 `compiler_dev.hdr' subsystem must be installed from the IDO CD-ROM
2571 supplied by SGI. It is also available for download from
2572 `ftp://ftp.sgi.com/sgi/IRIX5.3/iris-development-option-5.3.tardist'.
2574 If you use the MIPS C compiler to bootstrap, it may be necessary to
2575 increase its table size for switch statements with the `-Wf,-XNg1500'
2576 option. If you use the `-O2' optimization option, you also need to use
2579 To enable debugging under IRIX 5, you must use GNU binutils 2.15 or
2580 later, and use the `--with-gnu-as' and `--with-gnu-ld' `configure'
2581 options when configuring GCC. You need to use GNU `ar' and `nm', also
2582 distributed with GNU binutils.
2587 If you are using SGI's MIPSpro `cc' as your bootstrap compiler, you
2588 must ensure that the N32 ABI is in use. To test this, compile a simple
2589 C file with `cc' and then run `file' on the resulting object file. The
2590 output should look like:
2592 test.o: ELF N32 MSB ...
2596 test.o: ELF 32-bit MSB ...
2600 test.o: ELF 64-bit MSB ...
2602 then your version of `cc' uses the O32 or N64 ABI by default. You
2603 should set the environment variable `CC' to `cc -n32' before
2604 configuring GCC. SGI's MIPSpro 7.2 assembler may misassemble parts of
2605 the compiler, causing bootstrap failures. MIPSpro 7.3 is known to
2606 work. MIPSpro C 7.4 may cause bootstrap failures, too, due to a bug
2607 when inlining `memcmp'. Either add `-U__INLINE_INTRINSICS' to the `CC'
2608 environment variable as a workaround or upgrade to MIPSpro C 7.4.1m.
2610 If you want the resulting `gcc' to run on old 32-bit systems with
2611 the MIPS R4400 CPU, you need to ensure that only code for the `mips3'
2612 instruction set architecture (ISA) is generated. While GCC 3.x does
2613 this correctly, both GCC 2.95 and SGI's MIPSpro `cc' may change the ISA
2614 depending on the machine where GCC is built. Using one of them as the
2615 bootstrap compiler may result in `mips4' code, which won't run at all
2616 on `mips3'-only systems. For the test program above, you should see:
2618 test.o: ELF N32 MSB mips-3 ...
2622 test.o: ELF N32 MSB mips-4 ...
2624 instead, you should set the environment variable `CC' to `cc -n32
2625 -mips3' or `gcc -mips3' respectively before configuring GCC.
2627 GCC on IRIX 6 is usually built to support the N32, O32 and N64 ABIs.
2628 If you build GCC on a system that doesn't have the N64 libraries
2629 installed or cannot run 64-bit binaries, you need to configure with
2630 `--disable-multilib' so GCC doesn't try to use them. This will disable
2631 building the O32 libraries, too. Look for `/usr/lib64/libc.so.1' to
2632 see if you have the 64-bit libraries installed.
2634 To enable debugging for the O32 ABI, you must use GNU `as' from GNU
2635 binutils 2.15 or later. You may also use GNU `ld', but this is not
2636 required and currently causes some problems with Ada.
2638 The `--enable-threads' option doesn't currently work, a patch is in
2639 preparation for a future release. The `--enable-libgcj' option is
2640 disabled by default: IRIX 6 uses a very low default limit (20480) for
2641 the command line length. Although `libtool' contains a workaround for
2642 this problem, at least the N64 `libgcj' is known not to build despite
2643 this, running into an internal error of the native `ld'. A sure fix is
2644 to increase this limit (`ncargs') to its maximum of 262144 bytes. If
2645 you have root access, you can use the `systune' command to do this.
2647 See `http://freeware.sgi.com/' for more information about using GCC
2653 You can specify a default version for the `-mcpu=CPU_TYPE' switch by
2654 using the configure option `--with-cpu-CPU_TYPE'.
2659 PowerPC running Darwin (Mac OS X kernel).
2661 Pre-installed versions of Mac OS X may not include any developer
2662 tools, meaning that you will not be able to build GCC from source. Tool
2663 binaries are available at
2664 `http://developer.apple.com/tools/compilers.html' (free registration
2667 The default stack limit of 512K is too small, which may cause
2668 compiles to fail with 'Bus error'. Set the stack larger, for instance
2669 by doing `limit stack 800'. It's a good idea to use the GNU
2670 preprocessor instead of Apple's `cpp-precomp' during the first stage of
2671 bootstrapping; this is automatic when doing `make bootstrap', but to do
2672 it from the toplevel objdir you will need to say `make CC='cc
2673 -no-cpp-precomp' bootstrap'.
2675 The version of GCC shipped by Apple typically includes a number of
2676 extensions not available in a standard GCC release. These extensions
2677 are generally specific to Mac programming.
2679 powerpc-*-elf, powerpc-*-sysv4
2680 ==============================
2682 PowerPC system in big endian mode, running System V.4.
2684 powerpc-*-linux-gnu*
2685 ====================
2687 You will need binutils 2.13.90.0.10 or newer for a working GCC.
2692 PowerPC system in big endian mode running NetBSD. To build the
2693 documentation you will need Texinfo version 4.2 (NetBSD 1.5.1 included
2694 Texinfo version 3.12).
2699 Embedded PowerPC system in big endian mode for use in running under
2705 Embedded PowerPC system in big endian mode.
2707 powerpcle-*-elf, powerpcle-*-sysv4
2708 ==================================
2710 PowerPC system in little endian mode, running System V.4.
2715 Embedded PowerPC system in little endian mode for use in running
2716 under the PSIM simulator.
2721 Embedded PowerPC system in little endian mode.
2726 S/390 system running GNU/Linux for S/390.
2731 zSeries system (64-bit) running GNU/Linux for zSeries.
2736 zSeries system (64-bit) running TPF. This platform is supported as
2737 cross-compilation target only.
2742 Sun does not ship a C compiler with Solaris 2. To bootstrap and
2743 install GCC you first have to install a pre-built compiler, see the
2744 binaries page for details.
2746 The Solaris 2 `/bin/sh' will often fail to configure `libstdc++-v3',
2747 `boehm-gc' or `libjava'. We therefore recommend to use the following
2748 sequence of commands to bootstrap and install GCC:
2750 % CONFIG_SHELL=/bin/ksh
2751 % export CONFIG_SHELL
2753 and then proceed as described in the build instructions. In
2754 addition we strongly recommend specifying an absolute path to invoke
2757 Solaris 2 comes with a number of optional OS packages. Some of these
2758 are needed to use GCC fully, namely `SUNWarc', `SUNWbtool', `SUNWesu',
2759 `SUNWhea', `SUNWlibm', `SUNWsprot', and `SUNWtoo'. If you did not
2760 install all optional packages when installing Solaris 2, you will need
2761 to verify that the packages that GCC needs are installed.
2763 To check whether an optional package is installed, use the `pkginfo'
2764 command. To add an optional package, use the `pkgadd' command. For
2765 further details, see the Solaris 2 documentation.
2767 Trying to use the linker and other tools in `/usr/ucb' to install
2768 GCC has been observed to cause trouble. For example, the linker may
2769 hang indefinitely. The fix is to remove `/usr/ucb' from your `PATH'.
2771 The build process works more smoothly with the legacy Sun tools so,
2772 if you have `/usr/xpg4/bin' in your `PATH', we recommend that you place
2773 `/usr/bin' before `/usr/xpg4/bin' for the duration of the build.
2775 All releases of GNU binutils prior to 2.11.2 have known bugs on this
2776 platform. We recommend the use of GNU binutils 2.11.2 or the vendor
2777 tools (Sun `as', Sun `ld').
2779 Sun bug 4296832 turns up when compiling X11 headers with GCC 2.95 or
2780 newer: `g++' will complain that types are missing. These headers assume
2781 that omitting the type means `int'; this assumption worked for C89 but
2782 is wrong for C++, and is now wrong for C99 also.
2784 `g++' accepts such (invalid) constructs with the option
2785 `-fpermissive'; it will assume that any missing type is `int' (as
2788 There are patches for Solaris 2.6 (105633-56 or newer for SPARC,
2789 106248-42 or newer for Intel), Solaris 7 (108376-21 or newer for SPARC,
2790 108377-20 for Intel), and Solaris 8 (108652-24 or newer for SPARC,
2791 108653-22 for Intel) that fix this bug.
2796 When GCC is configured to use binutils 2.11.2 or later the binaries
2797 produced are smaller than the ones produced using Sun's native tools;
2798 this difference is quite significant for binaries containing debugging
2801 Sun `as' 4.x is broken in that it cannot cope with long symbol names.
2802 A typical error message might look similar to the following:
2804 /usr/ccs/bin/as: "/var/tmp/ccMsw135.s", line 11041: error:
2805 can't compute value of an expression involving an external symbol.
2807 This is Sun bug 4237974. This is fixed with patch 108908-02 for
2808 Solaris 2.6 and has been fixed in later (5.x) versions of the assembler,
2809 starting with Solaris 7.
2811 Starting with Solaris 7, the operating system is capable of executing
2812 64-bit SPARC V9 binaries. GCC 3.1 and later properly supports this;
2813 the `-m64' option enables 64-bit code generation. However, if all you
2814 want is code tuned for the UltraSPARC CPU, you should try the
2815 `-mtune=ultrasparc' option instead, which produces code that, unlike
2816 full 64-bit code, can still run on non-UltraSPARC machines.
2818 When configuring on a Solaris 7 or later system that is running a
2819 kernel that supports only 32-bit binaries, one must configure with
2820 `--disable-multilib', since we will not be able to build the 64-bit
2823 GCC 3.3 and GCC 3.4 trigger code generation bugs in earlier versions
2824 of the GNU compiler (especially GCC 3.0.x versions), which lead to the
2825 miscompilation of the stage1 compiler and the subsequent failure of the
2826 bootstrap process. A workaround is to use GCC 3.2.3 as an intermediary
2827 stage, i.e. to bootstrap that compiler with the base compiler and then
2828 use it to bootstrap the final compiler.
2830 GCC 3.4 triggers a code generation bug in versions 5.4 (Sun ONE
2831 Studio 7) and 5.5 (Sun ONE Studio 8) of the Sun compiler, which causes
2832 a bootstrap failure in form of a miscompilation of the stage1 compiler
2833 by the Sun compiler. This is Sun bug 4974440. This is fixed with
2836 GCC 3.4 changed the default debugging format from STABS to DWARF-2
2837 for 32-bit code on Solaris 7 and later. If you are using the Sun
2838 assembler, this change apparently runs afoul of Sun bug 4910101, for
2839 which (as of 2004-05-23) there is no fix. A symptom of the problem is
2840 that you cannot compile C++ programs like `groff' 1.19.1 without
2841 getting messages like `ld: warning: relocation error: R_SPARC_UA32 ...
2842 external symbolic relocation against non-allocatable section
2843 .debug_info; cannot be processed at runtime: relocation ignored'. To
2844 work around this problem, compile with `-gstabs+' instead of plain `-g'.
2846 sparc-sun-solaris2.7
2847 ====================
2849 Sun patch 107058-01 (1999-01-13) for Solaris 7/SPARC triggers a bug
2850 in the dynamic linker. This problem (Sun bug 4210064) affects GCC 2.8
2851 and later, including all EGCS releases. Sun formerly recommended
2852 107058-01 for all Solaris 7 users, but around 1999-09-01 it started to
2853 recommend it only for people who use Sun's compilers.
2855 Here are some workarounds to this problem:
2856 * Do not install Sun patch 107058-01 until after Sun releases a
2857 complete patch for bug 4210064. This is the simplest course to
2858 take, unless you must also use Sun's C compiler. Unfortunately
2859 107058-01 is preinstalled on some new Solaris 7-based hosts, so
2860 you may have to back it out.
2862 * Copy the original, unpatched Solaris 7 `/usr/ccs/bin/as' into
2863 `/usr/local/libexec/gcc/sparc-sun-solaris2.7/3.4/as', adjusting
2864 the latter name to fit your local conventions and software version
2867 * Install Sun patch 106950-03 (1999-05-25) or later. Nobody with
2868 both 107058-01 and 106950-03 installed has reported the bug with
2869 GCC and Sun's dynamic linker. This last course of action is
2870 riskiest, for two reasons. First, you must install 106950 on all
2871 hosts that run code generated by GCC; it doesn't suffice to
2872 install it only on the hosts that run GCC itself. Second, Sun
2873 says that 106950-03 is only a partial fix for bug 4210064, but Sun
2874 doesn't know whether the partial fix is adequate for GCC.
2875 Revision -08 or later should fix the bug. The current (as of
2876 2004-05-23) revision is -24, and is included in the Solaris 7
2877 Recommended Patch Cluster.
2879 GCC 3.3 triggers a bug in version 5.0 Alpha 03/27/98 of the Sun
2880 assembler, which causes a bootstrap failure when linking the 64-bit
2881 shared version of libgcc. A typical error message is:
2883 ld: fatal: relocation error: R_SPARC_32: file libgcc/sparcv9/_muldi3.o:
2884 symbol <unknown>: offset 0xffffffff7ec133e7 is non-aligned.
2886 This bug has been fixed in the final 5.0 version of the assembler.
2891 GCC versions 3.0 and higher require binutils 2.11.2 and glibc 2.2.4
2892 or newer on this platform. All earlier binutils and glibc releases
2893 mishandled unaligned relocations on `sparc-*-*' targets.
2898 The following compiler flags must be specified in the configure step
2899 in order to bootstrap this target with the Sun compiler:
2901 % CC="cc -xildoff -xarch=v9" SRCDIR/configure [OPTIONS] [TARGET]
2903 `-xildoff' turns off the incremental linker, and `-xarch=v9'
2904 specifies the SPARC-V9 architecture to the Sun linker and assembler.
2909 This is a synonym for sparc64-*-solaris2*.
2914 On System V release 3, you may get this error message while linking:
2916 ld fatal: failed to write symbol name SOMETHING
2917 in strings table for file WHATEVER
2919 This probably indicates that the disk is full or your ulimit won't
2920 allow the file to be as large as it needs to be.
2922 This problem can also result because the kernel parameter `MAXUMEM'
2923 is too small. If so, you must regenerate the kernel and make the value
2924 much larger. The default value is reported to be 1024; a value of 32768
2925 is said to work. Smaller values may also work.
2927 On System V, if you get an error like this,
2929 /usr/local/lib/bison.simple: In function `yyparse':
2930 /usr/local/lib/bison.simple:625: virtual memory exhausted
2932 that too indicates a problem with disk space, ulimit, or `MAXUMEM'.
2934 On a System V release 4 system, make sure `/usr/bin' precedes
2935 `/usr/ucb' in `PATH'. The `cc' command in `/usr/ucb' uses libraries
2941 Don't try compiling with VAX C (`vcc'). It produces incorrect code
2942 in some cases (for example, when `alloca' is used).
2947 Support for VxWorks is in flux. At present GCC supports _only_ the
2948 very recent VxWorks 5.5 (aka Tornado 2.2) release, and only on PowerPC.
2949 We welcome patches for other architectures supported by VxWorks 5.5.
2950 Support for VxWorks AE would also be welcome; we believe this is merely
2951 a matter of writing an appropriate "configlette" (see below). We are
2952 not interested in supporting older, a.out or COFF-based, versions of
2955 VxWorks comes with an older version of GCC installed in
2956 `$WIND_BASE/host'; we recommend you do not overwrite it. Choose an
2957 installation PREFIX entirely outside $WIND_BASE. Before running
2958 `configure', create the directories `PREFIX' and `PREFIX/bin'. Link or
2959 copy the appropriate assembler, linker, etc. into `PREFIX/bin', and set
2960 your PATH to include that directory while running both `configure' and
2963 You must give `configure' the `--with-headers=$WIND_BASE/target/h'
2964 switch so that it can find the VxWorks system headers. Since VxWorks
2965 is a cross compilation target only, you must also specify
2966 `--target=TARGET'. `configure' will attempt to create the directory
2967 `PREFIX/TARGET/sys-include' and copy files into it; make sure the user
2968 running `configure' has sufficient privilege to do so.
2970 GCC's exception handling runtime requires a special "configlette"
2971 module, `contrib/gthr_supp_vxw_5x.c'. Follow the instructions in that
2972 file to add the module to your kernel build. (Future versions of
2973 VxWorks will incorporate this module.)
2975 x86_64-*-*, amd64-*-*
2976 =====================
2978 GCC supports the x86-64 architecture implemented by the AMD64
2979 processor (amd64-*-* is an alias for x86_64-*-*) on GNU/Linux, FreeBSD
2980 and NetBSD. On GNU/Linux the default is a bi-arch compiler which is
2981 able to generate both 64-bit x86-64 and 32-bit x86 code (via the `-m32'
2987 This target is intended for embedded Xtensa systems using the
2988 `newlib' C library. It uses ELF but does not support shared objects.
2989 Designed-defined instructions specified via the Tensilica Instruction
2990 Extension (TIE) language are only supported through inline assembly.
2992 The Xtensa configuration information must be specified prior to
2993 building GCC. The `include/xtensa-config.h' header file contains the
2994 configuration information. If you created your own Xtensa
2995 configuration with the Xtensa Processor Generator, the downloaded files
2996 include a customized copy of this header file, which you can use to
2997 replace the default header file.
3002 This target is for Xtensa systems running GNU/Linux. It supports ELF
3003 shared objects and the GNU C library (glibc). It also generates
3004 position-independent code (PIC) regardless of whether the `-fpic' or
3005 `-fPIC' options are used. In other respects, this target is the same
3006 as the `xtensa-*-elf' target.
3008 Microsoft Windows (32-bit)
3009 ==========================
3011 A port of GCC 2.95.2 and 3.x is included with the Cygwin environment.
3013 Current (as of early 2001) snapshots of GCC will build under Cygwin
3014 without modification.
3016 GCC does not currently build with Microsoft's C++ compiler and there
3017 are no plans to make it do so.
3022 GCC does not currently support OS/2. However, Andrew Zabolotny has
3023 been working on a generic OS/2 port with pgcc. The current code can be
3024 found at http://www.goof.com/pcg/os2/.
3026 An older copy of GCC 2.8.1 is included with the EMX tools available
3027 at ftp://ftp.leo.org/pub/comp/os/os2/leo/devtools/emx+gcc/.
3032 GCC contains support files for many older (1980s and early 1990s)
3033 Unix variants. For the most part, support for these systems has not
3034 been deliberately removed, but it has not been maintained for several
3035 years and may suffer from bitrot.
3037 Starting with GCC 3.1, each release has a list of "obsoleted"
3038 systems. Support for these systems is still present in that release,
3039 but `configure' will fail unless the `--enable-obsolete' option is
3040 given. Unless a maintainer steps forward, support for these systems
3041 will be removed from the next release of GCC.
3043 Support for old systems as hosts for GCC can cause problems if the
3044 workarounds for compiler, library and operating system bugs affect the
3045 cleanliness or maintainability of the rest of GCC. In some cases, to
3046 bring GCC up on such a system, if still possible with current GCC, may
3047 require first installing an old version of GCC which did work on that
3048 system, and using it to compile a more recent GCC, to avoid bugs in the
3049 vendor compiler. Old releases of GCC 1 and GCC 2 are available in the
3050 `old-releases' directory on the GCC mirror sites. Header bugs may
3051 generally be avoided using `fixincludes', but bugs or deficiencies in
3052 libraries and the operating system may still cause problems.
3054 Support for older systems as targets for cross-compilation is less
3055 problematic than support for them as hosts for GCC; if an enthusiast
3056 wishes to make such a target work again (including resurrecting any of
3057 the targets that never worked with GCC 2, starting from the last CVS
3058 version before they were removed), patches following the usual
3059 requirements would be likely to be accepted, since they should not
3060 affect the support for more modern targets.
3062 For some systems, old versions of GNU binutils may also be useful,
3063 and are available from `pub/binutils/old-releases' on
3064 sources.redhat.com mirror sites.
3066 Some of the information on specific systems above relates to such
3067 older systems, but much of the information about GCC on such systems
3068 (which may no longer be applicable to current GCC) is to be found in
3069 the GCC texinfo manual.
3071 all ELF targets (SVR4, Solaris 2, etc.)
3072 =======================================
3074 C++ support is significantly better on ELF targets if you use the
3075 GNU linker; duplicate copies of inlines, vtables and template
3076 instantiations will be discarded automatically.
3079 File: gccinstall.info, Node: Old, Next: GNU Free Documentation License, Prev: Specific, Up: Top
3081 Old installation documentation
3082 ******************************
3084 Note most of this information is out of date and superseded by the
3085 previous chapters of this manual. It is provided for historical
3086 reference only, because of a lack of volunteers to merge it into the
3091 * Configurations:: Configurations Supported by GCC.
3093 Here is the procedure for installing GCC on a GNU or Unix system.
3095 1. If you have chosen a configuration for GCC which requires other GNU
3096 tools (such as GAS or the GNU linker) instead of the standard
3097 system tools, install the required tools in the build directory
3098 under the names `as', `ld' or whatever is appropriate.
3100 Alternatively, you can do subsequent compilation using a value of
3101 the `PATH' environment variable such that the necessary GNU tools
3102 come before the standard system tools.
3104 2. Specify the host, build and target machine configurations. You do
3105 this when you run the `configure' script.
3107 The "build" machine is the system which you are using, the "host"
3108 machine is the system where you want to run the resulting compiler
3109 (normally the build machine), and the "target" machine is the
3110 system for which you want the compiler to generate code.
3112 If you are building a compiler to produce code for the machine it
3113 runs on (a native compiler), you normally do not need to specify
3114 any operands to `configure'; it will try to guess the type of
3115 machine you are on and use that as the build, host and target
3116 machines. So you don't need to specify a configuration when
3117 building a native compiler unless `configure' cannot figure out
3118 what your configuration is or guesses wrong.
3120 In those cases, specify the build machine's "configuration name"
3121 with the `--host' option; the host and target will default to be
3122 the same as the host machine.
3126 ./configure --host=sparc-sun-sunos4.1
3128 A configuration name may be canonical or it may be more or less
3131 A canonical configuration name has three parts, separated by
3132 dashes. It looks like this: `CPU-COMPANY-SYSTEM'. (The three
3133 parts may themselves contain dashes; `configure' can figure out
3134 which dashes serve which purpose.) For example,
3135 `m68k-sun-sunos4.1' specifies a Sun 3.
3137 You can also replace parts of the configuration by nicknames or
3138 aliases. For example, `sun3' stands for `m68k-sun', so
3139 `sun3-sunos4.1' is another way to specify a Sun 3.
3141 You can specify a version number after any of the system types,
3142 and some of the CPU types. In most cases, the version is
3143 irrelevant, and will be ignored. So you might as well specify the
3144 version if you know it.
3146 See *Note Configurations::, for a list of supported configuration
3147 names and notes on many of the configurations. You should check
3148 the notes in that section before proceeding any further with the
3149 installation of GCC.
3153 File: gccinstall.info, Node: Configurations, Up: Old
3155 Configurations Supported by GCC
3156 ===============================
3158 Here are the possible CPU types:
3160 1750a, a29k, alpha, arm, avr, cN, clipper, dsp16xx, elxsi, fr30,
3161 h8300, hppa1.0, hppa1.1, i370, i386, i486, i586, i686, i786, i860,
3162 i960, ip2k, m32r, m68000, m68k, m6811, m6812, m88k, mcore, mips,
3163 mipsel, mips64, mips64el, mn10200, mn10300, ns32k, pdp11, powerpc,
3164 powerpcle, romp, rs6000, sh, sparc, sparclite, sparc64, v850, vax,
3167 Here are the recognized company names. As you can see, customary
3168 abbreviations are used rather than the longer official names.
3170 acorn, alliant, altos, apollo, apple, att, bull, cbm, convergent,
3171 convex, crds, dec, dg, dolphin, elxsi, encore, harris, hitachi,
3172 hp, ibm, intergraph, isi, mips, motorola, ncr, next, ns, omron,
3173 plexus, sequent, sgi, sony, sun, tti, unicom, wrs.
3175 The company name is meaningful only to disambiguate when the rest of
3176 the information supplied is insufficient. You can omit it, writing
3177 just `CPU-SYSTEM', if it is not needed. For example, `vax-ultrix4.2'
3178 is equivalent to `vax-dec-ultrix4.2'.
3180 Here is a list of system types:
3182 386bsd, aix, acis, amigaos, aos, aout, aux, bosx, bsd, clix, coff,
3183 ctix, cxux, dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms,
3184 genix, gnu, linux, linux-gnu, hiux, hpux, iris, irix, isc, luna,
3185 lynxos, mach, minix, msdos, mvs, netbsd, newsos, nindy, ns, osf,
3186 osfrose, ptx, riscix, riscos, rtu, sco, sim, solaris, sunos, sym,
3187 sysv, udi, ultrix, unicos, uniplus, unos, vms, vsta, vxworks,
3190 You can omit the system type; then `configure' guesses the operating
3191 system from the CPU and company.
3193 You can add a version number to the system type; this may or may not
3194 make a difference. For example, you can write `bsd4.3' or `bsd4.4' to
3195 distinguish versions of BSD. In practice, the version number is most
3196 needed for `sysv3' and `sysv4', which are often treated differently.
3198 `linux-gnu' is the canonical name for the GNU/Linux target; however
3199 GCC will also accept `linux'. The version of the kernel in use is not
3200 relevant on these systems. A suffix such as `libc1' or `aout'
3201 distinguishes major versions of the C library; all of the suffixed
3202 versions are obsolete.
3204 If you specify an impossible combination such as `i860-dg-vms', then
3205 you may get an error message from `configure', or it may ignore part of
3206 the information and do the best it can with the rest. `configure'
3207 always prints the canonical name for the alternative that it used. GCC
3208 does not support all possible alternatives.
3210 Often a particular model of machine has a name. Many machine names
3211 are recognized as aliases for CPU/company combinations. Thus, the
3212 machine name `sun3', mentioned above, is an alias for `m68k-sun'.
3213 Sometimes we accept a company name as a machine name, when the name is
3214 popularly used for a particular machine. Here is a table of the known
3217 3300, 3b1, 3bN, 7300, altos3068, altos, apollo68, att-7300,
3218 balance, convex-cN, crds, decstation-3100, decstation, delta,
3219 encore, fx2800, gmicro, hp7NN, hp8NN, hp9k2NN, hp9k3NN, hp9k7NN,
3220 hp9k8NN, iris4d, iris, isi68, m3230, magnum, merlin, miniframe,
3221 mmax, news-3600, news800, news, next, pbd, pc532, pmax, powerpc,
3222 powerpcle, ps2, risc-news, rtpc, sun2, sun386i, sun386, sun3,
3223 sun4, symmetry, tower-32, tower.
3225 Remember that a machine name specifies both the cpu type and the company
3226 name. If you want to install your own homemade configuration files,
3227 you can use `local' as the company name to access them. If you use
3228 configuration `CPU-local', the configuration name without the cpu prefix
3229 is used to form the configuration file names.
3231 Thus, if you specify `m68k-local', configuration uses files
3232 `m68k.md', `local.h', `m68k.c', `xm-local.h', `t-local', and `x-local',
3233 all in the directory `config/m68k'.
3236 File: gccinstall.info, Node: GNU Free Documentation License, Next: Concept Index, Prev: Old, Up: Top
3238 GNU Free Documentation License
3239 ******************************
3241 Version 1.2, November 2002
3242 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
3243 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
3245 Everyone is permitted to copy and distribute verbatim copies
3246 of this license document, but changing it is not allowed.
3250 The purpose of this License is to make a manual, textbook, or other
3251 functional and useful document "free" in the sense of freedom: to
3252 assure everyone the effective freedom to copy and redistribute it,
3253 with or without modifying it, either commercially or
3254 noncommercially. Secondarily, this License preserves for the
3255 author and publisher a way to get credit for their work, while not
3256 being considered responsible for modifications made by others.
3258 This License is a kind of "copyleft", which means that derivative
3259 works of the document must themselves be free in the same sense.
3260 It complements the GNU General Public License, which is a copyleft
3261 license designed for free software.
3263 We have designed this License in order to use it for manuals for
3264 free software, because free software needs free documentation: a
3265 free program should come with manuals providing the same freedoms
3266 that the software does. But this License is not limited to
3267 software manuals; it can be used for any textual work, regardless
3268 of subject matter or whether it is published as a printed book.
3269 We recommend this License principally for works whose purpose is
3270 instruction or reference.
3272 1. APPLICABILITY AND DEFINITIONS
3274 This License applies to any manual or other work, in any medium,
3275 that contains a notice placed by the copyright holder saying it
3276 can be distributed under the terms of this License. Such a notice
3277 grants a world-wide, royalty-free license, unlimited in duration,
3278 to use that work under the conditions stated herein. The
3279 "Document", below, refers to any such manual or work. Any member
3280 of the public is a licensee, and is addressed as "you". You
3281 accept the license if you copy, modify or distribute the work in a
3282 way requiring permission under copyright law.
3284 A "Modified Version" of the Document means any work containing the
3285 Document or a portion of it, either copied verbatim, or with
3286 modifications and/or translated into another language.
3288 A "Secondary Section" is a named appendix or a front-matter section
3289 of the Document that deals exclusively with the relationship of the
3290 publishers or authors of the Document to the Document's overall
3291 subject (or to related matters) and contains nothing that could
3292 fall directly within that overall subject. (Thus, if the Document
3293 is in part a textbook of mathematics, a Secondary Section may not
3294 explain any mathematics.) The relationship could be a matter of
3295 historical connection with the subject or with related matters, or
3296 of legal, commercial, philosophical, ethical or political position
3299 The "Invariant Sections" are certain Secondary Sections whose
3300 titles are designated, as being those of Invariant Sections, in
3301 the notice that says that the Document is released under this
3302 License. If a section does not fit the above definition of
3303 Secondary then it is not allowed to be designated as Invariant.
3304 The Document may contain zero Invariant Sections. If the Document
3305 does not identify any Invariant Sections then there are none.
3307 The "Cover Texts" are certain short passages of text that are
3308 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
3309 that says that the Document is released under this License. A
3310 Front-Cover Text may be at most 5 words, and a Back-Cover Text may
3311 be at most 25 words.
3313 A "Transparent" copy of the Document means a machine-readable copy,
3314 represented in a format whose specification is available to the
3315 general public, that is suitable for revising the document
3316 straightforwardly with generic text editors or (for images
3317 composed of pixels) generic paint programs or (for drawings) some
3318 widely available drawing editor, and that is suitable for input to
3319 text formatters or for automatic translation to a variety of
3320 formats suitable for input to text formatters. A copy made in an
3321 otherwise Transparent file format whose markup, or absence of
3322 markup, has been arranged to thwart or discourage subsequent
3323 modification by readers is not Transparent. An image format is
3324 not Transparent if used for any substantial amount of text. A
3325 copy that is not "Transparent" is called "Opaque".
3327 Examples of suitable formats for Transparent copies include plain
3328 ASCII without markup, Texinfo input format, LaTeX input format,
3329 SGML or XML using a publicly available DTD, and
3330 standard-conforming simple HTML, PostScript or PDF designed for
3331 human modification. Examples of transparent image formats include
3332 PNG, XCF and JPG. Opaque formats include proprietary formats that
3333 can be read and edited only by proprietary word processors, SGML or
3334 XML for which the DTD and/or processing tools are not generally
3335 available, and the machine-generated HTML, PostScript or PDF
3336 produced by some word processors for output purposes only.
3338 The "Title Page" means, for a printed book, the title page itself,
3339 plus such following pages as are needed to hold, legibly, the
3340 material this License requires to appear in the title page. For
3341 works in formats which do not have any title page as such, "Title
3342 Page" means the text near the most prominent appearance of the
3343 work's title, preceding the beginning of the body of the text.
3345 A section "Entitled XYZ" means a named subunit of the Document
3346 whose title either is precisely XYZ or contains XYZ in parentheses
3347 following text that translates XYZ in another language. (Here XYZ
3348 stands for a specific section name mentioned below, such as
3349 "Acknowledgements", "Dedications", "Endorsements", or "History".)
3350 To "Preserve the Title" of such a section when you modify the
3351 Document means that it remains a section "Entitled XYZ" according
3354 The Document may include Warranty Disclaimers next to the notice
3355 which states that this License applies to the Document. These
3356 Warranty Disclaimers are considered to be included by reference in
3357 this License, but only as regards disclaiming warranties: any other
3358 implication that these Warranty Disclaimers may have is void and
3359 has no effect on the meaning of this License.
3363 You may copy and distribute the Document in any medium, either
3364 commercially or noncommercially, provided that this License, the
3365 copyright notices, and the license notice saying this License
3366 applies to the Document are reproduced in all copies, and that you
3367 add no other conditions whatsoever to those of this License. You
3368 may not use technical measures to obstruct or control the reading
3369 or further copying of the copies you make or distribute. However,
3370 you may accept compensation in exchange for copies. If you
3371 distribute a large enough number of copies you must also follow
3372 the conditions in section 3.
3374 You may also lend copies, under the same conditions stated above,
3375 and you may publicly display copies.
3377 3. COPYING IN QUANTITY
3379 If you publish printed copies (or copies in media that commonly
3380 have printed covers) of the Document, numbering more than 100, and
3381 the Document's license notice requires Cover Texts, you must
3382 enclose the copies in covers that carry, clearly and legibly, all
3383 these Cover Texts: Front-Cover Texts on the front cover, and
3384 Back-Cover Texts on the back cover. Both covers must also clearly
3385 and legibly identify you as the publisher of these copies. The
3386 front cover must present the full title with all words of the
3387 title equally prominent and visible. You may add other material
3388 on the covers in addition. Copying with changes limited to the
3389 covers, as long as they preserve the title of the Document and
3390 satisfy these conditions, can be treated as verbatim copying in
3393 If the required texts for either cover are too voluminous to fit
3394 legibly, you should put the first ones listed (as many as fit
3395 reasonably) on the actual cover, and continue the rest onto
3398 If you publish or distribute Opaque copies of the Document
3399 numbering more than 100, you must either include a
3400 machine-readable Transparent copy along with each Opaque copy, or
3401 state in or with each Opaque copy a computer-network location from
3402 which the general network-using public has access to download
3403 using public-standard network protocols a complete Transparent
3404 copy of the Document, free of added material. If you use the
3405 latter option, you must take reasonably prudent steps, when you
3406 begin distribution of Opaque copies in quantity, to ensure that
3407 this Transparent copy will remain thus accessible at the stated
3408 location until at least one year after the last time you
3409 distribute an Opaque copy (directly or through your agents or
3410 retailers) of that edition to the public.
3412 It is requested, but not required, that you contact the authors of
3413 the Document well before redistributing any large number of
3414 copies, to give them a chance to provide you with an updated
3415 version of the Document.
3419 You may copy and distribute a Modified Version of the Document
3420 under the conditions of sections 2 and 3 above, provided that you
3421 release the Modified Version under precisely this License, with
3422 the Modified Version filling the role of the Document, thus
3423 licensing distribution and modification of the Modified Version to
3424 whoever possesses a copy of it. In addition, you must do these
3425 things in the Modified Version:
3427 A. Use in the Title Page (and on the covers, if any) a title
3428 distinct from that of the Document, and from those of
3429 previous versions (which should, if there were any, be listed
3430 in the History section of the Document). You may use the
3431 same title as a previous version if the original publisher of
3432 that version gives permission.
3434 B. List on the Title Page, as authors, one or more persons or
3435 entities responsible for authorship of the modifications in
3436 the Modified Version, together with at least five of the
3437 principal authors of the Document (all of its principal
3438 authors, if it has fewer than five), unless they release you
3439 from this requirement.
3441 C. State on the Title page the name of the publisher of the
3442 Modified Version, as the publisher.
3444 D. Preserve all the copyright notices of the Document.
3446 E. Add an appropriate copyright notice for your modifications
3447 adjacent to the other copyright notices.
3449 F. Include, immediately after the copyright notices, a license
3450 notice giving the public permission to use the Modified
3451 Version under the terms of this License, in the form shown in
3454 G. Preserve in that license notice the full lists of Invariant
3455 Sections and required Cover Texts given in the Document's
3458 H. Include an unaltered copy of this License.
3460 I. Preserve the section Entitled "History", Preserve its Title,
3461 and add to it an item stating at least the title, year, new
3462 authors, and publisher of the Modified Version as given on
3463 the Title Page. If there is no section Entitled "History" in
3464 the Document, create one stating the title, year, authors,
3465 and publisher of the Document as given on its Title Page,
3466 then add an item describing the Modified Version as stated in
3467 the previous sentence.
3469 J. Preserve the network location, if any, given in the Document
3470 for public access to a Transparent copy of the Document, and
3471 likewise the network locations given in the Document for
3472 previous versions it was based on. These may be placed in
3473 the "History" section. You may omit a network location for a
3474 work that was published at least four years before the
3475 Document itself, or if the original publisher of the version
3476 it refers to gives permission.
3478 K. For any section Entitled "Acknowledgements" or "Dedications",
3479 Preserve the Title of the section, and preserve in the
3480 section all the substance and tone of each of the contributor
3481 acknowledgements and/or dedications given therein.
3483 L. Preserve all the Invariant Sections of the Document,
3484 unaltered in their text and in their titles. Section numbers
3485 or the equivalent are not considered part of the section
3488 M. Delete any section Entitled "Endorsements". Such a section
3489 may not be included in the Modified Version.
3491 N. Do not retitle any existing section to be Entitled
3492 "Endorsements" or to conflict in title with any Invariant
3495 O. Preserve any Warranty Disclaimers.
3497 If the Modified Version includes new front-matter sections or
3498 appendices that qualify as Secondary Sections and contain no
3499 material copied from the Document, you may at your option
3500 designate some or all of these sections as invariant. To do this,
3501 add their titles to the list of Invariant Sections in the Modified
3502 Version's license notice. These titles must be distinct from any
3503 other section titles.
3505 You may add a section Entitled "Endorsements", provided it contains
3506 nothing but endorsements of your Modified Version by various
3507 parties--for example, statements of peer review or that the text
3508 has been approved by an organization as the authoritative
3509 definition of a standard.
3511 You may add a passage of up to five words as a Front-Cover Text,
3512 and a passage of up to 25 words as a Back-Cover Text, to the end
3513 of the list of Cover Texts in the Modified Version. Only one
3514 passage of Front-Cover Text and one of Back-Cover Text may be
3515 added by (or through arrangements made by) any one entity. If the
3516 Document already includes a cover text for the same cover,
3517 previously added by you or by arrangement made by the same entity
3518 you are acting on behalf of, you may not add another; but you may
3519 replace the old one, on explicit permission from the previous
3520 publisher that added the old one.
3522 The author(s) and publisher(s) of the Document do not by this
3523 License give permission to use their names for publicity for or to
3524 assert or imply endorsement of any Modified Version.
3526 5. COMBINING DOCUMENTS
3528 You may combine the Document with other documents released under
3529 this License, under the terms defined in section 4 above for
3530 modified versions, provided that you include in the combination
3531 all of the Invariant Sections of all of the original documents,
3532 unmodified, and list them all as Invariant Sections of your
3533 combined work in its license notice, and that you preserve all
3534 their Warranty Disclaimers.
3536 The combined work need only contain one copy of this License, and
3537 multiple identical Invariant Sections may be replaced with a single
3538 copy. If there are multiple Invariant Sections with the same name
3539 but different contents, make the title of each such section unique
3540 by adding at the end of it, in parentheses, the name of the
3541 original author or publisher of that section if known, or else a
3542 unique number. Make the same adjustment to the section titles in
3543 the list of Invariant Sections in the license notice of the
3546 In the combination, you must combine any sections Entitled
3547 "History" in the various original documents, forming one section
3548 Entitled "History"; likewise combine any sections Entitled
3549 "Acknowledgements", and any sections Entitled "Dedications". You
3550 must delete all sections Entitled "Endorsements."
3552 6. COLLECTIONS OF DOCUMENTS
3554 You may make a collection consisting of the Document and other
3555 documents released under this License, and replace the individual
3556 copies of this License in the various documents with a single copy
3557 that is included in the collection, provided that you follow the
3558 rules of this License for verbatim copying of each of the
3559 documents in all other respects.
3561 You may extract a single document from such a collection, and
3562 distribute it individually under this License, provided you insert
3563 a copy of this License into the extracted document, and follow
3564 this License in all other respects regarding verbatim copying of
3567 7. AGGREGATION WITH INDEPENDENT WORKS
3569 A compilation of the Document or its derivatives with other
3570 separate and independent documents or works, in or on a volume of
3571 a storage or distribution medium, is called an "aggregate" if the
3572 copyright resulting from the compilation is not used to limit the
3573 legal rights of the compilation's users beyond what the individual
3574 works permit. When the Document is included an aggregate, this
3575 License does not apply to the other works in the aggregate which
3576 are not themselves derivative works of the Document.
3578 If the Cover Text requirement of section 3 is applicable to these
3579 copies of the Document, then if the Document is less than one half
3580 of the entire aggregate, the Document's Cover Texts may be placed
3581 on covers that bracket the Document within the aggregate, or the
3582 electronic equivalent of covers if the Document is in electronic
3583 form. Otherwise they must appear on printed covers that bracket
3584 the whole aggregate.
3588 Translation is considered a kind of modification, so you may
3589 distribute translations of the Document under the terms of section
3590 4. Replacing Invariant Sections with translations requires special
3591 permission from their copyright holders, but you may include
3592 translations of some or all Invariant Sections in addition to the
3593 original versions of these Invariant Sections. You may include a
3594 translation of this License, and all the license notices in the
3595 Document, and any Warrany Disclaimers, provided that you also
3596 include the original English version of this License and the
3597 original versions of those notices and disclaimers. In case of a
3598 disagreement between the translation and the original version of
3599 this License or a notice or disclaimer, the original version will
3602 If a section in the Document is Entitled "Acknowledgements",
3603 "Dedications", or "History", the requirement (section 4) to
3604 Preserve its Title (section 1) will typically require changing the
3609 You may not copy, modify, sublicense, or distribute the Document
3610 except as expressly provided for under this License. Any other
3611 attempt to copy, modify, sublicense or distribute the Document is
3612 void, and will automatically terminate your rights under this
3613 License. However, parties who have received copies, or rights,
3614 from you under this License will not have their licenses
3615 terminated so long as such parties remain in full compliance.
3617 10. FUTURE REVISIONS OF THIS LICENSE
3619 The Free Software Foundation may publish new, revised versions of
3620 the GNU Free Documentation License from time to time. Such new
3621 versions will be similar in spirit to the present version, but may
3622 differ in detail to address new problems or concerns. See
3623 `http://www.gnu.org/copyleft/'.
3625 Each version of the License is given a distinguishing version
3626 number. If the Document specifies that a particular numbered
3627 version of this License "or any later version" applies to it, you
3628 have the option of following the terms and conditions either of
3629 that specified version or of any later version that has been
3630 published (not as a draft) by the Free Software Foundation. If
3631 the Document does not specify a version number of this License,
3632 you may choose any version ever published (not as a draft) by the
3633 Free Software Foundation.
3635 ADDENDUM: How to use this License for your documents
3636 ====================================================
3638 To use this License in a document you have written, include a copy of
3639 the License in the document and put the following copyright and license
3640 notices just after the title page:
3642 Copyright (C) YEAR YOUR NAME.
3643 Permission is granted to copy, distribute and/or modify this document
3644 under the terms of the GNU Free Documentation License, Version 1.2
3645 or any later version published by the Free Software Foundation;
3646 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
3647 A copy of the license is included in the section entitled ``GNU
3648 Free Documentation License''.
3650 If you have Invariant Sections, Front-Cover Texts and Back-Cover
3651 Texts, replace the "with...Texts." line with this:
3653 with the Invariant Sections being LIST THEIR TITLES, with
3654 the Front-Cover Texts being LIST, and with the Back-Cover Texts
3657 If you have Invariant Sections without Cover Texts, or some other
3658 combination of the three, merge those two alternatives to suit the
3661 If your document contains nontrivial examples of program code, we
3662 recommend releasing these examples in parallel under your choice of
3663 free software license, such as the GNU General Public License, to
3664 permit their use in free software.
3667 File: gccinstall.info, Node: Concept Index, Prev: GNU Free Documentation License, Up: Top
3674 * Binaries: Binaries.
3675 * Configuration: Configuration.
3676 * configurations supported by GCC: Configurations.
3677 * Downloading GCC: Downloading the source.
3678 * Downloading the Source: Downloading the source.
3679 * FDL, GNU Free Documentation License: GNU Free Documentation License.
3680 * Host specific installation: Specific.
3681 * Installing GCC: Binaries: Binaries.
3682 * Installing GCC: Building: Building.
3683 * Installing GCC: Configuration: Configuration.
3684 * Installing GCC: Testing: Testing.
3685 * Prerequisites: Prerequisites.
3686 * Specific: Specific.
3687 * Specific installation notes: Specific.
3688 * Target specific installation: Specific.
3689 * Target specific installation notes: Specific.
3691 * Testsuite: Testing.
3697 Node: Installing GCC
\x7f2421
3698 Node: Prerequisites
\x7f3932
3699 Node: Downloading the source
\x7f9996
3700 Node: Configuration
\x7f11618
3701 Ref: with-gnu-as
\x7f24677
3702 Ref: with-as
\x7f25949
3703 Ref: with-gnu-ld
\x7f26954
3704 Node: Building
\x7f47996
3705 Node: Testing
\x7f58944
3706 Node: Final install
\x7f66801
3707 Node: Binaries
\x7f71502
3708 Node: Specific
\x7f73313
3709 Ref: alpha*-*-*
\x7f73596
3710 Ref: alpha*-dec-osf*
\x7f74088
3711 Ref: alphaev5-cray-unicosmk*
\x7f77668
3712 Ref: arc-*-elf
\x7f78618
3713 Ref: arm-*-elf
\x7f78721
3714 Ref: xscale-*-*
\x7f78742
3715 Ref: arm-*-coff
\x7f78981
3716 Ref: arm-*-aout
\x7f79186
3721 Ref: dsp16xx
\x7f81906
3722 Ref: *-*-freebsd*
\x7f81976
3723 Ref: h8300-hms
\x7f84362
3724 Ref: hppa*-hp-hpux*
\x7f84717
3725 Ref: hppa*-hp-hpux10
\x7f86043
3726 Ref: hppa*-hp-hpux11
\x7f86702
3727 Ref: i370-*-*
\x7f93566
3728 Ref: *-*-linux-gnu
\x7f93706
3729 Ref: ix86-*-linux*aout
\x7f93901
3730 Ref: ix86-*-linux*
\x7f94063
3731 Ref: ix86-*-sco3.2v5*
\x7f94808
3732 Ref: ix86-*-udk
\x7f96980
3733 Ref: ia64-*-linux
\x7f98347
3734 Ref: ia64-*-hpux*
\x7f99081
3735 Ref: *-ibm-aix*
\x7f99513
3736 Ref: ip2k-*-elf
\x7f105186
3737 Ref: iq2000-*-elf
\x7f105420
3738 Ref: m32r-*-elf
\x7f105563
3739 Ref: m6811-elf
\x7f105668
3740 Ref: m6812-elf
\x7f105821
3741 Ref: m68k-hp-hpux
\x7f105974
3742 Ref: mips-*-*
\x7f107716
3743 Ref: mips-sgi-irix5
\x7f108861
3744 Ref: mips-sgi-irix6
\x7f109614
3745 Ref: powerpc*-*-*
\x7f112438
3746 Ref: powerpc-*-darwin*
\x7f112586
3747 Ref: powerpc-*-elf
\x7f113534
3748 Ref: powerpc-*-linux-gnu*
\x7f113656
3749 Ref: powerpc-*-netbsd*
\x7f113767
3750 Ref: powerpc-*-eabisim
\x7f113966
3751 Ref: powerpc-*-eabi
\x7f114095
3752 Ref: powerpcle-*-elf
\x7f114174
3753 Ref: powerpcle-*-eabisim
\x7f114307
3754 Ref: powerpcle-*-eabi
\x7f114443
3755 Ref: s390-*-linux*
\x7f114529
3756 Ref: s390x-*-linux*
\x7f114604
3757 Ref: s390x-ibm-tpf*
\x7f114694
3758 Ref: *-*-solaris2*
\x7f114828
3759 Ref: sparc-sun-solaris2*
\x7f117208
3760 Ref: sparc-sun-solaris2.7
\x7f119854
3761 Ref: sparc-*-linux*
\x7f121927
3762 Ref: sparc64-*-solaris2*
\x7f122155
3763 Ref: sparcv9-*-solaris2*
\x7f122534
3764 Ref: #*-*-sysv*
\x7f122622
3765 Ref: vax-dec-ultrix
\x7f123586
3766 Ref: *-*-vxworks*
\x7f123741
3767 Ref: x86_64-*-*
\x7f125266
3768 Ref: xtensa-*-elf
\x7f125598
3769 Ref: xtensa-*-linux*
\x7f126270
3770 Ref: windows
\x7f126611
3772 Ref: older
\x7f127264
3773 Ref: elf_targets
\x7f129392
3775 Node: Configurations
\x7f132784
3776 Node: GNU Free Documentation License
\x7f136756
3777 Node: Concept Index
\x7f159169