1This is doc/gccinstall.info, produced by makeinfo version 4.12 from 2/space/rguenther/gcc-4.5.4/gcc-4.5.4/gcc/doc/install.texi. 3 4Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 51999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 62011 Free Software Foundation, Inc. 7 8 Permission is granted to copy, distribute and/or modify this document 9under the terms of the GNU Free Documentation License, Version 1.2 or 10any later version published by the Free Software Foundation; with no 11Invariant Sections, the Front-Cover texts being (a) (see below), and 12with the Back-Cover Texts being (b) (see below). A copy of the license 13is included in the section entitled "GNU Free Documentation License". 14 15 (a) The FSF's Front-Cover Text is: 16 17 A GNU Manual 18 19 (b) The FSF's Back-Cover Text is: 20 21 You have freedom to copy and modify this GNU Manual, like GNU 22software. Copies published by the Free Software Foundation raise 23funds for GNU development. 24 25 Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 261999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 272011 Free Software Foundation, Inc. 28 29 Permission is granted to copy, distribute and/or modify this document 30under the terms of the GNU Free Documentation License, Version 1.2 or 31any later version published by the Free Software Foundation; with no 32Invariant Sections, the Front-Cover texts being (a) (see below), and 33with the Back-Cover Texts being (b) (see below). A copy of the license 34is included in the section entitled "GNU Free Documentation License". 35 36 (a) The FSF's Front-Cover Text is: 37 38 A GNU Manual 39 40 (b) The FSF's Back-Cover Text is: 41 42 You have freedom to copy and modify this GNU Manual, like GNU 43software. Copies published by the Free Software Foundation raise 44funds for GNU development. 45 46INFO-DIR-SECTION Software development 47START-INFO-DIR-ENTRY 48* gccinstall: (gccinstall). Installing the GNU Compiler Collection. 49END-INFO-DIR-ENTRY 50 51 52File: gccinstall.info, Node: Top, Up: (dir) 53 54* Menu: 55 56* Installing GCC:: This document describes the generic installation 57 procedure for GCC as well as detailing some target 58 specific installation instructions. 59 60* Specific:: Host/target specific installation notes for GCC. 61* Binaries:: Where to get pre-compiled binaries. 62 63* Old:: Old installation documentation. 64 65* GNU Free Documentation License:: How you can copy and share this manual. 66* Concept Index:: This index has two entries. 67 68 69File: gccinstall.info, Node: Installing GCC, Next: Binaries, Up: Top 70 711 Installing GCC 72**************** 73 74 The latest version of this document is always available at 75http://gcc.gnu.org/install/. 76 77 This document describes the generic installation procedure for GCC 78as well as detailing some target specific installation instructions. 79 80 GCC includes several components that previously were separate 81distributions with their own installation instructions. This document 82supersedes all package specific installation instructions. 83 84 _Before_ starting the build/install procedure please check the *note 85host/target specific installation notes: Specific. We recommend you 86browse the entire generic installation instructions before you proceed. 87 88 Lists of successful builds for released versions of GCC are 89available at `http://gcc.gnu.org/buildstat.html'. These lists are 90updated as new information becomes available. 91 92 The installation procedure itself is broken into five steps. 93 94* Menu: 95 96* Prerequisites:: 97* Downloading the source:: 98* Configuration:: 99* Building:: 100* Testing:: (optional) 101* Final install:: 102 103 Please note that GCC does not support `make uninstall' and probably 104won't do so in the near future as this would open a can of worms. 105Instead, we suggest that you install GCC into a directory of its own 106and simply remove that directory when you do not need that specific 107version of GCC any longer, and, if shared libraries are installed there 108as well, no more binaries exist that use them. 109 110 111File: gccinstall.info, Node: Prerequisites, Next: Downloading the source, Up: Installing GCC 112 1132 Prerequisites 114*************** 115 116 GCC requires that various tools and packages be available for use in 117the build procedure. Modifying GCC sources requires additional tools 118described below. 119 120Tools/packages necessary for building GCC 121========================================= 122 123ISO C90 compiler 124 Necessary to bootstrap GCC, although versions of GCC prior to 3.4 125 also allow bootstrapping with a traditional (K&R) C compiler. 126 127 To build all languages in a cross-compiler or other configuration 128 where 3-stage bootstrap is not performed, you need to start with 129 an existing GCC binary (version 2.95 or later) because source code 130 for language frontends other than C might use GCC extensions. 131 132GNAT 133 In order to build the Ada compiler (GNAT) you must already have 134 GNAT installed because portions of the Ada frontend are written in 135 Ada (with GNAT extensions.) Refer to the Ada installation 136 instructions for more specific information. 137 138A "working" POSIX compatible shell, or GNU bash 139 Necessary when running `configure' because some `/bin/sh' shells 140 have bugs and may crash when configuring the target libraries. In 141 other cases, `/bin/sh' or `ksh' have disastrous corner-case 142 performance problems. This can cause target `configure' runs to 143 literally take days to complete in some cases. 144 145 So on some platforms `/bin/ksh' is sufficient, on others it isn't. 146 See the host/target specific instructions for your platform, or 147 use `bash' to be sure. Then set `CONFIG_SHELL' in your 148 environment to your "good" shell prior to running 149 `configure'/`make'. 150 151 `zsh' is not a fully compliant POSIX shell and will not work when 152 configuring GCC. 153 154A POSIX or SVR4 awk 155 Necessary for creating some of the generated source files for GCC. 156 If in doubt, use a recent GNU awk version, as some of the older 157 ones are broken. GNU awk version 3.1.5 is known to work. 158 159GNU binutils 160 Necessary in some circumstances, optional in others. See the 161 host/target specific instructions for your platform for the exact 162 requirements. 163 164gzip version 1.2.4 (or later) or 165bzip2 version 1.0.2 (or later) 166 Necessary to uncompress GCC `tar' files when source code is 167 obtained via FTP mirror sites. 168 169GNU make version 3.80 (or later) 170 You must have GNU make installed to build GCC. 171 172GNU tar version 1.14 (or later) 173 Necessary (only on some platforms) to untar the source code. Many 174 systems' `tar' programs will also work, only try GNU `tar' if you 175 have problems. 176 177GNU Multiple Precision Library (GMP) version 4.3.2 (or later) 178 Necessary to build GCC. If you do not have it installed in your 179 library search path, you will have to configure with the 180 `--with-gmp' configure option. See also `--with-gmp-lib' and 181 `--with-gmp-include'. Alternatively, if a GMP source distribution 182 is found in a subdirectory of your GCC sources named `gmp', it 183 will be built together with GCC. 184 185MPFR Library version 2.4.2 (or later) 186 Necessary to build GCC. It can be downloaded from 187 `http://www.mpfr.org/'. The `--with-mpfr' configure option should 188 be used if your MPFR Library is not installed in your default 189 library search path. See also `--with-mpfr-lib' and 190 `--with-mpfr-include'. Alternatively, if a MPFR source 191 distribution is found in a subdirectory of your GCC sources named 192 `mpfr', it will be built together with GCC. 193 194MPC Library version 0.8.1 (or later) 195 Necessary to build GCC. It can be downloaded from 196 `http://www.multiprecision.org/'. The `--with-mpc' configure 197 option should be used if your MPC Library is not installed in your 198 default library search path. See also `--with-mpc-lib' and 199 `--with-mpc-include'. Alternatively, if an MPC source 200 distribution is found in a subdirectory of your GCC sources named 201 `mpc', it will be built together with GCC. 202 203Parma Polyhedra Library (PPL) version 0.10 204 Necessary to build GCC with the Graphite loop optimizations. It 205 can be downloaded from `http://www.cs.unipr.it/ppl/Download/'. 206 207 The `--with-ppl' configure option should be used if PPL is not 208 installed in your default library search path. 209 210CLooG-PPL version 0.15 211 Necessary to build GCC with the Graphite loop optimizations. It 212 can be downloaded from `ftp://gcc.gnu.org/pub/gcc/infrastructure/'. 213 The code in `cloog-ppl-0.15.tar.gz' comes from a branch of CLooG 214 available from `http://repo.or.cz/w/cloog-ppl.git'. CLooG-PPL 215 should be configured with `--with-ppl'. 216 217 The `--with-cloog' configure option should be used if CLooG is not 218 installed in your default library search path. 219 220`jar', or InfoZIP (`zip' and `unzip') 221 Necessary to build libgcj, the GCJ runtime. 222 223libelf version 0.8.12 (or later) 224 Necessary to build link-time optimization (LTO) support. It can be 225 downloaded from 226 `http://www.mr511.de/software/libelf-0.8.12.tar.gz', though it is 227 commonly available in several systems. The versions in IRIX 5 and 228 6 don't work since they lack `gelf.h'. The version in Solaris 2 229 does work. 230 231 The `--with-libelf' configure option should be used if libelf is 232 not installed in your default library search patch. 233 234 235Tools/packages necessary for modifying GCC 236========================================== 237 238autoconf version 2.64 239GNU m4 version 1.4.6 (or later) 240 Necessary when modifying `configure.ac', `aclocal.m4', etc. to 241 regenerate `configure' and `config.in' files. 242 243automake version 1.11.1 244 Necessary when modifying a `Makefile.am' file to regenerate its 245 associated `Makefile.in'. 246 247 Much of GCC does not use automake, so directly edit the 248 `Makefile.in' file. Specifically this applies to the `gcc', 249 `intl', `libcpp', `libiberty', `libobjc' directories as well as 250 any of their subdirectories. 251 252 For directories that use automake, GCC requires the latest release 253 in the 1.11 series, which is currently 1.11.1. When regenerating 254 a directory to a newer version, please update all the directories 255 using an older 1.11 to the latest released version. 256 257gettext version 0.14.5 (or later) 258 Needed to regenerate `gcc.pot'. 259 260gperf version 2.7.2 (or later) 261 Necessary when modifying `gperf' input files, e.g. 262 `gcc/cp/cfns.gperf' to regenerate its associated header file, e.g. 263 `gcc/cp/cfns.h'. 264 265DejaGnu 1.4.4 266Expect 267Tcl 268 Necessary to run the GCC testsuite; see the section on testing for 269 details. 270 271autogen version 5.5.4 (or later) and 272guile version 1.4.1 (or later) 273 Necessary to regenerate `fixinc/fixincl.x' from 274 `fixinc/inclhack.def' and `fixinc/*.tpl'. 275 276 Necessary to run `make check' for `fixinc'. 277 278 Necessary to regenerate the top level `Makefile.in' file from 279 `Makefile.tpl' and `Makefile.def'. 280 281Flex version 2.5.4 (or later) 282 Necessary when modifying `*.l' files. 283 284 Necessary to build GCC during development because the generated 285 output files are not included in the SVN repository. They are 286 included in releases. 287 288Texinfo version 4.7 (or later) 289 Necessary for running `makeinfo' when modifying `*.texi' files to 290 test your changes. 291 292 Necessary for running `make dvi' or `make pdf' to create printable 293 documentation in DVI or PDF format. Texinfo version 4.8 or later 294 is required for `make pdf'. 295 296 Necessary to build GCC documentation during development because the 297 generated output files are not included in the SVN repository. 298 They are included in releases. 299 300TeX (any working version) 301 Necessary for running `texi2dvi' and `texi2pdf', which are used 302 when running `make dvi' or `make pdf' to create DVI or PDF files, 303 respectively. 304 305SVN (any version) 306SSH (any version) 307 Necessary to access the SVN repository. Public releases and weekly 308 snapshots of the development sources are also available via FTP. 309 310Perl version 5.6.1 (or later) 311 Necessary when regenerating `Makefile' dependencies in libiberty. 312 Necessary when regenerating `libiberty/functions.texi'. Necessary 313 when generating manpages from Texinfo manuals. Necessary when 314 targetting Darwin, building libstdc++, and not using 315 `--disable-symvers'. Used by various scripts to generate some 316 files included in SVN (mainly Unicode-related and rarely changing) 317 from source tables. 318 319GNU diffutils version 2.7 (or later) 320 Useful when submitting patches for the GCC source code. 321 322patch version 2.5.4 (or later) 323 Necessary when applying patches, created with `diff', to one's own 324 sources. 325 326ecj1 327gjavah 328 If you wish to modify `.java' files in libjava, you will need to 329 configure with `--enable-java-maintainer-mode', and you will need 330 to have executables named `ecj1' and `gjavah' in your path. The 331 `ecj1' executable should run the Eclipse Java compiler via the 332 GCC-specific entry point. You can download a suitable jar from 333 `ftp://sourceware.org/pub/java/', or by running the script 334 `contrib/download_ecj'. 335 336antlr.jar version 2.7.1 (or later) 337antlr binary 338 If you wish to build the `gjdoc' binary in libjava, you will need 339 to have an `antlr.jar' library available. The library is searched 340 in system locations but can be configured with `--with-antlr-jar=' 341 instead. When configuring with `--enable-java-maintainer-mode', 342 you will need to have one of the executables named `cantlr', 343 `runantlr' or `antlr' in your path. 344 345 346 347File: gccinstall.info, Node: Downloading the source, Next: Configuration, Prev: Prerequisites, Up: Installing GCC 348 3493 Downloading GCC 350***************** 351 352 GCC is distributed via SVN and FTP tarballs compressed with `gzip' or 353`bzip2'. It is possible to download a full distribution or specific 354components. 355 356 Please refer to the releases web page for information on how to 357obtain GCC. 358 359 The full distribution includes the C, C++, Objective-C, Fortran, 360Java, and Ada (in the case of GCC 3.1 and later) compilers. The full 361distribution also includes runtime libraries for C++, Objective-C, 362Fortran, and Java. In GCC 3.0 and later versions, the GNU compiler 363testsuites are also included in the full distribution. 364 365 If you choose to download specific components, you must download the 366core GCC distribution plus any language specific distributions you wish 367to use. The core distribution includes the C language front end as 368well as the shared components. Each language has a tarball which 369includes the language front end as well as the language runtime (when 370appropriate). 371 372 Unpack the core distribution as well as any language specific 373distributions in the same directory. 374 375 If you also intend to build binutils (either to upgrade an existing 376installation or for use in place of the corresponding tools of your 377OS), unpack the binutils distribution either in the same directory or a 378separate one. In the latter case, add symbolic links to any components 379of the binutils you intend to build alongside the compiler (`bfd', 380`binutils', `gas', `gprof', `ld', `opcodes', ...) to the directory 381containing the GCC sources. 382 383 Likewise the GMP, MPFR and MPC libraries can be automatically built 384together with GCC. Unpack the GMP, MPFR and/or MPC source 385distributions in the directory containing the GCC sources and rename 386their directories to `gmp', `mpfr' and `mpc', respectively (or use 387symbolic links with the same name). 388 389 390File: gccinstall.info, Node: Configuration, Next: Building, Prev: Downloading the source, Up: Installing GCC 391 3924 Installing GCC: Configuration 393******************************* 394 395 Like most GNU software, GCC must be configured before it can be 396built. This document describes the recommended configuration procedure 397for both native and cross targets. 398 399 We use SRCDIR to refer to the toplevel source directory for GCC; we 400use OBJDIR to refer to the toplevel build/object directory. 401 402 If you obtained the sources via SVN, SRCDIR must refer to the top 403`gcc' directory, the one where the `MAINTAINERS' file can be found, and 404not its `gcc' subdirectory, otherwise the build will fail. 405 406 If either SRCDIR or OBJDIR is located on an automounted NFS file 407system, the shell's built-in `pwd' command will return temporary 408pathnames. Using these can lead to various sorts of build problems. 409To avoid this issue, set the `PWDCMD' environment variable to an 410automounter-aware `pwd' command, e.g., `pawd' or `amq -w', during the 411configuration and build phases. 412 413 First, we *highly* recommend that GCC be built into a separate 414directory from the sources which does *not* reside within the source 415tree. This is how we generally build GCC; building where SRCDIR == 416OBJDIR should still work, but doesn't get extensive testing; building 417where OBJDIR is a subdirectory of SRCDIR is unsupported. 418 419 If you have previously built GCC in the same directory for a 420different target machine, do `make distclean' to delete all files that 421might be invalid. One of the files this deletes is `Makefile'; if 422`make distclean' complains that `Makefile' does not exist or issues a 423message like "don't know how to make distclean" it probably means that 424the directory is already suitably clean. However, with the recommended 425method of building in a separate OBJDIR, you should simply use a 426different OBJDIR for each target. 427 428 Second, when configuring a native system, either `cc' or `gcc' must 429be in your path or you must set `CC' in your environment before running 430configure. Otherwise the configuration scripts may fail. 431 432 To configure GCC: 433 434 % mkdir OBJDIR 435 % cd OBJDIR 436 % SRCDIR/configure [OPTIONS] [TARGET] 437 438Distributor options 439=================== 440 441If you will be distributing binary versions of GCC, with modifications 442to the source code, you should use the options described in this 443section to make clear that your version contains modifications. 444 445`--with-pkgversion=VERSION' 446 Specify a string that identifies your package. You may wish to 447 include a build number or build date. This version string will be 448 included in the output of `gcc --version'. This suffix does not 449 replace the default version string, only the `GCC' part. 450 451 The default value is `GCC'. 452 453`--with-bugurl=URL' 454 Specify the URL that users should visit if they wish to report a 455 bug. You are of course welcome to forward bugs reported to you to 456 the FSF, if you determine that they are not bugs in your 457 modifications. 458 459 The default value refers to the FSF's GCC bug tracker. 460 461 462Target specification 463==================== 464 465 * GCC has code to correctly determine the correct value for TARGET 466 for nearly all native systems. Therefore, we highly recommend you 467 do not provide a configure target when configuring a native 468 compiler. 469 470 * TARGET must be specified as `--target=TARGET' when configuring a 471 cross compiler; examples of valid targets would be m68k-elf, 472 sh-elf, etc. 473 474 * Specifying just TARGET instead of `--target=TARGET' implies that 475 the host defaults to TARGET. 476 477Options specification 478===================== 479 480Use OPTIONS to override several configure time options for GCC. A list 481of supported OPTIONS follows; `configure --help' may list other 482options, but those not listed below may not work and should not 483normally be used. 484 485 Note that each `--enable' option has a corresponding `--disable' 486option and that each `--with' option has a corresponding `--without' 487option. 488 489`--prefix=DIRNAME' 490 Specify the toplevel installation directory. This is the 491 recommended way to install the tools into a directory other than 492 the default. The toplevel installation directory defaults to 493 `/usr/local'. 494 495 We *highly* recommend against DIRNAME being the same or a 496 subdirectory of OBJDIR or vice versa. If specifying a directory 497 beneath a user's home directory tree, some shells will not expand 498 DIRNAME correctly if it contains the `~' metacharacter; use 499 `$HOME' instead. 500 501 The following standard `autoconf' options are supported. Normally 502 you should not need to use these options. 503 `--exec-prefix=DIRNAME' 504 Specify the toplevel installation directory for 505 architecture-dependent files. The default is `PREFIX'. 506 507 `--bindir=DIRNAME' 508 Specify the installation directory for the executables called 509 by users (such as `gcc' and `g++'). The default is 510 `EXEC-PREFIX/bin'. 511 512 `--libdir=DIRNAME' 513 Specify the installation directory for object code libraries 514 and internal data files of GCC. The default is 515 `EXEC-PREFIX/lib'. 516 517 `--libexecdir=DIRNAME' 518 Specify the installation directory for internal executables 519 of GCC. The default is `EXEC-PREFIX/libexec'. 520 521 `--with-slibdir=DIRNAME' 522 Specify the installation directory for the shared libgcc 523 library. The default is `LIBDIR'. 524 525 `--datarootdir=DIRNAME' 526 Specify the root of the directory tree for read-only 527 architecture-independent data files referenced by GCC. The 528 default is `PREFIX/share'. 529 530 `--infodir=DIRNAME' 531 Specify the installation directory for documentation in info 532 format. The default is `DATAROOTDIR/info'. 533 534 `--datadir=DIRNAME' 535 Specify the installation directory for some 536 architecture-independent data files referenced by GCC. The 537 default is `DATAROOTDIR'. 538 539 `--docdir=DIRNAME' 540 Specify the installation directory for documentation files 541 (other than Info) for GCC. The default is `DATAROOTDIR/doc'. 542 543 `--htmldir=DIRNAME' 544 Specify the installation directory for HTML documentation 545 files. The default is `DOCDIR'. 546 547 `--pdfdir=DIRNAME' 548 Specify the installation directory for PDF documentation 549 files. The default is `DOCDIR'. 550 551 `--mandir=DIRNAME' 552 Specify the installation directory for manual pages. The 553 default is `DATAROOTDIR/man'. (Note that the manual pages 554 are only extracts from the full GCC manuals, which are 555 provided in Texinfo format. The manpages are derived by an 556 automatic conversion process from parts of the full manual.) 557 558 `--with-gxx-include-dir=DIRNAME' 559 Specify the installation directory for G++ header files. The 560 default depends on other configuration options, and differs 561 between cross and native configurations. 562 563 564`--program-prefix=PREFIX' 565 GCC supports some transformations of the names of its programs when 566 installing them. This option prepends PREFIX to the names of 567 programs to install in BINDIR (see above). For example, specifying 568 `--program-prefix=foo-' would result in `gcc' being installed as 569 `/usr/local/bin/foo-gcc'. 570 571`--program-suffix=SUFFIX' 572 Appends SUFFIX to the names of programs to install in BINDIR (see 573 above). For example, specifying `--program-suffix=-3.1' would 574 result in `gcc' being installed as `/usr/local/bin/gcc-3.1'. 575 576`--program-transform-name=PATTERN' 577 Applies the `sed' script PATTERN to be applied to the names of 578 programs to install in BINDIR (see above). PATTERN has to consist 579 of one or more basic `sed' editing commands, separated by 580 semicolons. For example, if you want the `gcc' program name to be 581 transformed to the installed program `/usr/local/bin/myowngcc' and 582 the `g++' program name to be transformed to 583 `/usr/local/bin/gspecial++' without changing other program names, 584 you could use the pattern 585 `--program-transform-name='s/^gcc$/myowngcc/; s/^g++$/gspecial++/'' 586 to achieve this effect. 587 588 All three options can be combined and used together, resulting in 589 more complex conversion patterns. As a basic rule, PREFIX (and 590 SUFFIX) are prepended (appended) before further transformations 591 can happen with a special transformation script PATTERN. 592 593 As currently implemented, this option only takes effect for native 594 builds; cross compiler binaries' names are not transformed even 595 when a transformation is explicitly asked for by one of these 596 options. 597 598 For native builds, some of the installed programs are also 599 installed with the target alias in front of their name, as in 600 `i686-pc-linux-gnu-gcc'. All of the above transformations happen 601 before the target alias is prepended to the name--so, specifying 602 `--program-prefix=foo-' and `program-suffix=-3.1', the resulting 603 binary would be installed as 604 `/usr/local/bin/i686-pc-linux-gnu-foo-gcc-3.1'. 605 606 As a last shortcoming, none of the installed Ada programs are 607 transformed yet, which will be fixed in some time. 608 609`--with-local-prefix=DIRNAME' 610 Specify the installation directory for local include files. The 611 default is `/usr/local'. Specify this option if you want the 612 compiler to search directory `DIRNAME/include' for locally 613 installed header files _instead_ of `/usr/local/include'. 614 615 You should specify `--with-local-prefix' *only* if your site has a 616 different convention (not `/usr/local') for where to put 617 site-specific files. 618 619 The default value for `--with-local-prefix' is `/usr/local' 620 regardless of the value of `--prefix'. Specifying `--prefix' has 621 no effect on which directory GCC searches for local header files. 622 This may seem counterintuitive, but actually it is logical. 623 624 The purpose of `--prefix' is to specify where to _install GCC_. 625 The local header files in `/usr/local/include'--if you put any in 626 that directory--are not part of GCC. They are part of other 627 programs--perhaps many others. (GCC installs its own header files 628 in another directory which is based on the `--prefix' value.) 629 630 Both the local-prefix include directory and the GCC-prefix include 631 directory are part of GCC's "system include" directories. 632 Although these two directories are not fixed, they need to be 633 searched in the proper order for the correct processing of the 634 include_next directive. The local-prefix include directory is 635 searched before the GCC-prefix include directory. Another 636 characteristic of system include directories is that pedantic 637 warnings are turned off for headers in these directories. 638 639 Some autoconf macros add `-I DIRECTORY' options to the compiler 640 command line, to ensure that directories containing installed 641 packages' headers are searched. When DIRECTORY is one of GCC's 642 system include directories, GCC will ignore the option so that 643 system directories continue to be processed in the correct order. 644 This may result in a search order different from what was 645 specified but the directory will still be searched. 646 647 GCC automatically searches for ordinary libraries using 648 `GCC_EXEC_PREFIX'. Thus, when the same installation prefix is 649 used for both GCC and packages, GCC will automatically search for 650 both headers and libraries. This provides a configuration that is 651 easy to use. GCC behaves in a manner similar to that when it is 652 installed as a system compiler in `/usr'. 653 654 Sites that need to install multiple versions of GCC may not want to 655 use the above simple configuration. It is possible to use the 656 `--program-prefix', `--program-suffix' and 657 `--program-transform-name' options to install multiple versions 658 into a single directory, but it may be simpler to use different 659 prefixes and the `--with-local-prefix' option to specify the 660 location of the site-specific files for each version. It will 661 then be necessary for users to specify explicitly the location of 662 local site libraries (e.g., with `LIBRARY_PATH'). 663 664 The same value can be used for both `--with-local-prefix' and 665 `--prefix' provided it is not `/usr'. This can be used to avoid 666 the default search of `/usr/local/include'. 667 668 *Do not* specify `/usr' as the `--with-local-prefix'! The 669 directory you use for `--with-local-prefix' *must not* contain any 670 of the system's standard header files. If it did contain them, 671 certain programs would be miscompiled (including GNU Emacs, on 672 certain targets), because this would override and nullify the 673 header file corrections made by the `fixincludes' script. 674 675 Indications are that people who use this option use it based on 676 mistaken ideas of what it is for. People use it as if it 677 specified where to install part of GCC. Perhaps they make this 678 assumption because installing GCC creates the directory. 679 680`--enable-shared[=PACKAGE[,...]]' 681 Build shared versions of libraries, if shared libraries are 682 supported on the target platform. Unlike GCC 2.95.x and earlier, 683 shared libraries are enabled by default on all platforms that 684 support shared libraries. 685 686 If a list of packages is given as an argument, build shared 687 libraries only for the listed packages. For other packages, only 688 static libraries will be built. Package names currently 689 recognized in the GCC tree are `libgcc' (also known as `gcc'), 690 `libstdc++' (not `libstdc++-v3'), `libffi', `zlib', `boehm-gc', 691 `ada', `libada', `libjava' and `libobjc'. Note `libiberty' does 692 not support shared libraries at all. 693 694 Use `--disable-shared' to build only static libraries. Note that 695 `--disable-shared' does not accept a list of package names as 696 argument, only `--enable-shared' does. 697 698`--with-gnu-as' 699 Specify that the compiler should assume that the assembler it 700 finds is the GNU assembler. However, this does not modify the 701 rules to find an assembler and will result in confusion if the 702 assembler found is not actually the GNU assembler. (Confusion may 703 also result if the compiler finds the GNU assembler but has not 704 been configured with `--with-gnu-as'.) If you have more than one 705 assembler installed on your system, you may want to use this 706 option in connection with `--with-as=PATHNAME' or 707 `--with-build-time-tools=PATHNAME'. 708 709 The following systems are the only ones where it makes a difference 710 whether you use the GNU assembler. On any other system, 711 `--with-gnu-as' has no effect. 712 713 * `hppa1.0-ANY-ANY' 714 715 * `hppa1.1-ANY-ANY' 716 717 * `sparc-sun-solaris2.ANY' 718 719 * `sparc64-ANY-solaris2.ANY' 720 721`--with-as=PATHNAME' 722 Specify that the compiler should use the assembler pointed to by 723 PATHNAME, rather than the one found by the standard rules to find 724 an assembler, which are: 725 * Unless GCC is being built with a cross compiler, check the 726 `LIBEXEC/gcc/TARGET/VERSION' directory. LIBEXEC defaults to 727 `EXEC-PREFIX/libexec'; EXEC-PREFIX defaults to PREFIX, which 728 defaults to `/usr/local' unless overridden by the 729 `--prefix=PATHNAME' switch described above. TARGET is the 730 target system triple, such as `sparc-sun-solaris2.7', and 731 VERSION denotes the GCC version, such as 3.0. 732 733 * If the target system is the same that you are building on, 734 check operating system specific directories (e.g. 735 `/usr/ccs/bin' on Sun Solaris 2). 736 737 * Check in the `PATH' for a tool whose name is prefixed by the 738 target system triple. 739 740 * Check in the `PATH' for a tool whose name is not prefixed by 741 the target system triple, if the host and target system 742 triple are the same (in other words, we use a host tool if it 743 can be used for the target as well). 744 745 You may want to use `--with-as' if no assembler is installed in 746 the directories listed above, or if you have multiple assemblers 747 installed and want to choose one that is not found by the above 748 rules. 749 750`--with-gnu-ld' 751 Same as `--with-gnu-as' but for the linker. 752 753`--with-ld=PATHNAME' 754 Same as `--with-as' but for the linker. 755 756`--with-stabs' 757 Specify that stabs debugging information should be used instead of 758 whatever format the host normally uses. Normally GCC uses the 759 same debug format as the host system. 760 761 On MIPS based systems and on Alphas, you must specify whether you 762 want GCC to create the normal ECOFF debugging format, or to use 763 BSD-style stabs passed through the ECOFF symbol table. The normal 764 ECOFF debug format cannot fully handle languages other than C. 765 BSD stabs format can handle other languages, but it only works 766 with the GNU debugger GDB. 767 768 Normally, GCC uses the ECOFF debugging format by default; if you 769 prefer BSD stabs, specify `--with-stabs' when you configure GCC. 770 771 No matter which default you choose when you configure GCC, the user 772 can use the `-gcoff' and `-gstabs+' options to specify explicitly 773 the debug format for a particular compilation. 774 775 `--with-stabs' is meaningful on the ISC system on the 386, also, if 776 `--with-gas' is used. It selects use of stabs debugging 777 information embedded in COFF output. This kind of debugging 778 information supports C++ well; ordinary COFF debugging information 779 does not. 780 781 `--with-stabs' is also meaningful on 386 systems running SVR4. It 782 selects use of stabs debugging information embedded in ELF output. 783 The C++ compiler currently (2.6.0) does not support the DWARF 784 debugging information normally used on 386 SVR4 platforms; stabs 785 provide a workable alternative. This requires gas and gdb, as the 786 normal SVR4 tools can not generate or interpret stabs. 787 788`--disable-multilib' 789 Specify that multiple target libraries to support different target 790 variants, calling conventions, etc. should not be built. The 791 default is to build a predefined set of them. 792 793 Some targets provide finer-grained control over which multilibs 794 are built (e.g., `--disable-softfloat'): 795 `arc-*-elf*' 796 biendian. 797 798 `arm-*-*' 799 fpu, 26bit, underscore, interwork, biendian, nofmult. 800 801 `m68*-*-*' 802 softfloat, m68881, m68000, m68020. 803 804 `mips*-*-*' 805 single-float, biendian, softfloat. 806 807 `powerpc*-*-*, rs6000*-*-*' 808 aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, 809 biendian, sysv, aix. 810 811 812`--with-multilib-list=LIST' 813`--without-multilib-list' 814 Specify what multilibs to build. Currently only implemented for 815 sh*-*-*. 816 817 LIST is a comma separated list of CPU names. These must be of the 818 form `sh*' or `m*' (in which case they match the compiler option 819 for that processor). The list should not contain any endian 820 options - these are handled by `--with-endian'. 821 822 If LIST is empty, then there will be no multilibs for extra 823 processors. The multilib for the secondary endian remains enabled. 824 825 As a special case, if an entry in the list starts with a `!' 826 (exclamation point), then it is added to the list of excluded 827 multilibs. Entries of this sort should be compatible with 828 `MULTILIB_EXCLUDES' (once the leading `!' has been stripped). 829 830 If `--with-multilib-list' is not given, then a default set of 831 multilibs is selected based on the value of `--target'. This is 832 usually the complete set of libraries, but some targets imply a 833 more specialized subset. 834 835 Example 1: to configure a compiler for SH4A only, but supporting 836 both endians, with little endian being the default: 837 --with-cpu=sh4a --with-endian=little,big --with-multilib-list= 838 839 Example 2: to configure a compiler for both SH4A and SH4AL-DSP, 840 but with only little endian SH4AL: 841 --with-cpu=sh4a --with-endian=little,big --with-multilib-list=sh4al,!mb/m4al 842 843`--with-endian=ENDIANS' 844 Specify what endians to use. Currently only implemented for 845 sh*-*-*. 846 847 ENDIANS may be one of the following: 848 `big' 849 Use big endian exclusively. 850 851 `little' 852 Use little endian exclusively. 853 854 `big,little' 855 Use big endian by default. Provide a multilib for little 856 endian. 857 858 `little,big' 859 Use little endian by default. Provide a multilib for big 860 endian. 861 862`--enable-threads' 863 Specify that the target supports threads. This affects the 864 Objective-C compiler and runtime library, and exception handling 865 for other languages like C++ and Java. On some systems, this is 866 the default. 867 868 In general, the best (and, in many cases, the only known) threading 869 model available will be configured for use. Beware that on some 870 systems, GCC has not been taught what threading models are 871 generally available for the system. In this case, 872 `--enable-threads' is an alias for `--enable-threads=single'. 873 874`--disable-threads' 875 Specify that threading support should be disabled for the system. 876 This is an alias for `--enable-threads=single'. 877 878`--enable-threads=LIB' 879 Specify that LIB is the thread support library. This affects the 880 Objective-C compiler and runtime library, and exception handling 881 for other languages like C++ and Java. The possibilities for LIB 882 are: 883 884 `aix' 885 AIX thread support. 886 887 `dce' 888 DCE thread support. 889 890 `gnat' 891 Ada tasking support. For non-Ada programs, this setting is 892 equivalent to `single'. When used in conjunction with the 893 Ada run time, it causes GCC to use the same thread primitives 894 as Ada uses. This option is necessary when using both Ada 895 and the back end exception handling, which is the default for 896 most Ada targets. 897 898 `mach' 899 Generic MACH thread support, known to work on NeXTSTEP. 900 (Please note that the file needed to support this 901 configuration, `gthr-mach.h', is missing and thus this 902 setting will cause a known bootstrap failure.) 903 904 `no' 905 This is an alias for `single'. 906 907 `posix' 908 Generic POSIX/Unix98 thread support. 909 910 `posix95' 911 Generic POSIX/Unix95 thread support. 912 913 `rtems' 914 RTEMS thread support. 915 916 `single' 917 Disable thread support, should work for all platforms. 918 919 `solaris' 920 Sun Solaris 2/Unix International thread support. Only use 921 this if you really need to use this legacy API instead of the 922 default, `posix'. 923 924 `vxworks' 925 VxWorks thread support. 926 927 `win32' 928 Microsoft Win32 API thread support. 929 930 `nks' 931 Novell Kernel Services thread support. 932 933`--enable-tls' 934 Specify that the target supports TLS (Thread Local Storage). 935 Usually configure can correctly determine if TLS is supported. In 936 cases where it guesses incorrectly, TLS can be explicitly enabled 937 or disabled with `--enable-tls' or `--disable-tls'. This can 938 happen if the assembler supports TLS but the C library does not, 939 or if the assumptions made by the configure test are incorrect. 940 941`--disable-tls' 942 Specify that the target does not support TLS. This is an alias 943 for `--enable-tls=no'. 944 945`--with-cpu=CPU' 946`--with-cpu-32=CPU' 947`--with-cpu-64=CPU' 948 Specify which cpu variant the compiler should generate code for by 949 default. CPU will be used as the default value of the `-mcpu=' 950 switch. This option is only supported on some targets, including 951 ARM, i386, M68k, PowerPC, and SPARC. The `--with-cpu-32' and 952 `--with-cpu-64' options specify separate default CPUs for 32-bit 953 and 64-bit modes; these options are only supported for i386, 954 x86-64 and PowerPC. 955 956`--with-schedule=CPU' 957`--with-arch=CPU' 958`--with-arch-32=CPU' 959`--with-arch-64=CPU' 960`--with-tune=CPU' 961`--with-tune-32=CPU' 962`--with-tune-64=CPU' 963`--with-abi=ABI' 964`--with-fpu=TYPE' 965`--with-float=TYPE' 966 These configure options provide default values for the 967 `-mschedule=', `-march=', `-mtune=', `-mabi=', and `-mfpu=' 968 options and for `-mhard-float' or `-msoft-float'. As with 969 `--with-cpu', which switches will be accepted and acceptable values 970 of the arguments depend on the target. 971 972`--with-mode=MODE' 973 Specify if the compiler should default to `-marm' or `-mthumb'. 974 This option is only supported on ARM targets. 975 976`--with-fpmath=sse' 977 Specify if the compiler should default to `-msse2' and 978 `-mfpmath=sse'. This option is only supported on i386 and x86-64 979 targets. 980 981`--with-divide=TYPE' 982 Specify how the compiler should generate code for checking for 983 division by zero. This option is only supported on the MIPS 984 target. The possibilities for TYPE are: 985 `traps' 986 Division by zero checks use conditional traps (this is the 987 default on systems that support conditional traps). 988 989 `breaks' 990 Division by zero checks use the break instruction. 991 992`--with-llsc' 993 On MIPS targets, make `-mllsc' the default when no `-mno-llsc' 994 option is passed. This is the default for Linux-based targets, as 995 the kernel will emulate them if the ISA does not provide them. 996 997`--without-llsc' 998 On MIPS targets, make `-mno-llsc' the default when no `-mllsc' 999 option is passed. 1000 1001`--with-synci' 1002 On MIPS targets, make `-msynci' the default when no `-mno-synci' 1003 option is passed. 1004 1005`--without-synci' 1006 On MIPS targets, make `-mno-synci' the default when no `-msynci' 1007 option is passed. This is the default. 1008 1009`--with-mips-plt' 1010 On MIPS targets, make use of copy relocations and PLTs. These 1011 features are extensions to the traditional SVR4-based MIPS ABIs 1012 and require support from GNU binutils and the runtime C library. 1013 1014`--enable-__cxa_atexit' 1015 Define if you want to use __cxa_atexit, rather than atexit, to 1016 register C++ destructors for local statics and global objects. 1017 This is essential for fully standards-compliant handling of 1018 destructors, but requires __cxa_atexit in libc. This option is 1019 currently only available on systems with GNU libc. When enabled, 1020 this will cause `-fuse-cxa-atexit' to be passed by default. 1021 1022`--enable-target-optspace' 1023 Specify that target libraries should be optimized for code space 1024 instead of code speed. This is the default for the m32r platform. 1025 1026`--with-cpp-install-dir=DIRNAME' 1027 Specify that the user visible `cpp' program should be installed in 1028 `PREFIX/DIRNAME/cpp', in addition to BINDIR. 1029 1030`--enable-comdat' 1031 Enable COMDAT group support. This is primarily used to override 1032 the automatically detected value. 1033 1034`--enable-initfini-array' 1035 Force the use of sections `.init_array' and `.fini_array' (instead 1036 of `.init' and `.fini') for constructors and destructors. Option 1037 `--disable-initfini-array' has the opposite effect. If neither 1038 option is specified, the configure script will try to guess 1039 whether the `.init_array' and `.fini_array' sections are supported 1040 and, if they are, use them. 1041 1042`--enable-build-with-cxx' 1043 Build GCC using a C++ compiler rather than a C compiler. This is 1044 an experimental option which may become the default in a later 1045 release. 1046 1047`--enable-maintainer-mode' 1048 The build rules that regenerate the Autoconf and Automake output 1049 files as well as the GCC master message catalog `gcc.pot' are 1050 normally disabled. This is because it can only be rebuilt if the 1051 complete source tree is present. If you have changed the sources 1052 and want to rebuild the catalog, configuring with 1053 `--enable-maintainer-mode' will enable this. Note that you need a 1054 recent version of the `gettext' tools to do so. 1055 1056`--disable-bootstrap' 1057 For a native build, the default configuration is to perform a 1058 3-stage bootstrap of the compiler when `make' is invoked, testing 1059 that GCC can compile itself correctly. If you want to disable 1060 this process, you can configure with `--disable-bootstrap'. 1061 1062`--enable-bootstrap' 1063 In special cases, you may want to perform a 3-stage build even if 1064 the target and host triplets are different. This is possible when 1065 the host can run code compiled for the target (e.g. host is 1066 i686-linux, target is i486-linux). Starting from GCC 4.2, to do 1067 this you have to configure explicitly with `--enable-bootstrap'. 1068 1069`--enable-generated-files-in-srcdir' 1070 Neither the .c and .h files that are generated from Bison and flex 1071 nor the info manuals and man pages that are built from the .texi 1072 files are present in the SVN development tree. When building GCC 1073 from that development tree, or from one of our snapshots, those 1074 generated files are placed in your build directory, which allows 1075 for the source to be in a readonly directory. 1076 1077 If you configure with `--enable-generated-files-in-srcdir' then 1078 those generated files will go into the source directory. This is 1079 mainly intended for generating release or prerelease tarballs of 1080 the GCC sources, since it is not a requirement that the users of 1081 source releases to have flex, Bison, or makeinfo. 1082 1083`--enable-version-specific-runtime-libs' 1084 Specify that runtime libraries should be installed in the compiler 1085 specific subdirectory (`LIBDIR/gcc') rather than the usual places. 1086 In addition, `libstdc++''s include files will be installed into 1087 `LIBDIR' unless you overruled it by using 1088 `--with-gxx-include-dir=DIRNAME'. Using this option is 1089 particularly useful if you intend to use several versions of GCC in 1090 parallel. This is currently supported by `libgfortran', 1091 `libjava', `libmudflap', `libstdc++', and `libobjc'. 1092 1093`--enable-languages=LANG1,LANG2,...' 1094 Specify that only a particular subset of compilers and their 1095 runtime libraries should be built. For a list of valid values for 1096 LANGN you can issue the following command in the `gcc' directory 1097 of your GCC source tree: 1098 grep language= */config-lang.in 1099 Currently, you can use any of the following: `all', `ada', `c', 1100 `c++', `fortran', `java', `objc', `obj-c++'. Building the Ada 1101 compiler has special requirements, see below. If you do not pass 1102 this flag, or specify the option `all', then all default languages 1103 available in the `gcc' sub-tree will be configured. Ada and 1104 Objective-C++ are not default languages; the rest are. 1105 Re-defining `LANGUAGES' when calling `make' *does not* work 1106 anymore, as those language sub-directories might not have been 1107 configured! 1108 1109`--enable-stage1-languages=LANG1,LANG2,...' 1110 Specify that a particular subset of compilers and their runtime 1111 libraries should be built with the system C compiler during stage 1112 1 of the bootstrap process, rather than only in later stages with 1113 the bootstrapped C compiler. The list of valid values is the same 1114 as for `--enable-languages', and the option `all' will select all 1115 of the languages enabled by `--enable-languages'. This option is 1116 primarily useful for GCC development; for instance, when a 1117 development version of the compiler cannot bootstrap due to 1118 compiler bugs, or when one is debugging front ends other than the 1119 C front end. When this option is used, one can then build the 1120 target libraries for the specified languages with the stage-1 1121 compiler by using `make stage1-bubble all-target', or run the 1122 testsuite on the stage-1 compiler for the specified languages 1123 using `make stage1-start check-gcc'. 1124 1125`--disable-libada' 1126 Specify that the run-time libraries and tools used by GNAT should 1127 not be built. This can be useful for debugging, or for 1128 compatibility with previous Ada build procedures, when it was 1129 required to explicitly do a `make -C gcc gnatlib_and_tools'. 1130 1131`--disable-libssp' 1132 Specify that the run-time libraries for stack smashing protection 1133 should not be built. 1134 1135`--disable-libgomp' 1136 Specify that the run-time libraries used by GOMP should not be 1137 built. 1138 1139`--with-dwarf2' 1140 Specify that the compiler should use DWARF 2 debugging information 1141 as the default. 1142 1143`--enable-targets=all' 1144`--enable-targets=TARGET_LIST' 1145 Some GCC targets, e.g. powerpc64-linux, build bi-arch compilers. 1146 These are compilers that are able to generate either 64-bit or 1147 32-bit code. Typically, the corresponding 32-bit target, e.g. 1148 powerpc-linux for powerpc64-linux, only generates 32-bit code. 1149 This option enables the 32-bit target to be a bi-arch compiler, 1150 which is useful when you want a bi-arch compiler that defaults to 1151 32-bit, and you are building a bi-arch or multi-arch binutils in a 1152 combined tree. On mips-linux, this will build a tri-arch compiler 1153 (ABI o32/n32/64), defaulted to o32. Currently, this option only 1154 affects sparc-linux, powerpc-linux, x86-linux and mips-linux. 1155 1156`--enable-secureplt' 1157 This option enables `-msecure-plt' by default for powerpc-linux. 1158 *Note RS/6000 and PowerPC Options: (gcc)RS/6000 and PowerPC 1159 Options, 1160 1161`--enable-cld' 1162 This option enables `-mcld' by default for 32-bit x86 targets. 1163 *Note i386 and x86-64 Options: (gcc)i386 and x86-64 Options, 1164 1165`--enable-win32-registry' 1166`--enable-win32-registry=KEY' 1167`--disable-win32-registry' 1168 The `--enable-win32-registry' option enables Microsoft 1169 Windows-hosted GCC to look up installations paths in the registry 1170 using the following key: 1171 1172 `HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\KEY' 1173 1174 KEY defaults to GCC version number, and can be overridden by the 1175 `--enable-win32-registry=KEY' option. Vendors and distributors 1176 who use custom installers are encouraged to provide a different 1177 key, perhaps one comprised of vendor name and GCC version number, 1178 to avoid conflict with existing installations. This feature is 1179 enabled by default, and can be disabled by 1180 `--disable-win32-registry' option. This option has no effect on 1181 the other hosts. 1182 1183`--nfp' 1184 Specify that the machine does not have a floating point unit. This 1185 option only applies to `m68k-sun-sunosN'. On any other system, 1186 `--nfp' has no effect. 1187 1188`--enable-werror' 1189`--disable-werror' 1190`--enable-werror=yes' 1191`--enable-werror=no' 1192 When you specify this option, it controls whether certain files in 1193 the compiler are built with `-Werror' in bootstrap stage2 and 1194 later. If you don't specify it, `-Werror' is turned on for the 1195 main development trunk. However it defaults to off for release 1196 branches and final releases. The specific files which get 1197 `-Werror' are controlled by the Makefiles. 1198 1199`--enable-checking' 1200`--enable-checking=LIST' 1201 When you specify this option, the compiler is built to perform 1202 internal consistency checks of the requested complexity. This 1203 does not change the generated code, but adds error checking within 1204 the compiler. This will slow down the compiler and may only work 1205 properly if you are building the compiler with GCC. This is `yes' 1206 by default when building from SVN or snapshots, but `release' for 1207 releases. The default for building the stage1 compiler is `yes'. 1208 More control over the checks may be had by specifying LIST. The 1209 categories of checks available are `yes' (most common checks 1210 `assert,misc,tree,gc,rtlflag,runtime'), `no' (no checks at all), 1211 `all' (all but `valgrind'), `release' (cheapest checks 1212 `assert,runtime') or `none' (same as `no'). Individual checks can 1213 be enabled with these flags `assert', `df', `fold', `gc', `gcac' 1214 `misc', `rtl', `rtlflag', `runtime', `tree', and `valgrind'. 1215 1216 The `valgrind' check requires the external `valgrind' simulator, 1217 available from `http://valgrind.org/'. The `df', `rtl', `gcac' 1218 and `valgrind' checks are very expensive. To disable all 1219 checking, `--disable-checking' or `--enable-checking=none' must be 1220 explicitly requested. Disabling assertions will make the compiler 1221 and runtime slightly faster but increase the risk of undetected 1222 internal errors causing wrong code to be generated. 1223 1224`--disable-stage1-checking' 1225`--enable-stage1-checking' 1226`--enable-stage1-checking=LIST' 1227 If no `--enable-checking' option is specified the stage1 compiler 1228 will be built with `yes' checking enabled, otherwise the stage1 1229 checking flags are the same as specified by `--enable-checking'. 1230 To build the stage1 compiler with different checking options use 1231 `--enable-stage1-checking'. The list of checking options is the 1232 same as for `--enable-checking'. If your system is too slow or 1233 too small to bootstrap a released compiler with checking for 1234 stage1 enabled, you can use `--disable-stage1-checking' to disable 1235 checking for the stage1 compiler. 1236 1237`--enable-coverage' 1238`--enable-coverage=LEVEL' 1239 With this option, the compiler is built to collect self coverage 1240 information, every time it is run. This is for internal 1241 development purposes, and only works when the compiler is being 1242 built with gcc. The LEVEL argument controls whether the compiler 1243 is built optimized or not, values are `opt' and `noopt'. For 1244 coverage analysis you want to disable optimization, for 1245 performance analysis you want to enable optimization. When 1246 coverage is enabled, the default level is without optimization. 1247 1248`--enable-gather-detailed-mem-stats' 1249 When this option is specified more detailed information on memory 1250 allocation is gathered. This information is printed when using 1251 `-fmem-report'. 1252 1253`--with-gc' 1254`--with-gc=CHOICE' 1255 With this option you can specify the garbage collector 1256 implementation used during the compilation process. CHOICE can be 1257 one of `page' and `zone', where `page' is the default. 1258 1259`--enable-nls' 1260`--disable-nls' 1261 The `--enable-nls' option enables Native Language Support (NLS), 1262 which lets GCC output diagnostics in languages other than American 1263 English. Native Language Support is enabled by default if not 1264 doing a canadian cross build. The `--disable-nls' option disables 1265 NLS. 1266 1267`--with-included-gettext' 1268 If NLS is enabled, the `--with-included-gettext' option causes the 1269 build procedure to prefer its copy of GNU `gettext'. 1270 1271`--with-catgets' 1272 If NLS is enabled, and if the host lacks `gettext' but has the 1273 inferior `catgets' interface, the GCC build procedure normally 1274 ignores `catgets' and instead uses GCC's copy of the GNU `gettext' 1275 library. The `--with-catgets' option causes the build procedure 1276 to use the host's `catgets' in this situation. 1277 1278`--with-libiconv-prefix=DIR' 1279 Search for libiconv header files in `DIR/include' and libiconv 1280 library files in `DIR/lib'. 1281 1282`--enable-obsolete' 1283 Enable configuration for an obsoleted system. If you attempt to 1284 configure GCC for a system (build, host, or target) which has been 1285 obsoleted, and you do not specify this flag, configure will halt 1286 with an error message. 1287 1288 All support for systems which have been obsoleted in one release 1289 of GCC is removed entirely in the next major release, unless 1290 someone steps forward to maintain the port. 1291 1292`--enable-decimal-float' 1293`--enable-decimal-float=yes' 1294`--enable-decimal-float=no' 1295`--enable-decimal-float=bid' 1296`--enable-decimal-float=dpd' 1297`--disable-decimal-float' 1298 Enable (or disable) support for the C decimal floating point 1299 extension that is in the IEEE 754-2008 standard. This is enabled 1300 by default only on PowerPC, i386, and x86_64 GNU/Linux systems. 1301 Other systems may also support it, but require the user to 1302 specifically enable it. You can optionally control which decimal 1303 floating point format is used (either `bid' or `dpd'). The `bid' 1304 (binary integer decimal) format is default on i386 and x86_64 1305 systems, and the `dpd' (densely packed decimal) format is default 1306 on PowerPC systems. 1307 1308`--enable-fixed-point' 1309`--disable-fixed-point' 1310 Enable (or disable) support for C fixed-point arithmetic. This 1311 option is enabled by default for some targets (such as MIPS) which 1312 have hardware-support for fixed-point operations. On other 1313 targets, you may enable this option manually. 1314 1315`--with-long-double-128' 1316 Specify if `long double' type should be 128-bit by default on 1317 selected GNU/Linux architectures. If using 1318 `--without-long-double-128', `long double' will be by default 1319 64-bit, the same as `double' type. When neither of these 1320 configure options are used, the default will be 128-bit `long 1321 double' when built against GNU C Library 2.4 and later, 64-bit 1322 `long double' otherwise. 1323 1324`--with-gmp=PATHNAME' 1325`--with-gmp-include=PATHNAME' 1326`--with-gmp-lib=PATHNAME' 1327`--with-mpfr=PATHNAME' 1328`--with-mpfr-include=PATHNAME' 1329`--with-mpfr-lib=PATHNAME' 1330`--with-mpc=PATHNAME' 1331`--with-mpc-include=PATHNAME' 1332`--with-mpc-lib=PATHNAME' 1333 If you do not have GMP (the GNU Multiple Precision library), the 1334 MPFR library and/or the MPC library installed in a standard 1335 location and you want to build GCC, you can explicitly specify the 1336 directory where they are installed (`--with-gmp=GMPINSTALLDIR', 1337 `--with-mpfr=MPFRINSTALLDIR', `--with-mpc=MPCINSTALLDIR'). The 1338 `--with-gmp=GMPINSTALLDIR' option is shorthand for 1339 `--with-gmp-lib=GMPINSTALLDIR/lib' and 1340 `--with-gmp-include=GMPINSTALLDIR/include'. Likewise the 1341 `--with-mpfr=MPFRINSTALLDIR' option is shorthand for 1342 `--with-mpfr-lib=MPFRINSTALLDIR/lib' and 1343 `--with-mpfr-include=MPFRINSTALLDIR/include', also the 1344 `--with-mpc=MPCINSTALLDIR' option is shorthand for 1345 `--with-mpc-lib=MPCINSTALLDIR/lib' and 1346 `--with-mpc-include=MPCINSTALLDIR/include'. If these shorthand 1347 assumptions are not correct, you can use the explicit include and 1348 lib options directly. 1349 1350`--with-ppl=PATHNAME' 1351`--with-ppl-include=PATHNAME' 1352`--with-ppl-lib=PATHNAME' 1353`--with-cloog=PATHNAME' 1354`--with-cloog-include=PATHNAME' 1355`--with-cloog-lib=PATHNAME' 1356 If you do not have PPL (the Parma Polyhedra Library) and the CLooG 1357 libraries installed in a standard location and you want to build 1358 GCC, you can explicitly specify the directory where they are 1359 installed (`--with-ppl=PPLINSTALLDIR', 1360 `--with-cloog=CLOOGINSTALLDIR'). The `--with-ppl=PPLINSTALLDIR' 1361 option is shorthand for `--with-ppl-lib=PPLINSTALLDIR/lib' and 1362 `--with-ppl-include=PPLINSTALLDIR/include'. Likewise the 1363 `--with-cloog=CLOOGINSTALLDIR' option is shorthand for 1364 `--with-cloog-lib=CLOOGINSTALLDIR/lib' and 1365 `--with-cloog-include=CLOOGINSTALLDIR/include'. If these 1366 shorthand assumptions are not correct, you can use the explicit 1367 include and lib options directly. 1368 1369`--with-host-libstdcxx=LINKER-ARGS' 1370 If you are linking with a static copy of PPL, you can use this 1371 option to specify how the linker should find the standard C++ 1372 library used internally by PPL. Typical values of LINKER-ARGS 1373 might be `-lstdc++' or `-Wl,-Bstatic,-lstdc++,-Bdynamic -lm'. If 1374 you are linking with a shared copy of PPL, you probably do not 1375 need this option; shared library dependencies will cause the 1376 linker to search for the standard C++ library automatically. 1377 1378`--with-stage1-ldflags=FLAGS' 1379 This option may be used to set linker flags to be used when linking 1380 stage 1 of GCC. These are also used when linking GCC if 1381 configured with `--disable-bootstrap'. By default no special 1382 flags are used. 1383 1384`--with-stage1-libs=LIBS' 1385 This option may be used to set libraries to be used when linking 1386 stage 1 of GCC. These are also used when linking GCC if 1387 configured with `--disable-bootstrap'. The default is the 1388 argument to `--with-host-libstdcxx', if specified. 1389 1390`--with-boot-ldflags=FLAGS' 1391 This option may be used to set linker flags to be used when linking 1392 stage 2 and later when bootstrapping GCC. By default no special 1393 flags are used. 1394 1395`--with-boot-libs=LIBS' 1396 This option may be used to set libraries to be used when linking 1397 stage 2 and later when bootstrapping GCC. The default is the 1398 argument to `--with-host-libstdcxx', if specified. 1399 1400`--with-debug-prefix-map=MAP' 1401 Convert source directory names using `-fdebug-prefix-map' when 1402 building runtime libraries. `MAP' is a space-separated list of 1403 maps of the form `OLD=NEW'. 1404 1405`--enable-linker-build-id' 1406 Tells GCC to pass `--build-id' option to the linker for all final 1407 links (links performed without the `-r' or `--relocatable' 1408 option), if the linker supports it. If you specify 1409 `--enable-linker-build-id', but your linker does not support 1410 `--build-id' option, a warning is issued and the 1411 `--enable-linker-build-id' option is ignored. The default is off. 1412 1413`--enable-gnu-unique-object' 1414`--disable-gnu-unique-object' 1415 Tells GCC to use the gnu_unique_object relocation for C++ template 1416 static data members and inline function local statics. Enabled by 1417 default for a native toolchain with an assembler that accepts it 1418 and GLIBC 2.11 or above, otherwise disabled. 1419 1420`--enable-lto' 1421 Enable support for link-time optimization (LTO). This is enabled 1422 by default if a working libelf implementation is found (see 1423 `--with-libelf'). 1424 1425`--with-libelf=PATHNAME' 1426`--with-libelf-include=PATHNAME' 1427`--with-libelf-lib=PATHNAME' 1428 If you do not have libelf installed in a standard location and you 1429 want to enable support for link-time optimization (LTO), you can 1430 explicitly specify the directory where libelf is installed 1431 (`--with-libelf=LIBELFINSTALLDIR'). The 1432 `--with-libelf=LIBELFINSTALLDIR' option is shorthand for 1433 `--with-libelf-include=LIBELFINSTALLDIR/include' 1434 `--with-libelf-lib=LIBELFINSTALLDIR/lib'. 1435 1436`--enable-gold' 1437 Enable support for using `gold' as the linker. If gold support is 1438 enabled together with `--enable-lto', an additional directory 1439 `lto-plugin' will be built. The code in this directory is a 1440 plugin for gold that allows the link-time optimizer to extract 1441 object files with LTO information out of library archives. See 1442 `-flto' and `-fwhopr' for details. 1443 1444Cross-Compiler-Specific Options 1445------------------------------- 1446 1447The following options only apply to building cross compilers. 1448 1449`--with-sysroot' 1450`--with-sysroot=DIR' 1451 Tells GCC to consider DIR as the root of a tree that contains a 1452 (subset of) the root filesystem of the target operating system. 1453 Target system headers, libraries and run-time object files will be 1454 searched in there. More specifically, this acts as if 1455 `--sysroot=DIR' was added to the default options of the built 1456 compiler. The specified directory is not copied into the install 1457 tree, unlike the options `--with-headers' and `--with-libs' that 1458 this option obsoletes. The default value, in case 1459 `--with-sysroot' is not given an argument, is 1460 `${gcc_tooldir}/sys-root'. If the specified directory is a 1461 subdirectory of `${exec_prefix}', then it will be found relative to 1462 the GCC binaries if the installation tree is moved. 1463 1464 This option affects the system root for the compiler used to build 1465 target libraries (which runs on the build system) and the compiler 1466 newly installed with `make install'; it does not affect the 1467 compiler which is used to build GCC itself. 1468 1469`--with-build-sysroot' 1470`--with-build-sysroot=DIR' 1471 Tells GCC to consider DIR as the system root (see 1472 `--with-sysroot') while building target libraries, instead of the 1473 directory specified with `--with-sysroot'. This option is only 1474 useful when you are already using `--with-sysroot'. You can use 1475 `--with-build-sysroot' when you are configuring with `--prefix' 1476 set to a directory that is different from the one in which you are 1477 installing GCC and your target libraries. 1478 1479 This option affects the system root for the compiler used to build 1480 target libraries (which runs on the build system); it does not 1481 affect the compiler which is used to build GCC itself. 1482 1483`--with-headers' 1484`--with-headers=DIR' 1485 Deprecated in favor of `--with-sysroot'. Specifies that target 1486 headers are available when building a cross compiler. The DIR 1487 argument specifies a directory which has the target include files. 1488 These include files will be copied into the `gcc' install 1489 directory. _This option with the DIR argument is required_ when 1490 building a cross compiler, if `PREFIX/TARGET/sys-include' doesn't 1491 pre-exist. If `PREFIX/TARGET/sys-include' does pre-exist, the DIR 1492 argument may be omitted. `fixincludes' will be run on these files 1493 to make them compatible with GCC. 1494 1495`--without-headers' 1496 Tells GCC not use any target headers from a libc when building a 1497 cross compiler. When crossing to GNU/Linux, you need the headers 1498 so GCC can build the exception handling for libgcc. 1499 1500`--with-libs' 1501`--with-libs="DIR1 DIR2 ... DIRN"' 1502 Deprecated in favor of `--with-sysroot'. Specifies a list of 1503 directories which contain the target runtime libraries. These 1504 libraries will be copied into the `gcc' install directory. If the 1505 directory list is omitted, this option has no effect. 1506 1507`--with-newlib' 1508 Specifies that `newlib' is being used as the target C library. 1509 This causes `__eprintf' to be omitted from `libgcc.a' on the 1510 assumption that it will be provided by `newlib'. 1511 1512`--with-build-time-tools=DIR' 1513 Specifies where to find the set of target tools (assembler, 1514 linker, etc.) that will be used while building GCC itself. This 1515 option can be useful if the directory layouts are different 1516 between the system you are building GCC on, and the system where 1517 you will deploy it. 1518 1519 For example, on an `ia64-hp-hpux' system, you may have the GNU 1520 assembler and linker in `/usr/bin', and the native tools in a 1521 different path, and build a toolchain that expects to find the 1522 native tools in `/usr/bin'. 1523 1524 When you use this option, you should ensure that DIR includes 1525 `ar', `as', `ld', `nm', `ranlib' and `strip' if necessary, and 1526 possibly `objdump'. Otherwise, GCC may use an inconsistent set of 1527 tools. 1528 1529Java-Specific Options 1530--------------------- 1531 1532The following option applies to the build of the Java front end. 1533 1534`--disable-libgcj' 1535 Specify that the run-time libraries used by GCJ should not be 1536 built. This is useful in case you intend to use GCJ with some 1537 other run-time, or you're going to install it separately, or it 1538 just happens not to build on your particular machine. In general, 1539 if the Java front end is enabled, the GCJ libraries will be 1540 enabled too, unless they're known to not work on the target 1541 platform. If GCJ is enabled but `libgcj' isn't built, you may 1542 need to port it; in this case, before modifying the top-level 1543 `configure.in' so that `libgcj' is enabled by default on this 1544 platform, you may use `--enable-libgcj' to override the default. 1545 1546 1547 The following options apply to building `libgcj'. 1548 1549General Options 1550............... 1551 1552`--enable-java-maintainer-mode' 1553 By default the `libjava' build will not attempt to compile the 1554 `.java' source files to `.class'. Instead, it will use the 1555 `.class' files from the source tree. If you use this option you 1556 must have executables named `ecj1' and `gjavah' in your path for 1557 use by the build. You must use this option if you intend to 1558 modify any `.java' files in `libjava'. 1559 1560`--with-java-home=DIRNAME' 1561 This `libjava' option overrides the default value of the 1562 `java.home' system property. It is also used to set 1563 `sun.boot.class.path' to `DIRNAME/lib/rt.jar'. By default 1564 `java.home' is set to `PREFIX' and `sun.boot.class.path' to 1565 `DATADIR/java/libgcj-VERSION.jar'. 1566 1567`--with-ecj-jar=FILENAME' 1568 This option can be used to specify the location of an external jar 1569 file containing the Eclipse Java compiler. A specially modified 1570 version of this compiler is used by `gcj' to parse `.java' source 1571 files. If this option is given, the `libjava' build will create 1572 and install an `ecj1' executable which uses this jar file at 1573 runtime. 1574 1575 If this option is not given, but an `ecj.jar' file is found in the 1576 topmost source tree at configure time, then the `libgcj' build 1577 will create and install `ecj1', and will also install the 1578 discovered `ecj.jar' into a suitable place in the install tree. 1579 1580 If `ecj1' is not installed, then the user will have to supply one 1581 on his path in order for `gcj' to properly parse `.java' source 1582 files. A suitable jar is available from 1583 `ftp://sourceware.org/pub/java/'. 1584 1585`--disable-getenv-properties' 1586 Don't set system properties from `GCJ_PROPERTIES'. 1587 1588`--enable-hash-synchronization' 1589 Use a global hash table for monitor locks. Ordinarily, `libgcj''s 1590 `configure' script automatically makes the correct choice for this 1591 option for your platform. Only use this if you know you need the 1592 library to be configured differently. 1593 1594`--enable-interpreter' 1595 Enable the Java interpreter. The interpreter is automatically 1596 enabled by default on all platforms that support it. This option 1597 is really only useful if you want to disable the interpreter 1598 (using `--disable-interpreter'). 1599 1600`--disable-java-net' 1601 Disable java.net. This disables the native part of java.net only, 1602 using non-functional stubs for native method implementations. 1603 1604`--disable-jvmpi' 1605 Disable JVMPI support. 1606 1607`--disable-libgcj-bc' 1608 Disable BC ABI compilation of certain parts of libgcj. By default, 1609 some portions of libgcj are compiled with `-findirect-dispatch' 1610 and `-fno-indirect-classes', allowing them to be overridden at 1611 run-time. 1612 1613 If `--disable-libgcj-bc' is specified, libgcj is built without 1614 these options. This allows the compile-time linker to resolve 1615 dependencies when statically linking to libgcj. However it makes 1616 it impossible to override the affected portions of libgcj at 1617 run-time. 1618 1619`--enable-reduced-reflection' 1620 Build most of libgcj with `-freduced-reflection'. This reduces 1621 the size of libgcj at the expense of not being able to do accurate 1622 reflection on the classes it contains. This option is safe if you 1623 know that code using libgcj will never use reflection on the 1624 standard runtime classes in libgcj (including using serialization, 1625 RMI or CORBA). 1626 1627`--with-ecos' 1628 Enable runtime eCos target support. 1629 1630`--without-libffi' 1631 Don't use `libffi'. This will disable the interpreter and JNI 1632 support as well, as these require `libffi' to work. 1633 1634`--enable-libgcj-debug' 1635 Enable runtime debugging code. 1636 1637`--enable-libgcj-multifile' 1638 If specified, causes all `.java' source files to be compiled into 1639 `.class' files in one invocation of `gcj'. This can speed up 1640 build time, but is more resource-intensive. If this option is 1641 unspecified or disabled, `gcj' is invoked once for each `.java' 1642 file to compile into a `.class' file. 1643 1644`--with-libiconv-prefix=DIR' 1645 Search for libiconv in `DIR/include' and `DIR/lib'. 1646 1647`--enable-sjlj-exceptions' 1648 Force use of the `setjmp'/`longjmp'-based scheme for exceptions. 1649 `configure' ordinarily picks the correct value based on the 1650 platform. Only use this option if you are sure you need a 1651 different setting. 1652 1653`--with-system-zlib' 1654 Use installed `zlib' rather than that included with GCC. 1655 1656`--with-win32-nlsapi=ansi, unicows or unicode' 1657 Indicates how MinGW `libgcj' translates between UNICODE characters 1658 and the Win32 API. 1659 1660`--enable-java-home' 1661 If enabled, this creates a JPackage compatible SDK environment 1662 during install. Note that if -enable-java-home is used, 1663 -with-arch-directory=ARCH must also be specified. 1664 1665`--with-arch-directory=ARCH' 1666 Specifies the name to use for the `jre/lib/ARCH' directory in the 1667 SDK environment created when -enable-java-home is passed. Typical 1668 names for this directory include i386, amd64, ia64, etc. 1669 1670`--with-os-directory=DIR' 1671 Specifies the OS directory for the SDK include directory. This is 1672 set to auto detect, and is typically 'linux'. 1673 1674`--with-origin-name=NAME' 1675 Specifies the JPackage origin name. This defaults to the 'gcj' in 1676 java-1.5.0-gcj. 1677 1678`--with-arch-suffix=SUFFIX' 1679 Specifies the suffix for the sdk directory. Defaults to the empty 1680 string. Examples include '.x86_64' in 1681 'java-1.5.0-gcj-1.5.0.0.x86_64'. 1682 1683`--with-jvm-root-dir=DIR' 1684 Specifies where to install the SDK. Default is $(prefix)/lib/jvm. 1685 1686`--with-jvm-jar-dir=DIR' 1687 Specifies where to install jars. Default is 1688 $(prefix)/lib/jvm-exports. 1689 1690`--with-python-dir=DIR' 1691 Specifies where to install the Python modules used for 1692 aot-compile. DIR should not include the prefix used in 1693 installation. For example, if the Python modules are to be 1694 installed in /usr/lib/python2.5/site-packages, then 1695 -with-python-dir=/lib/python2.5/site-packages should be passed. If 1696 this is not specified, then the Python modules are installed in 1697 $(prefix)/share/python. 1698 1699`--enable-aot-compile-rpm' 1700 Adds aot-compile-rpm to the list of installed scripts. 1701 1702`--enable-browser-plugin' 1703 Build the gcjwebplugin web browser plugin. 1704 1705 `ansi' 1706 Use the single-byte `char' and the Win32 A functions natively, 1707 translating to and from UNICODE when using these functions. 1708 If unspecified, this is the default. 1709 1710 `unicows' 1711 Use the `WCHAR' and Win32 W functions natively. Adds 1712 `-lunicows' to `libgcj.spec' to link with `libunicows'. 1713 `unicows.dll' needs to be deployed on Microsoft Windows 9X 1714 machines running built executables. `libunicows.a', an 1715 open-source import library around Microsoft's `unicows.dll', 1716 is obtained from `http://libunicows.sourceforge.net/', which 1717 also gives details on getting `unicows.dll' from Microsoft. 1718 1719 `unicode' 1720 Use the `WCHAR' and Win32 W functions natively. Does _not_ 1721 add `-lunicows' to `libgcj.spec'. The built executables will 1722 only run on Microsoft Windows NT and above. 1723 1724AWT-Specific Options 1725.................... 1726 1727`--with-x' 1728 Use the X Window System. 1729 1730`--enable-java-awt=PEER(S)' 1731 Specifies the AWT peer library or libraries to build alongside 1732 `libgcj'. If this option is unspecified or disabled, AWT will be 1733 non-functional. Current valid values are `gtk' and `xlib'. 1734 Multiple libraries should be separated by a comma (i.e. 1735 `--enable-java-awt=gtk,xlib'). 1736 1737`--enable-gtk-cairo' 1738 Build the cairo Graphics2D implementation on GTK. 1739 1740`--enable-java-gc=TYPE' 1741 Choose garbage collector. Defaults to `boehm' if unspecified. 1742 1743`--disable-gtktest' 1744 Do not try to compile and run a test GTK+ program. 1745 1746`--disable-glibtest' 1747 Do not try to compile and run a test GLIB program. 1748 1749`--with-libart-prefix=PFX' 1750 Prefix where libart is installed (optional). 1751 1752`--with-libart-exec-prefix=PFX' 1753 Exec prefix where libart is installed (optional). 1754 1755`--disable-libarttest' 1756 Do not try to compile and run a test libart program. 1757 1758 1759 1760File: gccinstall.info, Node: Building, Next: Testing, Prev: Configuration, Up: Installing GCC 1761 17625 Building 1763********** 1764 1765 Now that GCC is configured, you are ready to build the compiler and 1766runtime libraries. 1767 1768 Some commands executed when making the compiler may fail (return a 1769nonzero status) and be ignored by `make'. These failures, which are 1770often due to files that were not found, are expected, and can safely be 1771ignored. 1772 1773 It is normal to have compiler warnings when compiling certain files. 1774Unless you are a GCC developer, you can generally ignore these warnings 1775unless they cause compilation to fail. Developers should attempt to fix 1776any warnings encountered, however they can temporarily continue past 1777warnings-as-errors by specifying the configure flag `--disable-werror'. 1778 1779 On certain old systems, defining certain environment variables such 1780as `CC' can interfere with the functioning of `make'. 1781 1782 If you encounter seemingly strange errors when trying to build the 1783compiler in a directory other than the source directory, it could be 1784because you have previously configured the compiler in the source 1785directory. Make sure you have done all the necessary preparations. 1786 1787 If you build GCC on a BSD system using a directory stored in an old 1788System V file system, problems may occur in running `fixincludes' if the 1789System V file system doesn't support symbolic links. These problems 1790result in a failure to fix the declaration of `size_t' in 1791`sys/types.h'. If you find that `size_t' is a signed type and that 1792type mismatches occur, this could be the cause. 1793 1794 The solution is not to use such a directory for building GCC. 1795 1796 Similarly, when building from SVN or snapshots, or if you modify 1797`*.l' files, you need the Flex lexical analyzer generator installed. 1798If you do not modify `*.l' files, releases contain the Flex-generated 1799files and you do not need Flex installed to build them. There is still 1800one Flex-based lexical analyzer (part of the build machinery, not of 1801GCC itself) that is used even if you only build the C front end. 1802 1803 When building from SVN or snapshots, or if you modify Texinfo 1804documentation, you need version 4.7 or later of Texinfo installed if you 1805want Info documentation to be regenerated. Releases contain Info 1806documentation pre-built for the unmodified documentation in the release. 1807 18085.1 Building a native compiler 1809============================== 1810 1811For a native build, the default configuration is to perform a 3-stage 1812bootstrap of the compiler when `make' is invoked. This will build the 1813entire GCC system and ensure that it compiles itself correctly. It can 1814be disabled with the `--disable-bootstrap' parameter to `configure', 1815but bootstrapping is suggested because the compiler will be tested more 1816completely and could also have better performance. 1817 1818 The bootstrapping process will complete the following steps: 1819 1820 * Build tools necessary to build the compiler. 1821 1822 * Perform a 3-stage bootstrap of the compiler. This includes 1823 building three times the target tools for use by the compiler such 1824 as binutils (bfd, binutils, gas, gprof, ld, and opcodes) if they 1825 have been individually linked or moved into the top level GCC 1826 source tree before configuring. 1827 1828 * Perform a comparison test of the stage2 and stage3 compilers. 1829 1830 * Build runtime libraries using the stage3 compiler from the 1831 previous step. 1832 1833 1834 If you are short on disk space you might consider `make 1835bootstrap-lean' instead. The sequence of compilation is the same 1836described above, but object files from the stage1 and stage2 of the 18373-stage bootstrap of the compiler are deleted as soon as they are no 1838longer needed. 1839 1840 If you wish to use non-default GCC flags when compiling the stage2 1841and stage3 compilers, set `BOOT_CFLAGS' on the command line when doing 1842`make'. For example, if you want to save additional space during the 1843bootstrap and in the final installation as well, you can build the 1844compiler binaries without debugging information as in the following 1845example. This will save roughly 40% of disk space both for the 1846bootstrap and the final installation. (Libraries will still contain 1847debugging information.) 1848 1849 make BOOT_CFLAGS='-O' bootstrap 1850 1851 You can place non-default optimization flags into `BOOT_CFLAGS'; they 1852are less well tested here than the default of `-g -O2', but should 1853still work. In a few cases, you may find that you need to specify 1854special flags such as `-msoft-float' here to complete the bootstrap; or, 1855if the native compiler miscompiles the stage1 compiler, you may need to 1856work around this, by choosing `BOOT_CFLAGS' to avoid the parts of the 1857stage1 compiler that were miscompiled, or by using `make bootstrap4' to 1858increase the number of stages of bootstrap. 1859 1860 `BOOT_CFLAGS' does not apply to bootstrapped target libraries. 1861Since these are always compiled with the compiler currently being 1862bootstrapped, you can use `CFLAGS_FOR_TARGET' to modify their 1863compilation flags, as for non-bootstrapped target libraries. Again, if 1864the native compiler miscompiles the stage1 compiler, you may need to 1865work around this by avoiding non-working parts of the stage1 compiler. 1866Use `STAGE1_TFLAGS' to this end. 1867 1868 If you used the flag `--enable-languages=...' to restrict the 1869compilers to be built, only those you've actually enabled will be 1870built. This will of course only build those runtime libraries, for 1871which the particular compiler has been built. Please note, that 1872re-defining `LANGUAGES' when calling `make' *does not* work anymore! 1873 1874 If the comparison of stage2 and stage3 fails, this normally indicates 1875that the stage2 compiler has compiled GCC incorrectly, and is therefore 1876a potentially serious bug which you should investigate and report. (On 1877a few systems, meaningful comparison of object files is impossible; they 1878always appear "different". If you encounter this problem, you will 1879need to disable comparison in the `Makefile'.) 1880 1881 If you do not want to bootstrap your compiler, you can configure with 1882`--disable-bootstrap'. In particular cases, you may want to bootstrap 1883your compiler even if the target system is not the same as the one you 1884are building on: for example, you could build a 1885`powerpc-unknown-linux-gnu' toolchain on a 1886`powerpc64-unknown-linux-gnu' host. In this case, pass 1887`--enable-bootstrap' to the configure script. 1888 1889 `BUILD_CONFIG' can be used to bring in additional customization to 1890the build. It can be set to a whitespace-separated list of names. For 1891each such `NAME', top-level `config/`NAME'.mk' will be included by the 1892top-level `Makefile', bringing in any settings it contains. The 1893default `BUILD_CONFIG' can be set using the configure option 1894`--with-build-config=`NAME'...'. Some examples of supported build 1895configurations are: 1896 1897`bootstrap-O1' 1898 Removes any `-O'-started option from `BOOT_CFLAGS', and adds `-O1' 1899 to it. `BUILD_CONFIG=bootstrap-O1' is equivalent to 1900 `BOOT_CFLAGS='-g -O1''. 1901 1902`bootstrap-O3' 1903 Analogous to `bootstrap-O1'. 1904 1905`bootstrap-debug' 1906 Verifies that the compiler generates the same executable code, 1907 whether or not it is asked to emit debug information. To this 1908 end, this option builds stage2 host programs without debug 1909 information, and uses `contrib/compare-debug' to compare them with 1910 the stripped stage3 object files. If `BOOT_CFLAGS' is overridden 1911 so as to not enable debug information, stage2 will have it, and 1912 stage3 won't. This option is enabled by default when GCC 1913 bootstrapping is enabled, if `strip' can turn object files 1914 compiled with and without debug info into identical object files. 1915 In addition to better test coverage, this option makes default 1916 bootstraps faster and leaner. 1917 1918`bootstrap-debug-big' 1919 Rather than comparing stripped object files, as in 1920 `bootstrap-debug', this option saves internal compiler dumps 1921 during stage2 and stage3 and compares them as well, which helps 1922 catch additional potential problems, but at a great cost in terms 1923 of disk space. It can be specified in addition to 1924 `bootstrap-debug'. 1925 1926`bootstrap-debug-lean' 1927 This option saves disk space compared with `bootstrap-debug-big', 1928 but at the expense of some recompilation. Instead of saving the 1929 dumps of stage2 and stage3 until the final compare, it uses 1930 `-fcompare-debug' to generate, compare and remove the dumps during 1931 stage3, repeating the compilation that already took place in 1932 stage2, whose dumps were not saved. 1933 1934`bootstrap-debug-lib' 1935 This option tests executable code invariance over debug information 1936 generation on target libraries, just like `bootstrap-debug-lean' 1937 tests it on host programs. It builds stage3 libraries with 1938 `-fcompare-debug', and it can be used along with any of the 1939 `bootstrap-debug' options above. 1940 1941 There aren't `-lean' or `-big' counterparts to this option because 1942 most libraries are only build in stage3, so bootstrap compares 1943 would not get significant coverage. Moreover, the few libraries 1944 built in stage2 are used in stage3 host programs, so we wouldn't 1945 want to compile stage2 libraries with different options for 1946 comparison purposes. 1947 1948`bootstrap-debug-ckovw' 1949 Arranges for error messages to be issued if the compiler built on 1950 any stage is run without the option `-fcompare-debug'. This is 1951 useful to verify the full `-fcompare-debug' testing coverage. It 1952 must be used along with `bootstrap-debug-lean' and 1953 `bootstrap-debug-lib'. 1954 1955`bootstrap-time' 1956 Arranges for the run time of each program started by the GCC 1957 driver, built in any stage, to be logged to `time.log', in the top 1958 level of the build tree. 1959 1960 19615.2 Building a cross compiler 1962============================= 1963 1964When building a cross compiler, it is not generally possible to do a 19653-stage bootstrap of the compiler. This makes for an interesting 1966problem as parts of GCC can only be built with GCC. 1967 1968 To build a cross compiler, we recommend first building and 1969installing a native compiler. You can then use the native GCC compiler 1970to build the cross compiler. The installed native compiler needs to be 1971GCC version 2.95 or later. 1972 1973 If the cross compiler is to be built with support for the Java 1974programming language and the ability to compile .java source files is 1975desired, the installed native compiler used to build the cross compiler 1976needs to be the same GCC version as the cross compiler. In addition 1977the cross compiler needs to be configured with `--with-ecj-jar=...'. 1978 1979 Assuming you have already installed a native copy of GCC and 1980configured your cross compiler, issue the command `make', which 1981performs the following steps: 1982 1983 * Build host tools necessary to build the compiler. 1984 1985 * Build target tools for use by the compiler such as binutils (bfd, 1986 binutils, gas, gprof, ld, and opcodes) if they have been 1987 individually linked or moved into the top level GCC source tree 1988 before configuring. 1989 1990 * Build the compiler (single stage only). 1991 1992 * Build runtime libraries using the compiler from the previous step. 1993 1994 Note that if an error occurs in any step the make process will exit. 1995 1996 If you are not building GNU binutils in the same source tree as GCC, 1997you will need a cross-assembler and cross-linker installed before 1998configuring GCC. Put them in the directory `PREFIX/TARGET/bin'. Here 1999is a table of the tools you should put in this directory: 2000 2001`as' 2002 This should be the cross-assembler. 2003 2004`ld' 2005 This should be the cross-linker. 2006 2007`ar' 2008 This should be the cross-archiver: a program which can manipulate 2009 archive files (linker libraries) in the target machine's format. 2010 2011`ranlib' 2012 This should be a program to construct a symbol table in an archive 2013 file. 2014 2015 The installation of GCC will find these programs in that directory, 2016and copy or link them to the proper place to for the cross-compiler to 2017find them when run later. 2018 2019 The easiest way to provide these files is to build the Binutils 2020package. Configure it with the same `--host' and `--target' options 2021that you use for configuring GCC, then build and install them. They 2022install their executables automatically into the proper directory. 2023Alas, they do not support all the targets that GCC supports. 2024 2025 If you are not building a C library in the same source tree as GCC, 2026you should also provide the target libraries and headers before 2027configuring GCC, specifying the directories with `--with-sysroot' or 2028`--with-headers' and `--with-libs'. Many targets also require "start 2029files" such as `crt0.o' and `crtn.o' which are linked into each 2030executable. There may be several alternatives for `crt0.o', for use 2031with profiling or other compilation options. Check your target's 2032definition of `STARTFILE_SPEC' to find out what start files it uses. 2033 20345.3 Building in parallel 2035======================== 2036 2037GNU Make 3.80 and above, which is necessary to build GCC, support 2038building in parallel. To activate this, you can use `make -j 2' 2039instead of `make'. You can also specify a bigger number, and in most 2040cases using a value greater than the number of processors in your 2041machine will result in fewer and shorter I/O latency hits, thus 2042improving overall throughput; this is especially true for slow drives 2043and network filesystems. 2044 20455.4 Building the Ada compiler 2046============================= 2047 2048In order to build GNAT, the Ada compiler, you need a working GNAT 2049compiler (GCC version 3.4 or later). This includes GNAT tools such as 2050`gnatmake' and `gnatlink', since the Ada front end is written in Ada and 2051uses some GNAT-specific extensions. 2052 2053 In order to build a cross compiler, it is suggested to install the 2054new compiler as native first, and then use it to build the cross 2055compiler. 2056 2057 `configure' does not test whether the GNAT installation works and 2058has a sufficiently recent version; if too old a GNAT version is 2059installed, the build will fail unless `--enable-languages' is used to 2060disable building the Ada front end. 2061 2062 `ADA_INCLUDE_PATH' and `ADA_OBJECT_PATH' environment variables must 2063not be set when building the Ada compiler, the Ada tools, or the Ada 2064runtime libraries. You can check that your build environment is clean 2065by verifying that `gnatls -v' lists only one explicit path in each 2066section. 2067 20685.5 Building with profile feedback 2069================================== 2070 2071It is possible to use profile feedback to optimize the compiler itself. 2072This should result in a faster compiler binary. Experiments done on 2073x86 using gcc 3.3 showed approximately 7 percent speedup on compiling C 2074programs. To bootstrap the compiler with profile feedback, use `make 2075profiledbootstrap'. 2076 2077 When `make profiledbootstrap' is run, it will first build a `stage1' 2078compiler. This compiler is used to build a `stageprofile' compiler 2079instrumented to collect execution counts of instruction and branch 2080probabilities. Then runtime libraries are compiled with profile 2081collected. Finally a `stagefeedback' compiler is built using the 2082information collected. 2083 2084 Unlike standard bootstrap, several additional restrictions apply. 2085The compiler used to build `stage1' needs to support a 64-bit integral 2086type. It is recommended to only use GCC for this. Also parallel make 2087is currently not supported since collisions in profile collecting may 2088occur. 2089 2090 2091File: gccinstall.info, Node: Testing, Next: Final install, Prev: Building, Up: Installing GCC 2092 20936 Installing GCC: Testing 2094************************* 2095 2096 Before you install GCC, we encourage you to run the testsuites and to 2097compare your results with results from a similar configuration that have 2098been submitted to the gcc-testresults mailing list. Some of these 2099archived results are linked from the build status lists at 2100`http://gcc.gnu.org/buildstat.html', although not everyone who reports 2101a successful build runs the testsuites and submits the results. This 2102step is optional and may require you to download additional software, 2103but it can give you confidence in your new GCC installation or point out 2104problems before you install and start using your new GCC. 2105 2106 First, you must have downloaded the testsuites. These are part of 2107the full distribution, but if you downloaded the "core" compiler plus 2108any front ends, you must download the testsuites separately. 2109 2110 Second, you must have the testing tools installed. This includes 2111DejaGnu, Tcl, and Expect; the DejaGnu site has links to these. 2112 2113 If the directories where `runtest' and `expect' were installed are 2114not in the `PATH', you may need to set the following environment 2115variables appropriately, as in the following example (which assumes 2116that DejaGnu has been installed under `/usr/local'): 2117 2118 TCL_LIBRARY = /usr/local/share/tcl8.0 2119 DEJAGNULIBS = /usr/local/share/dejagnu 2120 2121 (On systems such as Cygwin, these paths are required to be actual 2122paths, not mounts or links; presumably this is due to some lack of 2123portability in the DejaGnu code.) 2124 2125 Finally, you can run the testsuite (which may take a long time): 2126 cd OBJDIR; make -k check 2127 2128 This will test various components of GCC, such as compiler front 2129ends and runtime libraries. While running the testsuite, DejaGnu might 2130emit some harmless messages resembling `WARNING: Couldn't find the 2131global config file.' or `WARNING: Couldn't find tool init file' that 2132can be ignored. 2133 2134 If you are testing a cross-compiler, you may want to run the 2135testsuite on a simulator as described at 2136`http://gcc.gnu.org/simtest-howto.html'. 2137 21386.1 How can you run the testsuite on selected tests? 2139==================================================== 2140 2141In order to run sets of tests selectively, there are targets `make 2142check-gcc' and `make check-g++' in the `gcc' subdirectory of the object 2143directory. You can also just run `make check' in a subdirectory of the 2144object directory. 2145 2146 A more selective way to just run all `gcc' execute tests in the 2147testsuite is to use 2148 2149 make check-gcc RUNTESTFLAGS="execute.exp OTHER-OPTIONS" 2150 2151 Likewise, in order to run only the `g++' "old-deja" tests in the 2152testsuite with filenames matching `9805*', you would use 2153 2154 make check-g++ RUNTESTFLAGS="old-deja.exp=9805* OTHER-OPTIONS" 2155 2156 The `*.exp' files are located in the testsuite directories of the GCC 2157source, the most important ones being `compile.exp', `execute.exp', 2158`dg.exp' and `old-deja.exp'. To get a list of the possible `*.exp' 2159files, pipe the output of `make check' into a file and look at the 2160`Running ... .exp' lines. 2161 21626.2 Passing options and running multiple testsuites 2163=================================================== 2164 2165You can pass multiple options to the testsuite using the 2166`--target_board' option of DejaGNU, either passed as part of 2167`RUNTESTFLAGS', or directly to `runtest' if you prefer to work outside 2168the makefiles. For example, 2169 2170 make check-g++ RUNTESTFLAGS="--target_board=unix/-O3/-fmerge-constants" 2171 2172 will run the standard `g++' testsuites ("unix" is the target name 2173for a standard native testsuite situation), passing `-O3 2174-fmerge-constants' to the compiler on every test, i.e., slashes 2175separate options. 2176 2177 You can run the testsuites multiple times using combinations of 2178options with a syntax similar to the brace expansion of popular shells: 2179 2180 ..."--target_board=arm-sim\{-mhard-float,-msoft-float\}\{-O1,-O2,-O3,\}" 2181 2182 (Note the empty option caused by the trailing comma in the final 2183group.) The following will run each testsuite eight times using the 2184`arm-sim' target, as if you had specified all possible combinations 2185yourself: 2186 2187 --target_board=arm-sim/-mhard-float/-O1 2188 --target_board=arm-sim/-mhard-float/-O2 2189 --target_board=arm-sim/-mhard-float/-O3 2190 --target_board=arm-sim/-mhard-float 2191 --target_board=arm-sim/-msoft-float/-O1 2192 --target_board=arm-sim/-msoft-float/-O2 2193 --target_board=arm-sim/-msoft-float/-O3 2194 --target_board=arm-sim/-msoft-float 2195 2196 They can be combined as many times as you wish, in arbitrary ways. 2197This list: 2198 2199 ..."--target_board=unix/-Wextra\{-O3,-fno-strength\}\{-fomit-frame,\}" 2200 2201 will generate four combinations, all involving `-Wextra'. 2202 2203 The disadvantage to this method is that the testsuites are run in 2204serial, which is a waste on multiprocessor systems. For users with GNU 2205Make and a shell which performs brace expansion, you can run the 2206testsuites in parallel by having the shell perform the combinations and 2207`make' do the parallel runs. Instead of using `--target_board', use a 2208special makefile target: 2209 2210 make -jN check-TESTSUITE//TEST-TARGET/OPTION1/OPTION2/... 2211 2212 For example, 2213 2214 make -j3 check-gcc//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu} 2215 2216 will run three concurrent "make-gcc" testsuites, eventually testing 2217all ten combinations as described above. Note that this is currently 2218only supported in the `gcc' subdirectory. (To see how this works, try 2219typing `echo' before the example given here.) 2220 22216.3 Additional testing for Java Class Libraries 2222=============================================== 2223 2224The Java runtime tests can be executed via `make check' in the 2225`TARGET/libjava/testsuite' directory in the build tree. 2226 2227 The Mauve Project provides a suite of tests for the Java Class 2228Libraries. This suite can be run as part of libgcj testing by placing 2229the Mauve tree within the libjava testsuite at 2230`libjava/testsuite/libjava.mauve/mauve', or by specifying the location 2231of that tree when invoking `make', as in `make MAUVEDIR=~/mauve check'. 2232 22336.4 How to interpret test results 2234================================= 2235 2236The result of running the testsuite are various `*.sum' and `*.log' 2237files in the testsuite subdirectories. The `*.log' files contain a 2238detailed log of the compiler invocations and the corresponding results, 2239the `*.sum' files summarize the results. These summaries contain 2240status codes for all tests: 2241 2242 * PASS: the test passed as expected 2243 2244 * XPASS: the test unexpectedly passed 2245 2246 * FAIL: the test unexpectedly failed 2247 2248 * XFAIL: the test failed as expected 2249 2250 * UNSUPPORTED: the test is not supported on this platform 2251 2252 * ERROR: the testsuite detected an error 2253 2254 * WARNING: the testsuite detected a possible problem 2255 2256 It is normal for some tests to report unexpected failures. At the 2257current time the testing harness does not allow fine grained control 2258over whether or not a test is expected to fail. This problem should be 2259fixed in future releases. 2260 22616.5 Submitting test results 2262=========================== 2263 2264If you want to report the results to the GCC project, use the 2265`contrib/test_summary' shell script. Start it in the OBJDIR with 2266 2267 SRCDIR/contrib/test_summary -p your_commentary.txt \ 2268 -m gcc-testresults@gcc.gnu.org |sh 2269 2270 This script uses the `Mail' program to send the results, so make 2271sure it is in your `PATH'. The file `your_commentary.txt' is prepended 2272to the testsuite summary and should contain any special remarks you 2273have on your results or your build environment. Please do not edit the 2274testsuite result block or the subject line, as these messages may be 2275automatically processed. 2276 2277 2278File: gccinstall.info, Node: Final install, Prev: Testing, Up: Installing GCC 2279 22807 Installing GCC: Final installation 2281************************************ 2282 2283 Now that GCC has been built (and optionally tested), you can install 2284it with 2285 cd OBJDIR; make install 2286 2287 We strongly recommend to install into a target directory where there 2288is no previous version of GCC present. Also, the GNAT runtime should 2289not be stripped, as this would break certain features of the debugger 2290that depend on this debugging information (catching Ada exceptions for 2291instance). 2292 2293 That step completes the installation of GCC; user level binaries can 2294be found in `PREFIX/bin' where PREFIX is the value you specified with 2295the `--prefix' to configure (or `/usr/local' by default). (If you 2296specified `--bindir', that directory will be used instead; otherwise, 2297if you specified `--exec-prefix', `EXEC-PREFIX/bin' will be used.) 2298Headers for the C++ and Java libraries are installed in 2299`PREFIX/include'; libraries in `LIBDIR' (normally `PREFIX/lib'); 2300internal parts of the compiler in `LIBDIR/gcc' and `LIBEXECDIR/gcc'; 2301documentation in info format in `INFODIR' (normally `PREFIX/info'). 2302 2303 When installing cross-compilers, GCC's executables are not only 2304installed into `BINDIR', that is, `EXEC-PREFIX/bin', but additionally 2305into `EXEC-PREFIX/TARGET-ALIAS/bin', if that directory exists. 2306Typically, such "tooldirs" hold target-specific binutils, including 2307assembler and linker. 2308 2309 Installation into a temporary staging area or into a `chroot' jail 2310can be achieved with the command 2311 2312 make DESTDIR=PATH-TO-ROOTDIR install 2313 2314where PATH-TO-ROOTDIR is the absolute path of a directory relative to 2315which all installation paths will be interpreted. Note that the 2316directory specified by `DESTDIR' need not exist yet; it will be created 2317if necessary. 2318 2319 There is a subtle point with tooldirs and `DESTDIR': If you relocate 2320a cross-compiler installation with e.g. `DESTDIR=ROOTDIR', then the 2321directory `ROOTDIR/EXEC-PREFIX/TARGET-ALIAS/bin' will be filled with 2322duplicated GCC executables only if it already exists, it will not be 2323created otherwise. This is regarded as a feature, not as a bug, 2324because it gives slightly more control to the packagers using the 2325`DESTDIR' feature. 2326 2327 If you are bootstrapping a released version of GCC then please 2328quickly review the build status page for your release, available from 2329`http://gcc.gnu.org/buildstat.html'. If your system is not listed for 2330the version of GCC that you built, send a note to <gcc@gcc.gnu.org> 2331indicating that you successfully built and installed GCC. Include the 2332following information: 2333 2334 * Output from running `SRCDIR/config.guess'. Do not send that file 2335 itself, just the one-line output from running it. 2336 2337 * The output of `gcc -v' for your newly installed `gcc'. This tells 2338 us which version of GCC you built and the options you passed to 2339 configure. 2340 2341 * Whether you enabled all languages or a subset of them. If you 2342 used a full distribution then this information is part of the 2343 configure options in the output of `gcc -v', but if you downloaded 2344 the "core" compiler plus additional front ends then it isn't 2345 apparent which ones you built unless you tell us about it. 2346 2347 * If the build was for GNU/Linux, also include: 2348 * The distribution name and version (e.g., Red Hat 7.1 or 2349 Debian 2.2.3); this information should be available from 2350 `/etc/issue'. 2351 2352 * The version of the Linux kernel, available from `uname 2353 --version' or `uname -a'. 2354 2355 * The version of glibc you used; for RPM-based systems like Red 2356 Hat, Mandrake, and SuSE type `rpm -q glibc' to get the glibc 2357 version, and on systems like Debian and Progeny use `dpkg -l 2358 libc6'. 2359 For other systems, you can include similar information if you 2360 think it is relevant. 2361 2362 * Any other information that you think would be useful to people 2363 building GCC on the same configuration. The new entry in the 2364 build status list will include a link to the archived copy of your 2365 message. 2366 2367 We'd also like to know if the *note host/target specific 2368installation notes: Specific. didn't include your host/target 2369information or if that information is incomplete or out of date. Send 2370a note to <gcc@gcc.gnu.org> detailing how the information should be 2371changed. 2372 2373 If you find a bug, please report it following the bug reporting 2374guidelines. 2375 2376 If you want to print the GCC manuals, do `cd OBJDIR; make dvi'. You 2377will need to have `texi2dvi' (version at least 4.7) and TeX installed. 2378This creates a number of `.dvi' files in subdirectories of `OBJDIR'; 2379these may be converted for printing with programs such as `dvips'. 2380Alternately, by using `make pdf' in place of `make dvi', you can create 2381documentation in the form of `.pdf' files; this requires `texi2pdf', 2382which is included with Texinfo version 4.8 and later. You can also buy 2383printed manuals from the Free Software Foundation, though such manuals 2384may not be for the most recent version of GCC. 2385 2386 If you would like to generate online HTML documentation, do `cd 2387OBJDIR; make html' and HTML will be generated for the gcc manuals in 2388`OBJDIR/gcc/HTML'. 2389 2390 2391File: gccinstall.info, Node: Binaries, Next: Specific, Prev: Installing GCC, Up: Top 2392 23938 Installing GCC: Binaries 2394************************** 2395 2396 We are often asked about pre-compiled versions of GCC. While we 2397cannot provide these for all platforms, below you'll find links to 2398binaries for various platforms where creating them by yourself is not 2399easy due to various reasons. 2400 2401 Please note that we did not create these binaries, nor do we support 2402them. If you have any problems installing them, please contact their 2403makers. 2404 2405 * AIX: 2406 * Bull's Freeware and Shareware Archive for AIX; 2407 2408 * Hudson Valley Community College Open Source Software for IBM 2409 System p; 2410 2411 * AIX 5L and 6 Open Source Packages. 2412 2413 * DOS--DJGPP. 2414 2415 * Renesas H8/300[HS]--GNU Development Tools for the Renesas 2416 H8/300[HS] Series. 2417 2418 * HP-UX: 2419 * HP-UX Porting Center; 2420 2421 * Binaries for HP-UX 11.00 at Aachen University of Technology. 2422 2423 * SCO OpenServer/Unixware. 2424 2425 * Solaris 2 (SPARC, Intel)--Sunfreeware. 2426 2427 * SGI--SGI Freeware. 2428 2429 * Microsoft Windows: 2430 * The Cygwin project; 2431 2432 * The MinGW project. 2433 2434 * The Written Word offers binaries for AIX 4.3.3, 5.1 and 5.2, IRIX 2435 6.5, Tru64 UNIX 4.0D and 5.1, GNU/Linux (i386), HP-UX 10.20, 2436 11.00, and 11.11, and Solaris/SPARC 2.5.1, 2.6, 7, 8, 9 and 10. 2437 2438 * OpenPKG offers binaries for quite a number of platforms. 2439 2440 * The GFortran Wiki has links to GNU Fortran binaries for several 2441 platforms. 2442 2443 2444File: gccinstall.info, Node: Specific, Next: Old, Prev: Binaries, Up: Top 2445 24469 Host/target specific installation notes for GCC 2447************************************************* 2448 2449 Please read this document carefully _before_ installing the GNU 2450Compiler Collection on your machine. 2451 2452 Note that this list of install notes is _not_ a list of supported 2453hosts or targets. Not all supported hosts and targets are listed here, 2454only the ones that require host-specific or target-specific information 2455are. 2456 2457alpha*-*-* 2458========== 2459 2460This section contains general configuration information for all 2461alpha-based platforms using ELF (in particular, ignore this section for 2462DEC OSF/1, Digital UNIX and Tru64 UNIX). In addition to reading this 2463section, please read all other sections that match your target. 2464 2465 We require binutils 2.11.2 or newer. Previous binutils releases had 2466a number of problems with DWARF 2 debugging information, not the least 2467of which is incorrect linking of shared libraries. 2468 2469alpha*-dec-osf* 2470=============== 2471 2472Systems using processors that implement the DEC Alpha architecture and 2473are running the DEC/Compaq/HP Unix (DEC OSF/1, Digital UNIX, or 2474Compaq/HP Tru64 UNIX) operating system, for example the DEC Alpha AXP 2475systems. 2476 2477 As of GCC 3.2, versions before `alpha*-dec-osf4' are no longer 2478supported. (These are the versions which identify themselves as DEC 2479OSF/1.) As of GCC 4.5, support for Tru64 UNIX V4.0 and V5.0 has been 2480obsoleted, but can still be enabled by configuring with 2481`--enable-obsolete'. Support will be removed in GCC 4.6. 2482 2483 On Tru64 UNIX, virtual memory exhausted bootstrap failures may be 2484fixed by reconfiguring Kernel Virtual Memory and Swap parameters per 2485the `/usr/sbin/sys_check' Tuning Suggestions, or applying the patch in 2486`http://gcc.gnu.org/ml/gcc/2002-08/msg00822.html'. Depending on the OS 2487version used, you need a data segment size between 512 MB and 1 GB, so 2488simply use `ulimit -Sd unlimited'. 2489 2490 As of GNU binutils 2.20.1, neither GNU `as' nor GNU `ld' are 2491supported on Tru64 UNIX, so you must not configure GCC with 2492`--with-gnu-as' or `--with-gnu-ld'. 2493 2494 GCC writes a `.verstamp' directive to the assembler output file 2495unless it is built as a cross-compiler. It gets the version to use from 2496the system header file `/usr/include/stamp.h'. If you install a new 2497version of Tru64 UNIX, you should rebuild GCC to pick up the new version 2498stamp. 2499 2500 GCC now supports both the native (ECOFF) debugging format used by DBX 2501and GDB and an encapsulated STABS format for use only with GDB. See the 2502discussion of the `--with-stabs' option of `configure' above for more 2503information on these formats and how to select them. 2504 2505 There is a bug in DEC's assembler that produces incorrect line 2506numbers for ECOFF format when the `.align' directive is used. To work 2507around this problem, GCC will not emit such alignment directives while 2508writing ECOFF format debugging information even if optimization is 2509being performed. Unfortunately, this has the very undesirable 2510side-effect that code addresses when `-O' is specified are different 2511depending on whether or not `-g' is also specified. 2512 2513 To avoid this behavior, specify `-gstabs+' and use GDB instead of 2514DBX. DEC is now aware of this problem with the assembler and hopes to 2515provide a fix shortly. 2516 2517arc-*-elf 2518========= 2519 2520Argonaut ARC processor. This configuration is intended for embedded 2521systems. 2522 2523arm-*-elf 2524========= 2525 2526ARM-family processors. Subtargets that use the ELF object format 2527require GNU binutils 2.13 or newer. Such subtargets include: 2528`arm-*-freebsd', `arm-*-netbsdelf', `arm-*-*linux' and `arm-*-rtems'. 2529 2530avr 2531=== 2532 2533ATMEL AVR-family micro controllers. These are used in embedded 2534applications. There are no standard Unix configurations. *Note AVR 2535Options: (gcc)AVR Options, for the list of supported MCU types. 2536 2537 Use `configure --target=avr --enable-languages="c"' to configure GCC. 2538 2539 Further installation notes and other useful information about AVR 2540tools can also be obtained from: 2541 2542 * http://www.nongnu.org/avr/ 2543 2544 * http://www.amelek.gda.pl/avr/ 2545 2546 We _strongly_ recommend using binutils 2.13 or newer. 2547 2548 The following error: 2549 Error: register required 2550 2551 indicates that you should upgrade to a newer version of the binutils. 2552 2553Blackfin 2554======== 2555 2556The Blackfin processor, an Analog Devices DSP. *Note Blackfin Options: 2557(gcc)Blackfin Options, 2558 2559 More information, and a version of binutils with support for this 2560processor, is available at `http://blackfin.uclinux.org' 2561 2562CRIS 2563==== 2564 2565CRIS is the CPU architecture in Axis Communications ETRAX 2566system-on-a-chip series. These are used in embedded applications. 2567 2568 *Note CRIS Options: (gcc)CRIS Options, for a list of CRIS-specific 2569options. 2570 2571 There are a few different CRIS targets: 2572`cris-axis-elf' 2573 Mainly for monolithic embedded systems. Includes a multilib for 2574 the `v10' core used in `ETRAX 100 LX'. 2575 2576`cris-axis-linux-gnu' 2577 A GNU/Linux port for the CRIS architecture, currently targeting 2578 `ETRAX 100 LX' by default. 2579 2580 For `cris-axis-elf' you need binutils 2.11 or newer. For 2581`cris-axis-linux-gnu' you need binutils 2.12 or newer. 2582 2583 Pre-packaged tools can be obtained from 2584`ftp://ftp.axis.com/pub/axis/tools/cris/compiler-kit/'. More 2585information about this platform is available at 2586`http://developer.axis.com/'. 2587 2588CRX 2589=== 2590 2591The CRX CompactRISC architecture is a low-power 32-bit architecture with 2592fast context switching and architectural extensibility features. 2593 2594 *Note CRX Options: (gcc)CRX Options, 2595 2596 Use `configure --target=crx-elf --enable-languages=c,c++' to 2597configure GCC for building a CRX cross-compiler. The option 2598`--target=crx-elf' is also used to build the `newlib' C library for CRX. 2599 2600 It is also possible to build libstdc++-v3 for the CRX architecture. 2601This needs to be done in a separate step with the following configure 2602settings: `gcc/libstdc++-v3/configure --host=crx-elf --with-newlib 2603--enable-sjlj-exceptions --enable-cxx-flags='-fexceptions -frtti'' 2604 2605DOS 2606=== 2607 2608Please have a look at the binaries page. 2609 2610 You cannot install GCC by itself on MSDOS; it will not compile under 2611any MSDOS compiler except itself. You need to get the complete 2612compilation package DJGPP, which includes binaries as well as sources, 2613and includes all the necessary compilation tools and libraries. 2614 2615*-*-freebsd* 2616============ 2617 2618Support for FreeBSD 1 was discontinued in GCC 3.2. Support for FreeBSD 26192 (and any mutant a.out variants of FreeBSD 3) was discontinued in GCC 26204.0. 2621 2622 In GCC 4.5, we enabled the use of `dl_iterate_phdr' inside boehm-gc 2623on FreeBSD 7 or later. In order to better match the configuration of 2624the FreeBSD system compiler: We also enabled the check to see if libc 2625provides SSP support (which it does on FreeBSD 7), the use of 2626`dl_iterate_phdr' inside `libgcc_s.so.1' (on FreeBSD 7 or later) and 2627the use of `__cxa_atexit' by default (on FreeBSD 6 or later). 2628 2629 We support FreeBSD using the ELF file format with DWARF 2 debugging 2630for all CPU architectures. You may use `-gstabs' instead of `-g', if 2631you really want the old debugging format. There are no known issues 2632with mixing object files and libraries with different debugging 2633formats. Otherwise, this release of GCC should now match more of the 2634configuration used in the stock FreeBSD configuration of GCC. In 2635particular, `--enable-threads' is now configured by default. However, 2636as a general user, do not attempt to replace the system compiler with 2637this release. Known to bootstrap and check with good results on 2638FreeBSD 7.2-STABLE. In the past, known to bootstrap and check with 2639good results on FreeBSD 3.0, 3.4, 4.0, 4.2, 4.3, 4.4, 4.5, 4.8, 4.9 and 26405-CURRENT. 2641 2642 The version of binutils installed in `/usr/bin' probably works with 2643this release of GCC. Bootstrapping against the latest GNU binutils 2644and/or the version found in `/usr/ports/devel/binutils' has been known 2645to enable additional features and improve overall testsuite results. 2646However, it is currently known that boehm-gc (which itself is required 2647for java) may not configure properly on FreeBSD prior to the FreeBSD 26487.0 release with GNU binutils after 2.16.1. 2649 2650h8300-hms 2651========= 2652 2653Renesas H8/300 series of processors. 2654 2655 Please have a look at the binaries page. 2656 2657 The calling convention and structure layout has changed in release 26582.6. All code must be recompiled. The calling convention now passes 2659the first three arguments in function calls in registers. Structures 2660are no longer a multiple of 2 bytes. 2661 2662hppa*-hp-hpux* 2663============== 2664 2665Support for HP-UX version 9 and older was discontinued in GCC 3.4. 2666 2667 We require using gas/binutils on all hppa platforms. Version 2.19 or 2668later is recommended. 2669 2670 It may be helpful to configure GCC with the `--with-gnu-as' and 2671`--with-as=...' options to ensure that GCC can find GAS. 2672 2673 The HP assembler should not be used with GCC. It is rarely tested 2674and may not work. It shouldn't be used with any languages other than C 2675due to its many limitations. 2676 2677 Specifically, `-g' does not work (HP-UX uses a peculiar debugging 2678format which GCC does not know about). It also inserts timestamps into 2679each object file it creates, causing the 3-stage comparison test to 2680fail during a bootstrap. You should be able to continue by saying 2681`make all-host all-target' after getting the failure from `make'. 2682 2683 Various GCC features are not supported. For example, it does not 2684support weak symbols or alias definitions. As a result, explicit 2685template instantiations are required when using C++. This makes it 2686difficult if not impossible to build many C++ applications. 2687 2688 There are two default scheduling models for instructions. These are 2689PROCESSOR_7100LC and PROCESSOR_8000. They are selected from the pa-risc 2690architecture specified for the target machine when configuring. 2691PROCESSOR_8000 is the default. PROCESSOR_7100LC is selected when the 2692target is a `hppa1*' machine. 2693 2694 The PROCESSOR_8000 model is not well suited to older processors. 2695Thus, it is important to completely specify the machine architecture 2696when configuring if you want a model other than PROCESSOR_8000. The 2697macro TARGET_SCHED_DEFAULT can be defined in BOOT_CFLAGS if a different 2698default scheduling model is desired. 2699 2700 As of GCC 4.0, GCC uses the UNIX 95 namespace for HP-UX 10.10 2701through 11.00, and the UNIX 98 namespace for HP-UX 11.11 and later. 2702This namespace change might cause problems when bootstrapping with an 2703earlier version of GCC or the HP compiler as essentially the same 2704namespace is required for an entire build. This problem can be avoided 2705in a number of ways. With HP cc, `UNIX_STD' can be set to `95' or 2706`98'. Another way is to add an appropriate set of predefines to `CC'. 2707The description for the `munix=' option contains a list of the 2708predefines used with each standard. 2709 2710 More specific information to `hppa*-hp-hpux*' targets follows. 2711 2712hppa*-hp-hpux10 2713=============== 2714 2715For hpux10.20, we _highly_ recommend you pick up the latest sed patch 2716`PHCO_19798' from HP. 2717 2718 The C++ ABI has changed incompatibly in GCC 4.0. COMDAT subspaces 2719are used for one-only code and data. This resolves many of the previous 2720problems in using C++ on this target. However, the ABI is not 2721compatible with the one implemented under HP-UX 11 using secondary 2722definitions. 2723 2724hppa*-hp-hpux11 2725=============== 2726 2727GCC 3.0 and up support HP-UX 11. GCC 2.95.x is not supported and cannot 2728be used to compile GCC 3.0 and up. 2729 2730 The libffi and libjava libraries haven't been ported to 64-bit HP-UX 2731and don't build. 2732 2733 Refer to binaries for information about obtaining precompiled GCC 2734binaries for HP-UX. Precompiled binaries must be obtained to build the 2735Ada language as it can't be bootstrapped using C. Ada is only 2736available for the 32-bit PA-RISC runtime. 2737 2738 Starting with GCC 3.4 an ISO C compiler is required to bootstrap. 2739The bundled compiler supports only traditional C; you will need either 2740HP's unbundled compiler, or a binary distribution of GCC. 2741 2742 It is possible to build GCC 3.3 starting with the bundled HP 2743compiler, but the process requires several steps. GCC 3.3 can then be 2744used to build later versions. The fastjar program contains ISO C code 2745and can't be built with the HP bundled compiler. This problem can be 2746avoided by not building the Java language. For example, use the 2747`--enable-languages="c,c++,f77,objc"' option in your configure command. 2748 2749 There are several possible approaches to building the distribution. 2750Binutils can be built first using the HP tools. Then, the GCC 2751distribution can be built. The second approach is to build GCC first 2752using the HP tools, then build binutils, then rebuild GCC. There have 2753been problems with various binary distributions, so it is best not to 2754start from a binary distribution. 2755 2756 On 64-bit capable systems, there are two distinct targets. Different 2757installation prefixes must be used if both are to be installed on the 2758same system. The `hppa[1-2]*-hp-hpux11*' target generates code for the 275932-bit PA-RISC runtime architecture and uses the HP linker. The 2760`hppa64-hp-hpux11*' target generates 64-bit code for the PA-RISC 2.0 2761architecture. 2762 2763 The script config.guess now selects the target type based on the 2764compiler detected during configuration. You must define `PATH' or `CC' 2765so that configure finds an appropriate compiler for the initial 2766bootstrap. When `CC' is used, the definition should contain the 2767options that are needed whenever `CC' is used. 2768 2769 Specifically, options that determine the runtime architecture must be 2770in `CC' to correctly select the target for the build. It is also 2771convenient to place many other compiler options in `CC'. For example, 2772`CC="cc -Ac +DA2.0W -Wp,-H16376 -D_CLASSIC_TYPES -D_HPUX_SOURCE"' can 2773be used to bootstrap the GCC 3.3 branch with the HP compiler in 64-bit 2774K&R/bundled mode. The `+DA2.0W' option will result in the automatic 2775selection of the `hppa64-hp-hpux11*' target. The macro definition 2776table of cpp needs to be increased for a successful build with the HP 2777compiler. _CLASSIC_TYPES and _HPUX_SOURCE need to be defined when 2778building with the bundled compiler, or when using the `-Ac' option. 2779These defines aren't necessary with `-Ae'. 2780 2781 It is best to explicitly configure the `hppa64-hp-hpux11*' target 2782with the `--with-ld=...' option. This overrides the standard search 2783for ld. The two linkers supported on this target require different 2784commands. The default linker is determined during configuration. As a 2785result, it's not possible to switch linkers in the middle of a GCC 2786build. This has been reported to sometimes occur in unified builds of 2787binutils and GCC. 2788 2789 A recent linker patch must be installed for the correct operation of 2790GCC 3.3 and later. `PHSS_26559' and `PHSS_24304' are the oldest linker 2791patches that are known to work. They are for HP-UX 11.00 and 11.11, 2792respectively. `PHSS_24303', the companion to `PHSS_24304', might be 2793usable but it hasn't been tested. These patches have been superseded. 2794Consult the HP patch database to obtain the currently recommended 2795linker patch for your system. 2796 2797 The patches are necessary for the support of weak symbols on the 279832-bit port, and for the running of initializers and finalizers. Weak 2799symbols are implemented using SOM secondary definition symbols. Prior 2800to HP-UX 11, there are bugs in the linker support for secondary symbols. 2801The patches correct a problem of linker core dumps creating shared 2802libraries containing secondary symbols, as well as various other 2803linking issues involving secondary symbols. 2804 2805 GCC 3.3 uses the ELF DT_INIT_ARRAY and DT_FINI_ARRAY capabilities to 2806run initializers and finalizers on the 64-bit port. The 32-bit port 2807uses the linker `+init' and `+fini' options for the same purpose. The 2808patches correct various problems with the +init/+fini options, 2809including program core dumps. Binutils 2.14 corrects a problem on the 281064-bit port resulting from HP's non-standard use of the .init and .fini 2811sections for array initializers and finalizers. 2812 2813 Although the HP and GNU linkers are both supported for the 2814`hppa64-hp-hpux11*' target, it is strongly recommended that the HP 2815linker be used for link editing on this target. 2816 2817 At this time, the GNU linker does not support the creation of long 2818branch stubs. As a result, it can't successfully link binaries 2819containing branch offsets larger than 8 megabytes. In addition, there 2820are problems linking shared libraries, linking executables with 2821`-static', and with dwarf2 unwind and exception support. It also 2822doesn't provide stubs for internal calls to global functions in shared 2823libraries, so these calls can't be overloaded. 2824 2825 The HP dynamic loader does not support GNU symbol versioning, so 2826symbol versioning is not supported. It may be necessary to disable 2827symbol versioning with `--disable-symvers' when using GNU ld. 2828 2829 POSIX threads are the default. The optional DCE thread library is 2830not supported, so `--enable-threads=dce' does not work. 2831 2832*-*-linux-gnu 2833============= 2834 2835Versions of libstdc++-v3 starting with 3.2.1 require bug fixes present 2836in glibc 2.2.5 and later. More information is available in the 2837libstdc++-v3 documentation. 2838 2839i?86-*-linux* 2840============= 2841 2842As of GCC 3.3, binutils 2.13.1 or later is required for this platform. 2843See bug 10877 for more information. 2844 2845 If you receive Signal 11 errors when building on GNU/Linux, then it 2846is possible you have a hardware problem. Further information on this 2847can be found on www.bitwizard.nl. 2848 2849i?86-*-solaris2.[89] 2850==================== 2851 2852The Sun assembler in Solaris 8 and 9 has several bugs and limitations. 2853While GCC works around them, several features are missing, so it is 2854recommended to use the GNU assembler instead. There is no bundled 2855version, but the current version, from GNU binutils 2.20.1, is known to 2856work. 2857 2858 Solaris~2/x86 doesn't support the execution of SSE/SSE2 instructions 2859before Solaris~9 4/04, even if the CPU supports them. Programs will 2860receive `SIGILL' if they try. The fix is available both in Solaris~9 2861Update~6 and kernel patch 112234-12 or newer. There is no 2862corresponding patch for Solaris 8. To avoid this problem, `-march' 2863defaults to `pentiumpro' on Solaris 8 and 9. If you have the patch 2864installed, you can configure GCC with an appropriate `--with-arch' 2865option, but need GNU `as' for SSE2 support. 2866 2867i?86-*-solaris2.10 2868================== 2869 2870Use this for Solaris 10 or later on x86 and x86-64 systems. This 2871configuration is supported by GCC 4.0 and later versions only. Unlike 2872`sparcv9-sun-solaris2*', there is no corresponding 64-bit configuration 2873like `amd64-*-solaris2*' or `x86_64-*-solaris2*'. 2874 2875 It is recommended that you configure GCC to use the GNU assembler, in 2876`/usr/sfw/bin/gas'. The versions included in Solaris 10, from GNU 2877binutils 2.15, and Solaris 11, from GNU binutils 2.19, work fine, 2878although the current version, from GNU binutils 2.20.1, is known to 2879work, too. Recent versions of the Sun assembler in `/usr/ccs/bin/as' 2880work almost as well, though. 2881 2882 For linking, the Sun linker, is preferred. If you want to use the 2883GNU linker instead, which is available in `/usr/sfw/bin/gld', note that 2884due to a packaging bug the version in Solaris 10, from GNU binutils 28852.15, cannot be used, while the version in Solaris 11, from GNU binutils 28862.19, works, as does the latest version, from GNU binutils 2.20.1. 2887 2888 To use GNU `as', configure with the options `--with-gnu-as 2889--with-as=/usr/sfw/bin/gas'. It may be necessary to configure with 2890`--without-gnu-ld --with-ld=/usr/ccs/bin/ld' to guarantee use of Sun 2891`ld'. 2892 2893ia64-*-linux 2894============ 2895 2896IA-64 processor (also known as IPF, or Itanium Processor Family) 2897running GNU/Linux. 2898 2899 If you are using the installed system libunwind library with 2900`--with-system-libunwind', then you must use libunwind 0.98 or later. 2901 2902 None of the following versions of GCC has an ABI that is compatible 2903with any of the other versions in this list, with the exception that 2904Red Hat 2.96 and Trillian 000171 are compatible with each other: 3.1, 29053.0.2, 3.0.1, 3.0, Red Hat 2.96, and Trillian 000717. This primarily 2906affects C++ programs and programs that create shared libraries. GCC 29073.1 or later is recommended for compiling linux, the kernel. As of 2908version 3.1 GCC is believed to be fully ABI compliant, and hence no 2909more major ABI changes are expected. 2910 2911ia64-*-hpux* 2912============ 2913 2914Building GCC on this target requires the GNU Assembler. The bundled HP 2915assembler will not work. To prevent GCC from using the wrong assembler, 2916the option `--with-gnu-as' may be necessary. 2917 2918 The GCC libunwind library has not been ported to HPUX. This means 2919that for GCC versions 3.2.3 and earlier, `--enable-libunwind-exceptions' 2920is required to build GCC. For GCC 3.3 and later, this is the default. 2921For gcc 3.4.3 and later, `--enable-libunwind-exceptions' is removed and 2922the system libunwind library will always be used. 2923 2924*-ibm-aix* 2925========== 2926 2927Support for AIX version 3 and older was discontinued in GCC 3.4. 2928Support for AIX version 4.2 and older was discontinued in GCC 4.5. 2929 2930 "out of memory" bootstrap failures may indicate a problem with 2931process resource limits (ulimit). Hard limits are configured in the 2932`/etc/security/limits' system configuration file. 2933 2934 GCC can bootstrap with recent versions of IBM XLC, but bootstrapping 2935with an earlier release of GCC is recommended. Bootstrapping with XLC 2936requires a larger data segment, which can be enabled through the 2937LDR_CNTRL environment variable, e.g., 2938 2939 % LDR_CNTRL=MAXDATA=0x50000000 2940 % export LDR_CNTRL 2941 2942 One can start with a pre-compiled version of GCC to build from 2943sources. One may delete GCC's "fixed" header files when starting with 2944a version of GCC built for an earlier release of AIX. 2945 2946 To speed up the configuration phases of bootstrapping and installing 2947GCC, one may use GNU Bash instead of AIX `/bin/sh', e.g., 2948 2949 % CONFIG_SHELL=/opt/freeware/bin/bash 2950 % export CONFIG_SHELL 2951 2952 and then proceed as described in the build instructions, where we 2953strongly recommend specifying an absolute path to invoke 2954SRCDIR/configure. 2955 2956 Because GCC on AIX is built as a 32-bit executable by default, 2957(although it can generate 64-bit programs) the GMP and MPFR libraries 2958required by gfortran must be 32-bit libraries. Building GMP and MPFR 2959as static archive libraries works better than shared libraries. 2960 2961 Errors involving `alloca' when building GCC generally are due to an 2962incorrect definition of `CC' in the Makefile or mixing files compiled 2963with the native C compiler and GCC. During the stage1 phase of the 2964build, the native AIX compiler *must* be invoked as `cc' (not `xlc'). 2965Once `configure' has been informed of `xlc', one needs to use `make 2966distclean' to remove the configure cache files and ensure that `CC' 2967environment variable does not provide a definition that will confuse 2968`configure'. If this error occurs during stage2 or later, then the 2969problem most likely is the version of Make (see above). 2970 2971 The native `as' and `ld' are recommended for bootstrapping on AIX. 2972The GNU Assembler, GNU Linker, and GNU Binutils version 2.20 is 2973required to bootstrap on AIX 5. The native AIX tools do interoperate 2974with GCC. 2975 2976 Building `libstdc++.a' requires a fix for an AIX Assembler bug APAR 2977IY26685 (AIX 4.3) or APAR IY25528 (AIX 5.1). It also requires a fix 2978for another AIX Assembler bug and a co-dependent AIX Archiver fix 2979referenced as APAR IY53606 (AIX 5.2) or as APAR IY54774 (AIX 5.1) 2980 2981 `libstdc++' in GCC 3.4 increments the major version number of the 2982shared object and GCC installation places the `libstdc++.a' shared 2983library in a common location which will overwrite the and GCC 3.3 2984version of the shared library. Applications either need to be 2985re-linked against the new shared library or the GCC 3.1 and GCC 3.3 2986versions of the `libstdc++' shared object needs to be available to the 2987AIX runtime loader. The GCC 3.1 `libstdc++.so.4', if present, and GCC 29883.3 `libstdc++.so.5' shared objects can be installed for runtime 2989dynamic loading using the following steps to set the `F_LOADONLY' flag 2990in the shared object for _each_ multilib `libstdc++.a' installed: 2991 2992 Extract the shared objects from the currently installed 2993`libstdc++.a' archive: 2994 % ar -x libstdc++.a libstdc++.so.4 libstdc++.so.5 2995 2996 Enable the `F_LOADONLY' flag so that the shared object will be 2997available for runtime dynamic loading, but not linking: 2998 % strip -e libstdc++.so.4 libstdc++.so.5 2999 3000 Archive the runtime-only shared object in the GCC 3.4 `libstdc++.a' 3001archive: 3002 % ar -q libstdc++.a libstdc++.so.4 libstdc++.so.5 3003 3004 Linking executables and shared libraries may produce warnings of 3005duplicate symbols. The assembly files generated by GCC for AIX always 3006have included multiple symbol definitions for certain global variable 3007and function declarations in the original program. The warnings should 3008not prevent the linker from producing a correct library or runnable 3009executable. 3010 3011 AIX 4.3 utilizes a "large format" archive to support both 32-bit and 301264-bit object modules. The routines provided in AIX 4.3.0 and AIX 4.3.1 3013to parse archive libraries did not handle the new format correctly. 3014These routines are used by GCC and result in error messages during 3015linking such as "not a COFF file". The version of the routines shipped 3016with AIX 4.3.1 should work for a 32-bit environment. The `-g' option 3017of the archive command may be used to create archives of 32-bit objects 3018using the original "small format". A correct version of the routines 3019is shipped with AIX 4.3.2 and above. 3020 3021 Some versions of the AIX binder (linker) can fail with a relocation 3022overflow severe error when the `-bbigtoc' option is used to link 3023GCC-produced object files into an executable that overflows the TOC. A 3024fix for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND -BBIGTOC) 3025is available from IBM Customer Support and from its 3026techsupport.services.ibm.com website as PTF U455193. 3027 3028 The AIX 4.3.2.1 linker (bos.rte.bind_cmds Level 4.3.2.1) will dump 3029core with a segmentation fault when invoked by any version of GCC. A 3030fix for APAR IX87327 is available from IBM Customer Support and from its 3031techsupport.services.ibm.com website as PTF U461879. This fix is 3032incorporated in AIX 4.3.3 and above. 3033 3034 The initial assembler shipped with AIX 4.3.0 generates incorrect 3035object files. A fix for APAR IX74254 (64BIT DISASSEMBLED OUTPUT FROM 3036COMPILER FAILS TO ASSEMBLE/BIND) is available from IBM Customer Support 3037and from its techsupport.services.ibm.com website as PTF U453956. This 3038fix is incorporated in AIX 4.3.1 and above. 3039 3040 AIX provides National Language Support (NLS). Compilers and 3041assemblers use NLS to support locale-specific representations of 3042various data formats including floating-point numbers (e.g., `.' vs 3043`,' for separating decimal fractions). There have been problems 3044reported where GCC does not produce the same floating-point formats 3045that the assembler expects. If one encounters this problem, set the 3046`LANG' environment variable to `C' or `En_US'. 3047 3048 A default can be specified with the `-mcpu=CPU_TYPE' switch and 3049using the configure option `--with-cpu-CPU_TYPE'. 3050 3051iq2000-*-elf 3052============ 3053 3054Vitesse IQ2000 processors. These are used in embedded applications. 3055There are no standard Unix configurations. 3056 3057lm32-*-elf 3058========== 3059 3060Lattice Mico32 processor. This configuration is intended for embedded 3061systems. 3062 3063lm32-*-uclinux 3064============== 3065 3066Lattice Mico32 processor. This configuration is intended for embedded 3067systems running uClinux. 3068 3069m32c-*-elf 3070========== 3071 3072Renesas M32C processor. This configuration is intended for embedded 3073systems. 3074 3075m32r-*-elf 3076========== 3077 3078Renesas M32R processor. This configuration is intended for embedded 3079systems. 3080 3081m6811-elf 3082========= 3083 3084Motorola 68HC11 family micro controllers. These are used in embedded 3085applications. There are no standard Unix configurations. 3086 3087m6812-elf 3088========= 3089 3090Motorola 68HC12 family micro controllers. These are used in embedded 3091applications. There are no standard Unix configurations. 3092 3093m68k-*-* 3094======== 3095 3096By default, `m68k-*-elf*', `m68k-*-rtems', `m68k-*-uclinux' and 3097`m68k-*-linux' build libraries for both M680x0 and ColdFire processors. 3098If you only need the M680x0 libraries, you can omit the ColdFire ones 3099by passing `--with-arch=m68k' to `configure'. Alternatively, you can 3100omit the M680x0 libraries by passing `--with-arch=cf' to `configure'. 3101These targets default to 5206 or 5475 code as appropriate for the 3102target system when configured with `--with-arch=cf' and 68020 code 3103otherwise. 3104 3105 The `m68k-*-netbsd' and `m68k-*-openbsd' targets also support the 3106`--with-arch' option. They will generate ColdFire CFV4e code when 3107configured with `--with-arch=cf' and 68020 code otherwise. 3108 3109 You can override the default processors listed above by configuring 3110with `--with-cpu=TARGET'. This TARGET can either be a `-mcpu' argument 3111or one of the following values: `m68000', `m68010', `m68020', `m68030', 3112`m68040', `m68060', `m68020-40' and `m68020-60'. 3113 3114m68k-*-uclinux 3115============== 3116 3117GCC 4.3 changed the uClinux configuration so that it uses the 3118`m68k-linux-gnu' ABI rather than the `m68k-elf' ABI. It also added 3119improved support for C++ and flat shared libraries, both of which were 3120ABI changes. However, you can still use the original ABI by 3121configuring for `m68k-uclinuxoldabi' or `m68k-VENDOR-uclinuxoldabi'. 3122 3123mep-*-elf 3124========= 3125 3126Toshiba Media embedded Processor. This configuration is intended for 3127embedded systems. 3128 3129mips-*-* 3130======== 3131 3132If on a MIPS system you get an error message saying "does not have gp 3133sections for all it's [sic] sectons [sic]", don't worry about it. This 3134happens whenever you use GAS with the MIPS linker, but there is not 3135really anything wrong, and it is okay to use the output file. You can 3136stop such warnings by installing the GNU linker. 3137 3138 It would be nice to extend GAS to produce the gp tables, but they are 3139optional, and there should not be a warning about their absence. 3140 3141 The libstdc++ atomic locking routines for MIPS targets requires MIPS 3142II and later. A patch went in just after the GCC 3.3 release to make 3143`mips*-*-*' use the generic implementation instead. You can also 3144configure for `mipsel-elf' as a workaround. The `mips*-*-linux*' 3145target continues to use the MIPS II routines. More work on this is 3146expected in future releases. 3147 3148 The built-in `__sync_*' functions are available on MIPS II and later 3149systems and others that support the `ll', `sc' and `sync' instructions. 3150This can be overridden by passing `--with-llsc' or `--without-llsc' 3151when configuring GCC. Since the Linux kernel emulates these 3152instructions if they are missing, the default for `mips*-*-linux*' 3153targets is `--with-llsc'. The `--with-llsc' and `--without-llsc' 3154configure options may be overridden at compile time by passing the 3155`-mllsc' or `-mno-llsc' options to the compiler. 3156 3157 MIPS systems check for division by zero (unless 3158`-mno-check-zero-division' is passed to the compiler) by generating 3159either a conditional trap or a break instruction. Using trap results 3160in smaller code, but is only supported on MIPS II and later. Also, 3161some versions of the Linux kernel have a bug that prevents trap from 3162generating the proper signal (`SIGFPE'). To enable the use of break, 3163use the `--with-divide=breaks' `configure' option when configuring GCC. 3164The default is to use traps on systems that support them. 3165 3166 Cross-compilers for the MIPS as target using the MIPS assembler 3167currently do not work, because the auxiliary programs `mips-tdump.c' 3168and `mips-tfile.c' can't be compiled on anything but a MIPS. It does 3169work to cross compile for a MIPS if you use the GNU assembler and 3170linker. 3171 3172 The assembler from GNU binutils 2.17 and earlier has a bug in the way 3173it sorts relocations for REL targets (o32, o64, EABI). This can cause 3174bad code to be generated for simple C++ programs. Also the linker from 3175GNU binutils versions prior to 2.17 has a bug which causes the runtime 3176linker stubs in very large programs, like `libgcj.so', to be 3177incorrectly generated. GNU Binutils 2.18 and later (and snapshots made 3178after Nov. 9, 2006) should be free from both of these problems. 3179 3180mips-sgi-irix5 3181============== 3182 3183Support for IRIX 5 has been obsoleted in GCC 4.5, but can still be 3184enabled by configuring with `--enable-obsolete'. Support will be 3185removed in GCC 4.6. 3186 3187 In order to compile GCC on an SGI running IRIX 5, the 3188`compiler_dev.hdr' subsystem must be installed from the IDO CD-ROM 3189supplied by SGI. It is also available for download from 3190`http://freeware.sgi.com/ido.html'. 3191 3192 If you use the MIPS C compiler to bootstrap, it may be necessary to 3193increase its table size for switch statements with the `-Wf,-XNg1500' 3194option. If you use the `-O2' optimization option, you also need to use 3195`-Olimit 3000'. 3196 3197 GCC must be configured to use GNU `as'. The latest version, from GNU 3198binutils 2.20.1, is known to work. 3199 3200 To enable debugging under IRIX 5, you must use GNU binutils 2.15 or 3201later, and use the `--with-gnu-ld' `configure' option when configuring 3202GCC. You need to use GNU `ar' and `nm', also distributed with GNU 3203binutils. 3204 3205 Configuring GCC with `/bin/sh' is _extremely_ slow and may even 3206hang. This problem can be avoided by running `configure' like this: 3207 3208 % CONFIG_SHELL=/usr/local/bin/bash 3209 % export CONFIG_SHELL 3210 % $CONFIG_SHELL SRCDIR/configure [OPTIONS] 3211 3212`/bin/ksh' doesn't work properly either. 3213 3214mips-sgi-irix6 3215============== 3216 3217Support for IRIX 6 releases before 6.5 has been obsoleted in GCC 4.5, 3218but can still be enabled by configuring with `--enable-obsolete'. 3219Support will be removed in GCC 4.6, which will also disable support for 3220the O32 ABI. It is _strongly_ recommended to upgrade to at least IRIX 32216.5.18. This release introduced full ISO C99 support, though for the 3222N32 and N64 ABIs only. 3223 3224 To build and use GCC on IRIX 6, you need the IRIX Development 3225Foundation (IDF) and IRIX Development Libraries (IDL). They are 3226included with the IRIX 6.5 media and can be downloaded from 3227`http://freeware.sgi.com/idf_idl.html' for older IRIX 6 releases. 3228 3229 If you are using SGI's MIPSpro `cc' as your bootstrap compiler, you 3230must ensure that the N32 ABI is in use. To test this, compile a simple 3231C file with `cc' and then run `file' on the resulting object file. The 3232output should look like: 3233 3234 test.o: ELF N32 MSB ... 3235 3236If you see: 3237 3238 test.o: ELF 32-bit MSB ... 3239 3240or 3241 3242 test.o: ELF 64-bit MSB ... 3243 3244then your version of `cc' uses the O32 or N64 ABI by default. You 3245should set the environment variable `CC' to `cc -n32' before 3246configuring GCC. 3247 3248 If you want the resulting `gcc' to run on old 32-bit systems with 3249the MIPS R4400 CPU, you need to ensure that only code for the `mips3' 3250instruction set architecture (ISA) is generated. While GCC 3.x does 3251this correctly, both GCC 2.95 and SGI's MIPSpro `cc' may change the ISA 3252depending on the machine where GCC is built. Using one of them as the 3253bootstrap compiler may result in `mips4' code, which won't run at all 3254on `mips3'-only systems. For the test program above, you should see: 3255 3256 test.o: ELF N32 MSB mips-3 ... 3257 3258If you get: 3259 3260 test.o: ELF N32 MSB mips-4 ... 3261 3262instead, you should set the environment variable `CC' to `cc -n32 3263-mips3' or `gcc -mips3' respectively before configuring GCC. 3264 3265 MIPSpro C 7.4 may cause bootstrap failures, due to a bug when 3266inlining `memcmp'. Either add `-U__INLINE_INTRINSICS' to the `CC' 3267environment variable as a workaround or upgrade to MIPSpro C 7.4.1m. 3268 3269 GCC on IRIX 6 is usually built to support the N32, O32 and N64 ABIs. 3270If you build GCC on a system that doesn't have the N64 libraries 3271installed or cannot run 64-bit binaries, you need to configure with 3272`--disable-multilib' so GCC doesn't try to use them. This will disable 3273building the O32 libraries, too. Look for `/usr/lib64/libc.so.1' to 3274see if you have the 64-bit libraries installed. 3275 3276 GCC must be configured with GNU `as'. The latest version, from GNU 3277binutils 2.20.1, is known to work. On the other hand, bootstrap fails 3278with GNU `ld' at least since GNU binutils 2.17. 3279 3280 The `--enable-libgcj' option is disabled by default: IRIX 6 uses a 3281very low default limit (20480) for the command line length. Although 3282`libtool' contains a workaround for this problem, at least the N64 3283`libgcj' is known not to build despite this, running into an internal 3284error of the native `ld'. A sure fix is to increase this limit 3285(`ncargs') to its maximum of 262144 bytes. If you have root access, 3286you can use the `systune' command to do this. 3287 3288 `wchar_t' support in `libstdc++' is not available for old IRIX 6.5.x 3289releases, x < 19. The problem cannot be autodetected and in order to 3290build GCC for such targets you need to configure with 3291`--disable-wchar_t'. 3292 3293moxie-*-elf 3294=========== 3295 3296The moxie processor. See `http://moxielogic.org/' for more information 3297about this processor. 3298 3299powerpc-*-* 3300=========== 3301 3302You can specify a default version for the `-mcpu=CPU_TYPE' switch by 3303using the configure option `--with-cpu-CPU_TYPE'. 3304 3305 You will need binutils 2.15 or newer for a working GCC. 3306 3307powerpc-*-darwin* 3308================= 3309 3310PowerPC running Darwin (Mac OS X kernel). 3311 3312 Pre-installed versions of Mac OS X may not include any developer 3313tools, meaning that you will not be able to build GCC from source. Tool 3314binaries are available at 3315`http://developer.apple.com/darwin/projects/compiler/' (free 3316registration required). 3317 3318 This version of GCC requires at least cctools-590.36. The 3319cctools-590.36 package referenced from 3320`http://gcc.gnu.org/ml/gcc/2006-03/msg00507.html' will not work on 3321systems older than 10.3.9 (aka darwin7.9.0). 3322 3323powerpc-*-elf 3324============= 3325 3326PowerPC system in big endian mode, running System V.4. 3327 3328powerpc*-*-linux-gnu* 3329===================== 3330 3331PowerPC system in big endian mode running Linux. 3332 3333powerpc-*-netbsd* 3334================= 3335 3336PowerPC system in big endian mode running NetBSD. 3337 3338powerpc-*-eabisim 3339================= 3340 3341Embedded PowerPC system in big endian mode for use in running under the 3342PSIM simulator. 3343 3344powerpc-*-eabi 3345============== 3346 3347Embedded PowerPC system in big endian mode. 3348 3349powerpcle-*-elf 3350=============== 3351 3352PowerPC system in little endian mode, running System V.4. 3353 3354powerpcle-*-eabisim 3355=================== 3356 3357Embedded PowerPC system in little endian mode for use in running under 3358the PSIM simulator. 3359 3360powerpcle-*-eabi 3361================ 3362 3363Embedded PowerPC system in little endian mode. 3364 3365rx-*-elf 3366======== 3367 3368The Renesas RX processor. See 3369`http://eu.renesas.com/fmwk.jsp?cnt=rx600_series_landing.jsp&fp=/products/mpumcu/rx_family/rx600_series' 3370for more information about this processor. 3371 3372s390-*-linux* 3373============= 3374 3375S/390 system running GNU/Linux for S/390. 3376 3377s390x-*-linux* 3378============== 3379 3380zSeries system (64-bit) running GNU/Linux for zSeries. 3381 3382s390x-ibm-tpf* 3383============== 3384 3385zSeries system (64-bit) running TPF. This platform is supported as 3386cross-compilation target only. 3387 3388*-*-solaris2* 3389============= 3390 3391Support for Solaris 7 has been obsoleted in GCC 4.5, but can still be 3392enabled by configuring with `--enable-obsolete'. Support will be 3393removed in GCC 4.6. 3394 3395 Sun does not ship a C compiler with Solaris 2, though you can 3396download the Sun Studio compilers for free from 3397`http://developers.sun.com/sunstudio/downloads/'. Alternatively, you 3398can install a pre-built GCC to bootstrap and install GCC. See the 3399binaries page for details. 3400 3401 The Solaris 2 `/bin/sh' will often fail to configure `libstdc++-v3', 3402`boehm-gc' or `libjava'. We therefore recommend using the following 3403initial sequence of commands 3404 3405 % CONFIG_SHELL=/bin/ksh 3406 % export CONFIG_SHELL 3407 3408and proceed as described in the configure instructions. In addition we 3409strongly recommend specifying an absolute path to invoke 3410`SRCDIR/configure'. 3411 3412 Solaris 2 comes with a number of optional OS packages. Some of these 3413are needed to use GCC fully, namely `SUNWarc', `SUNWbtool', `SUNWesu', 3414`SUNWhea', `SUNWlibm', `SUNWsprot', and `SUNWtoo'. If you did not 3415install all optional packages when installing Solaris 2, you will need 3416to verify that the packages that GCC needs are installed. 3417 3418 To check whether an optional package is installed, use the `pkginfo' 3419command. To add an optional package, use the `pkgadd' command. For 3420further details, see the Solaris 2 documentation. 3421 3422 Trying to use the linker and other tools in `/usr/ucb' to install 3423GCC has been observed to cause trouble. For example, the linker may 3424hang indefinitely. The fix is to remove `/usr/ucb' from your `PATH'. 3425 3426 The build process works more smoothly with the legacy Sun tools so, 3427if you have `/usr/xpg4/bin' in your `PATH', we recommend that you place 3428`/usr/bin' before `/usr/xpg4/bin' for the duration of the build. 3429 3430 We recommend the use of the Sun assembler or the GNU assembler, in 3431conjunction with the Sun linker. The GNU `as' versions included in 3432Solaris 10, from GNU binutils 2.15, and Solaris 11, from GNU binutils 34332.19, are known to work. They can be found in `/usr/sfw/bin/gas'. 3434Current versions of GNU binutils (2.20.1) are known to work as well. 3435Note that your mileage may vary if you use a combination of the GNU 3436tools and the Sun tools: while the combination GNU `as' + Sun `ld' 3437should reasonably work, the reverse combination Sun `as' + GNU `ld' is 3438known to cause memory corruption at runtime in some cases for C++ 3439programs. GNU `ld' usually works as well, although the version 3440included in Solaris 10 cannot be used due to several bugs. Again, the 3441current version (2.20.1) is known to work, but generally lacks platform 3442specific features, so better stay with Sun `ld'. 3443 3444 Sun bug 4296832 turns up when compiling X11 headers with GCC 2.95 or 3445newer: `g++' will complain that types are missing. These headers 3446assume that omitting the type means `int'; this assumption worked for 3447C90 but is wrong for C++, and is now wrong for C99 also. 3448 3449 `g++' accepts such (invalid) constructs with the option 3450`-fpermissive'; it will assume that any missing type is `int' (as 3451defined by C90). 3452 3453 There are patches for Solaris 7 (108376-21 or newer for SPARC, 3454108377-20 for Intel), and Solaris 8 (108652-24 or newer for SPARC, 3455108653-22 for Intel) that fix this bug. 3456 3457 Sun bug 4927647 sometimes causes random spurious testsuite failures 3458related to missing diagnostic output. This bug doesn't affect GCC 3459itself, rather it is a kernel bug triggered by the `expect' program 3460which is used only by the GCC testsuite driver. When the bug causes 3461the `expect' program to miss anticipated output, extra testsuite 3462failures appear. 3463 3464 There are patches for Solaris 8 (117350-12 or newer for SPARC, 3465117351-12 or newer for Intel) and Solaris 9 (117171-11 or newer for 3466SPARC, 117172-11 or newer for Intel) that address this problem. 3467 3468sparc-sun-solaris2* 3469=================== 3470 3471When GCC is configured to use GNU binutils 2.14 or later, the binaries 3472produced are smaller than the ones produced using Sun's native tools; 3473this difference is quite significant for binaries containing debugging 3474information. 3475 3476 Starting with Solaris 7, the operating system is capable of executing 347764-bit SPARC V9 binaries. GCC 3.1 and later properly supports this; 3478the `-m64' option enables 64-bit code generation. However, if all you 3479want is code tuned for the UltraSPARC CPU, you should try the 3480`-mtune=ultrasparc' option instead, which produces code that, unlike 3481full 64-bit code, can still run on non-UltraSPARC machines. 3482 3483 When configuring on a Solaris 7 or later system that is running a 3484kernel that supports only 32-bit binaries, one must configure with 3485`--disable-multilib', since we will not be able to build the 64-bit 3486target libraries. 3487 3488 GCC 3.3 and GCC 3.4 trigger code generation bugs in earlier versions 3489of the GNU compiler (especially GCC 3.0.x versions), which lead to the 3490miscompilation of the stage1 compiler and the subsequent failure of the 3491bootstrap process. A workaround is to use GCC 3.2.3 as an intermediary 3492stage, i.e. to bootstrap that compiler with the base compiler and then 3493use it to bootstrap the final compiler. 3494 3495 GCC 3.4 triggers a code generation bug in versions 5.4 (Sun ONE 3496Studio 7) and 5.5 (Sun ONE Studio 8) of the Sun compiler, which causes 3497a bootstrap failure in form of a miscompilation of the stage1 compiler 3498by the Sun compiler. This is Sun bug 4974440. This is fixed with 3499patch 112760-07. 3500 3501 GCC 3.4 changed the default debugging format from Stabs to DWARF-2 3502for 32-bit code on Solaris 7 and later. If you use the Sun assembler, 3503this change apparently runs afoul of Sun bug 4910101 (which is 3504referenced as an x86-only problem by Sun, probably because they do not 3505use DWARF-2). A symptom of the problem is that you cannot compile C++ 3506programs like `groff' 1.19.1 without getting messages similar to the 3507following: 3508 3509 ld: warning: relocation error: R_SPARC_UA32: ... 3510 external symbolic relocation against non-allocatable section 3511 .debug_info cannot be processed at runtime: relocation ignored. 3512 3513To work around this problem, compile with `-gstabs+' instead of plain 3514`-g'. 3515 3516 When configuring the GNU Multiple Precision Library (GMP) or the MPFR 3517library on a Solaris 7 or later system, the canonical target triplet 3518must be specified as the `build' parameter on the configure line. This 3519triplet can be obtained by invoking `./config.guess' in the toplevel 3520source directory of GCC (and not that of GMP or MPFR). For example on 3521a Solaris 7 system: 3522 3523 % ./configure --build=sparc-sun-solaris2.7 --prefix=xxx 3524 3525sparc-sun-solaris2.7 3526==================== 3527 3528_Note_ that this configuration has been obsoleted in GCC 4.5, and will 3529be removed in GCC 4.6. 3530 3531 Sun patch 107058-01 (1999-01-13) for Solaris 7/SPARC triggers a bug 3532in the dynamic linker. This problem (Sun bug 4210064) affects GCC 2.8 3533and later, including all EGCS releases. Sun formerly recommended 3534107058-01 for all Solaris 7 users, but around 1999-09-01 it started to 3535recommend it only for people who use Sun's compilers. 3536 3537 Here are some workarounds to this problem: 3538 * Do not install Sun patch 107058-01 until after Sun releases a 3539 complete patch for bug 4210064. This is the simplest course to 3540 take, unless you must also use Sun's C compiler. Unfortunately 3541 107058-01 is preinstalled on some new Solaris 7-based hosts, so 3542 you may have to back it out. 3543 3544 * Copy the original, unpatched Solaris 7 `/usr/ccs/bin/as' into 3545 `/usr/local/libexec/gcc/sparc-sun-solaris2.7/3.4/as', adjusting 3546 the latter name to fit your local conventions and software version 3547 numbers. 3548 3549 * Install Sun patch 106950-03 (1999-05-25) or later. Nobody with 3550 both 107058-01 and 106950-03 installed has reported the bug with 3551 GCC and Sun's dynamic linker. This last course of action is 3552 riskiest, for two reasons. First, you must install 106950 on all 3553 hosts that run code generated by GCC; it doesn't suffice to 3554 install it only on the hosts that run GCC itself. Second, Sun 3555 says that 106950-03 is only a partial fix for bug 4210064, but Sun 3556 doesn't know whether the partial fix is adequate for GCC. 3557 Revision -08 or later should fix the bug. The current (as of 3558 2004-05-23) revision is -24, and is included in the Solaris 7 3559 Recommended Patch Cluster. 3560 3561 GCC 3.3 triggers a bug in version 5.0 Alpha 03/27/98 of the Sun 3562assembler, which causes a bootstrap failure when linking the 64-bit 3563shared version of `libgcc'. A typical error message is: 3564 3565 ld: fatal: relocation error: R_SPARC_32: file libgcc/sparcv9/_muldi3.o: 3566 symbol <unknown>: offset 0xffffffff7ec133e7 is non-aligned. 3567 3568This bug has been fixed in the final 5.0 version of the assembler. 3569 3570 A similar problem was reported for version Sun WorkShop 6 99/08/18 3571of the Sun assembler, which causes a bootstrap failure with GCC 4.0.0: 3572 3573 ld: fatal: relocation error: R_SPARC_DISP32: 3574 file .libs/libstdc++.lax/libsupc++convenience.a/vterminate.o: 3575 symbol <unknown>: offset 0xfccd33ad is non-aligned 3576 3577This bug has been fixed in more recent revisions of the assembler. 3578 3579sparc-sun-solaris2.10 3580===================== 3581 3582There is a bug in older versions of the Sun assembler which breaks 3583thread-local storage (TLS). A typical error message is 3584 3585 ld: fatal: relocation error: R_SPARC_TLS_LE_HIX22: file /var/tmp//ccamPA1v.o: 3586 symbol <unknown>: bad symbol type SECT: symbol type must be TLS 3587 3588This bug is fixed in Sun patch 118683-03 or later. 3589 3590sparc-*-linux* 3591============== 3592 3593GCC versions 3.0 and higher require binutils 2.11.2 and glibc 2.2.4 or 3594newer on this platform. All earlier binutils and glibc releases 3595mishandled unaligned relocations on `sparc-*-*' targets. 3596 3597sparc64-*-solaris2* 3598=================== 3599 3600When configuring the GNU Multiple Precision Library (GMP) or the MPFR 3601library, the canonical target triplet must be specified as the `build' 3602parameter on the configure line. For example on a Solaris 7 system: 3603 3604 % ./configure --build=sparc64-sun-solaris2.7 --prefix=xxx 3605 3606 The following compiler flags must be specified in the configure step 3607in order to bootstrap this target with the Sun compiler: 3608 3609 % CC="cc -xarch=v9 -xildoff" SRCDIR/configure [OPTIONS] [TARGET] 3610 3611`-xarch=v9' specifies the SPARC-V9 architecture to the Sun toolchain 3612and `-xildoff' turns off the incremental linker. 3613 3614sparcv9-*-solaris2* 3615=================== 3616 3617This is a synonym for `sparc64-*-solaris2*'. 3618 3619*-*-vxworks* 3620============ 3621 3622Support for VxWorks is in flux. At present GCC supports _only_ the 3623very recent VxWorks 5.5 (aka Tornado 2.2) release, and only on PowerPC. 3624We welcome patches for other architectures supported by VxWorks 5.5. 3625Support for VxWorks AE would also be welcome; we believe this is merely 3626a matter of writing an appropriate "configlette" (see below). We are 3627not interested in supporting older, a.out or COFF-based, versions of 3628VxWorks in GCC 3. 3629 3630 VxWorks comes with an older version of GCC installed in 3631`$WIND_BASE/host'; we recommend you do not overwrite it. Choose an 3632installation PREFIX entirely outside $WIND_BASE. Before running 3633`configure', create the directories `PREFIX' and `PREFIX/bin'. Link or 3634copy the appropriate assembler, linker, etc. into `PREFIX/bin', and set 3635your PATH to include that directory while running both `configure' and 3636`make'. 3637 3638 You must give `configure' the `--with-headers=$WIND_BASE/target/h' 3639switch so that it can find the VxWorks system headers. Since VxWorks 3640is a cross compilation target only, you must also specify 3641`--target=TARGET'. `configure' will attempt to create the directory 3642`PREFIX/TARGET/sys-include' and copy files into it; make sure the user 3643running `configure' has sufficient privilege to do so. 3644 3645 GCC's exception handling runtime requires a special "configlette" 3646module, `contrib/gthr_supp_vxw_5x.c'. Follow the instructions in that 3647file to add the module to your kernel build. (Future versions of 3648VxWorks will incorporate this module.) 3649 3650x86_64-*-*, amd64-*-* 3651===================== 3652 3653GCC supports the x86-64 architecture implemented by the AMD64 processor 3654(amd64-*-* is an alias for x86_64-*-*) on GNU/Linux, FreeBSD and NetBSD. 3655On GNU/Linux the default is a bi-arch compiler which is able to generate 3656both 64-bit x86-64 and 32-bit x86 code (via the `-m32' switch). 3657 3658xtensa*-*-elf 3659============= 3660 3661This target is intended for embedded Xtensa systems using the `newlib' 3662C library. It uses ELF but does not support shared objects. 3663Designed-defined instructions specified via the Tensilica Instruction 3664Extension (TIE) language are only supported through inline assembly. 3665 3666 The Xtensa configuration information must be specified prior to 3667building GCC. The `include/xtensa-config.h' header file contains the 3668configuration information. If you created your own Xtensa 3669configuration with the Xtensa Processor Generator, the downloaded files 3670include a customized copy of this header file, which you can use to 3671replace the default header file. 3672 3673xtensa*-*-linux* 3674================ 3675 3676This target is for Xtensa systems running GNU/Linux. It supports ELF 3677shared objects and the GNU C library (glibc). It also generates 3678position-independent code (PIC) regardless of whether the `-fpic' or 3679`-fPIC' options are used. In other respects, this target is the same 3680as the `xtensa*-*-elf' target. 3681 3682Microsoft Windows 3683================= 3684 3685Intel 16-bit versions 3686--------------------- 3687 3688The 16-bit versions of Microsoft Windows, such as Windows 3.1, are not 3689supported. 3690 3691 However, the 32-bit port has limited support for Microsoft Windows 36923.11 in the Win32s environment, as a target only. See below. 3693 3694Intel 32-bit versions 3695--------------------- 3696 3697The 32-bit versions of Windows, including Windows 95, Windows NT, 3698Windows XP, and Windows Vista, are supported by several different target 3699platforms. These targets differ in which Windows subsystem they target 3700and which C libraries are used. 3701 3702 * Cygwin *-*-cygwin: Cygwin provides a user-space Linux API 3703 emulation layer in the Win32 subsystem. 3704 3705 * Interix *-*-interix: The Interix subsystem provides native support 3706 for POSIX. 3707 3708 * MinGW *-*-mingw32: MinGW is a native GCC port for the Win32 3709 subsystem that provides a subset of POSIX. 3710 3711 * MKS i386-pc-mks: NuTCracker from MKS. See 3712 `http://www.mkssoftware.com/' for more information. 3713 3714Intel 64-bit versions 3715--------------------- 3716 3717GCC contains support for x86-64 using the mingw-w64 runtime library, 3718available from `http://mingw-w64.sourceforge.net/'. This library 3719should be used with the target triple x86_64-pc-mingw32. 3720 3721 Presently Windows for Itanium is not supported. 3722 3723Windows CE 3724---------- 3725 3726Windows CE is supported as a target only on ARM (arm-wince-pe), Hitachi 3727SuperH (sh-wince-pe), and MIPS (mips-wince-pe). 3728 3729Other Windows Platforms 3730----------------------- 3731 3732GCC no longer supports Windows NT on the Alpha or PowerPC. 3733 3734 GCC no longer supports the Windows POSIX subsystem. However, it does 3735support the Interix subsystem. See above. 3736 3737 Old target names including *-*-winnt and *-*-windowsnt are no longer 3738used. 3739 3740 PW32 (i386-pc-pw32) support was never completed, and the project 3741seems to be inactive. See `http://pw32.sourceforge.net/' for more 3742information. 3743 3744 UWIN support has been removed due to a lack of maintenance. 3745 3746*-*-cygwin 3747========== 3748 3749Ports of GCC are included with the Cygwin environment. 3750 3751 GCC will build under Cygwin without modification; it does not build 3752with Microsoft's C++ compiler and there are no plans to make it do so. 3753 3754 The Cygwin native compiler can be configured to target any 32-bit x86 3755cpu architecture desired; the default is i686-pc-cygwin. It should be 3756used with as up-to-date a version of binutils as possible; use either 3757the latest official GNU binutils release in the Cygwin distribution, or 3758version 2.20 or above if building your own. 3759 3760*-*-interix 3761=========== 3762 3763The Interix target is used by OpenNT, Interix, Services For UNIX (SFU), 3764and Subsystem for UNIX-based Applications (SUA). Applications compiled 3765with this target run in the Interix subsystem, which is separate from 3766the Win32 subsystem. This target was last known to work in GCC 3.3. 3767 3768 For more information, see `http://www.interix.com/'. 3769 3770*-*-mingw32 3771=========== 3772 3773GCC will build with and support only MinGW runtime 3.12 and later. 3774Earlier versions of headers are incompatible with the new default 3775semantics of `extern inline' in `-std=c99' and `-std=gnu99' modes. 3776 3777Older systems 3778============= 3779 3780GCC contains support files for many older (1980s and early 1990s) Unix 3781variants. For the most part, support for these systems has not been 3782deliberately removed, but it has not been maintained for several years 3783and may suffer from bitrot. 3784 3785 Starting with GCC 3.1, each release has a list of "obsoleted" 3786systems. Support for these systems is still present in that release, 3787but `configure' will fail unless the `--enable-obsolete' option is 3788given. Unless a maintainer steps forward, support for these systems 3789will be removed from the next release of GCC. 3790 3791 Support for old systems as hosts for GCC can cause problems if the 3792workarounds for compiler, library and operating system bugs affect the 3793cleanliness or maintainability of the rest of GCC. In some cases, to 3794bring GCC up on such a system, if still possible with current GCC, may 3795require first installing an old version of GCC which did work on that 3796system, and using it to compile a more recent GCC, to avoid bugs in the 3797vendor compiler. Old releases of GCC 1 and GCC 2 are available in the 3798`old-releases' directory on the GCC mirror sites. Header bugs may 3799generally be avoided using `fixincludes', but bugs or deficiencies in 3800libraries and the operating system may still cause problems. 3801 3802 Support for older systems as targets for cross-compilation is less 3803problematic than support for them as hosts for GCC; if an enthusiast 3804wishes to make such a target work again (including resurrecting any of 3805the targets that never worked with GCC 2, starting from the last 3806version before they were removed), patches following the usual 3807requirements would be likely to be accepted, since they should not 3808affect the support for more modern targets. 3809 3810 For some systems, old versions of GNU binutils may also be useful, 3811and are available from `pub/binutils/old-releases' on sourceware.org 3812mirror sites. 3813 3814 Some of the information on specific systems above relates to such 3815older systems, but much of the information about GCC on such systems 3816(which may no longer be applicable to current GCC) is to be found in 3817the GCC texinfo manual. 3818 3819all ELF targets (SVR4, Solaris 2, etc.) 3820======================================= 3821 3822C++ support is significantly better on ELF targets if you use the GNU 3823linker; duplicate copies of inlines, vtables and template 3824instantiations will be discarded automatically. 3825 3826 3827File: gccinstall.info, Node: Old, Next: GNU Free Documentation License, Prev: Specific, Up: Top 3828 382910 Old installation documentation 3830********************************* 3831 3832 Note most of this information is out of date and superseded by the 3833previous chapters of this manual. It is provided for historical 3834reference only, because of a lack of volunteers to merge it into the 3835main manual. 3836 3837* Menu: 3838 3839* Configurations:: Configurations Supported by GCC. 3840 3841 Here is the procedure for installing GCC on a GNU or Unix system. 3842 3843 1. If you have chosen a configuration for GCC which requires other GNU 3844 tools (such as GAS or the GNU linker) instead of the standard 3845 system tools, install the required tools in the build directory 3846 under the names `as', `ld' or whatever is appropriate. 3847 3848 Alternatively, you can do subsequent compilation using a value of 3849 the `PATH' environment variable such that the necessary GNU tools 3850 come before the standard system tools. 3851 3852 2. Specify the host, build and target machine configurations. You do 3853 this when you run the `configure' script. 3854 3855 The "build" machine is the system which you are using, the "host" 3856 machine is the system where you want to run the resulting compiler 3857 (normally the build machine), and the "target" machine is the 3858 system for which you want the compiler to generate code. 3859 3860 If you are building a compiler to produce code for the machine it 3861 runs on (a native compiler), you normally do not need to specify 3862 any operands to `configure'; it will try to guess the type of 3863 machine you are on and use that as the build, host and target 3864 machines. So you don't need to specify a configuration when 3865 building a native compiler unless `configure' cannot figure out 3866 what your configuration is or guesses wrong. 3867 3868 In those cases, specify the build machine's "configuration name" 3869 with the `--host' option; the host and target will default to be 3870 the same as the host machine. 3871 3872 Here is an example: 3873 3874 ./configure --host=sparc-sun-sunos4.1 3875 3876 A configuration name may be canonical or it may be more or less 3877 abbreviated. 3878 3879 A canonical configuration name has three parts, separated by 3880 dashes. It looks like this: `CPU-COMPANY-SYSTEM'. (The three 3881 parts may themselves contain dashes; `configure' can figure out 3882 which dashes serve which purpose.) For example, 3883 `m68k-sun-sunos4.1' specifies a Sun 3. 3884 3885 You can also replace parts of the configuration by nicknames or 3886 aliases. For example, `sun3' stands for `m68k-sun', so 3887 `sun3-sunos4.1' is another way to specify a Sun 3. 3888 3889 You can specify a version number after any of the system types, 3890 and some of the CPU types. In most cases, the version is 3891 irrelevant, and will be ignored. So you might as well specify the 3892 version if you know it. 3893 3894 See *note Configurations::, for a list of supported configuration 3895 names and notes on many of the configurations. You should check 3896 the notes in that section before proceeding any further with the 3897 installation of GCC. 3898 3899 3900 3901File: gccinstall.info, Node: Configurations, Up: Old 3902 390310.1 Configurations Supported by GCC 3904==================================== 3905 3906 Here are the possible CPU types: 3907 3908 1750a, a29k, alpha, arm, avr, cN, clipper, dsp16xx, elxsi, fr30, 3909 h8300, hppa1.0, hppa1.1, i370, i386, i486, i586, i686, i786, i860, 3910 i960, ip2k, m32r, m68000, m68k, m6811, m6812, m88k, mcore, mips, 3911 mipsel, mips64, mips64el, mn10200, mn10300, ns32k, pdp11, powerpc, 3912 powerpcle, romp, rs6000, sh, sparc, sparclite, sparc64, v850, vax, 3913 we32k. 3914 3915 Here are the recognized company names. As you can see, customary 3916abbreviations are used rather than the longer official names. 3917 3918 acorn, alliant, altos, apollo, apple, att, bull, cbm, convergent, 3919 convex, crds, dec, dg, dolphin, elxsi, encore, harris, hitachi, 3920 hp, ibm, intergraph, isi, mips, motorola, ncr, next, ns, omron, 3921 plexus, sequent, sgi, sony, sun, tti, unicom, wrs. 3922 3923 The company name is meaningful only to disambiguate when the rest of 3924the information supplied is insufficient. You can omit it, writing 3925just `CPU-SYSTEM', if it is not needed. For example, `vax-ultrix4.2' 3926is equivalent to `vax-dec-ultrix4.2'. 3927 3928 Here is a list of system types: 3929 3930 386bsd, aix, acis, amigaos, aos, aout, aux, bosx, bsd, clix, coff, 3931 ctix, cxux, dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, 3932 genix, gnu, linux, linux-gnu, hiux, hpux, iris, irix, isc, luna, 3933 lynxos, mach, minix, msdos, mvs, netbsd, newsos, nindy, ns, osf, 3934 osfrose, ptx, riscix, riscos, rtu, sco, sim, solaris, sunos, sym, 3935 sysv, udi, ultrix, unicos, uniplus, unos, vms, vsta, vxworks, 3936 winnt, xenix. 3937 3938You can omit the system type; then `configure' guesses the operating 3939system from the CPU and company. 3940 3941 You can add a version number to the system type; this may or may not 3942make a difference. For example, you can write `bsd4.3' or `bsd4.4' to 3943distinguish versions of BSD. In practice, the version number is most 3944needed for `sysv3' and `sysv4', which are often treated differently. 3945 3946 `linux-gnu' is the canonical name for the GNU/Linux target; however 3947GCC will also accept `linux'. The version of the kernel in use is not 3948relevant on these systems. A suffix such as `libc1' or `aout' 3949distinguishes major versions of the C library; all of the suffixed 3950versions are obsolete. 3951 3952 If you specify an impossible combination such as `i860-dg-vms', then 3953you may get an error message from `configure', or it may ignore part of 3954the information and do the best it can with the rest. `configure' 3955always prints the canonical name for the alternative that it used. GCC 3956does not support all possible alternatives. 3957 3958 Often a particular model of machine has a name. Many machine names 3959are recognized as aliases for CPU/company combinations. Thus, the 3960machine name `sun3', mentioned above, is an alias for `m68k-sun'. 3961Sometimes we accept a company name as a machine name, when the name is 3962popularly used for a particular machine. Here is a table of the known 3963machine names: 3964 3965 3300, 3b1, 3bN, 7300, altos3068, altos, apollo68, att-7300, 3966 balance, convex-cN, crds, decstation-3100, decstation, delta, 3967 encore, fx2800, gmicro, hp7NN, hp8NN, hp9k2NN, hp9k3NN, hp9k7NN, 3968 hp9k8NN, iris4d, iris, isi68, m3230, magnum, merlin, miniframe, 3969 mmax, news-3600, news800, news, next, pbd, pc532, pmax, powerpc, 3970 powerpcle, ps2, risc-news, rtpc, sun2, sun386i, sun386, sun3, 3971 sun4, symmetry, tower-32, tower. 3972 3973Remember that a machine name specifies both the cpu type and the company 3974name. If you want to install your own homemade configuration files, 3975you can use `local' as the company name to access them. If you use 3976configuration `CPU-local', the configuration name without the cpu prefix 3977is used to form the configuration file names. 3978 3979 Thus, if you specify `m68k-local', configuration uses files 3980`m68k.md', `local.h', `m68k.c', `xm-local.h', `t-local', and `x-local', 3981all in the directory `config/m68k'. 3982 3983 3984File: gccinstall.info, Node: GNU Free Documentation License, Next: Concept Index, Prev: Old, Up: Top 3985 3986GNU Free Documentation License 3987****************************** 3988 3989 Version 1.2, November 2002 3990 3991 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 3992 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 3993 3994 Everyone is permitted to copy and distribute verbatim copies 3995 of this license document, but changing it is not allowed. 3996 3997 0. PREAMBLE 3998 3999 The purpose of this License is to make a manual, textbook, or other 4000 functional and useful document "free" in the sense of freedom: to 4001 assure everyone the effective freedom to copy and redistribute it, 4002 with or without modifying it, either commercially or 4003 noncommercially. Secondarily, this License preserves for the 4004 author and publisher a way to get credit for their work, while not 4005 being considered responsible for modifications made by others. 4006 4007 This License is a kind of "copyleft", which means that derivative 4008 works of the document must themselves be free in the same sense. 4009 It complements the GNU General Public License, which is a copyleft 4010 license designed for free software. 4011 4012 We have designed this License in order to use it for manuals for 4013 free software, because free software needs free documentation: a 4014 free program should come with manuals providing the same freedoms 4015 that the software does. But this License is not limited to 4016 software manuals; it can be used for any textual work, regardless 4017 of subject matter or whether it is published as a printed book. 4018 We recommend this License principally for works whose purpose is 4019 instruction or reference. 4020 4021 1. APPLICABILITY AND DEFINITIONS 4022 4023 This License applies to any manual or other work, in any medium, 4024 that contains a notice placed by the copyright holder saying it 4025 can be distributed under the terms of this License. Such a notice 4026 grants a world-wide, royalty-free license, unlimited in duration, 4027 to use that work under the conditions stated herein. The 4028 "Document", below, refers to any such manual or work. Any member 4029 of the public is a licensee, and is addressed as "you". You 4030 accept the license if you copy, modify or distribute the work in a 4031 way requiring permission under copyright law. 4032 4033 A "Modified Version" of the Document means any work containing the 4034 Document or a portion of it, either copied verbatim, or with 4035 modifications and/or translated into another language. 4036 4037 A "Secondary Section" is a named appendix or a front-matter section 4038 of the Document that deals exclusively with the relationship of the 4039 publishers or authors of the Document to the Document's overall 4040 subject (or to related matters) and contains nothing that could 4041 fall directly within that overall subject. (Thus, if the Document 4042 is in part a textbook of mathematics, a Secondary Section may not 4043 explain any mathematics.) The relationship could be a matter of 4044 historical connection with the subject or with related matters, or 4045 of legal, commercial, philosophical, ethical or political position 4046 regarding them. 4047 4048 The "Invariant Sections" are certain Secondary Sections whose 4049 titles are designated, as being those of Invariant Sections, in 4050 the notice that says that the Document is released under this 4051 License. If a section does not fit the above definition of 4052 Secondary then it is not allowed to be designated as Invariant. 4053 The Document may contain zero Invariant Sections. If the Document 4054 does not identify any Invariant Sections then there are none. 4055 4056 The "Cover Texts" are certain short passages of text that are 4057 listed, as Front-Cover Texts or Back-Cover Texts, in the notice 4058 that says that the Document is released under this License. A 4059 Front-Cover Text may be at most 5 words, and a Back-Cover Text may 4060 be at most 25 words. 4061 4062 A "Transparent" copy of the Document means a machine-readable copy, 4063 represented in a format whose specification is available to the 4064 general public, that is suitable for revising the document 4065 straightforwardly with generic text editors or (for images 4066 composed of pixels) generic paint programs or (for drawings) some 4067 widely available drawing editor, and that is suitable for input to 4068 text formatters or for automatic translation to a variety of 4069 formats suitable for input to text formatters. A copy made in an 4070 otherwise Transparent file format whose markup, or absence of 4071 markup, has been arranged to thwart or discourage subsequent 4072 modification by readers is not Transparent. An image format is 4073 not Transparent if used for any substantial amount of text. A 4074 copy that is not "Transparent" is called "Opaque". 4075 4076 Examples of suitable formats for Transparent copies include plain 4077 ASCII without markup, Texinfo input format, LaTeX input format, 4078 SGML or XML using a publicly available DTD, and 4079 standard-conforming simple HTML, PostScript or PDF designed for 4080 human modification. Examples of transparent image formats include 4081 PNG, XCF and JPG. Opaque formats include proprietary formats that 4082 can be read and edited only by proprietary word processors, SGML or 4083 XML for which the DTD and/or processing tools are not generally 4084 available, and the machine-generated HTML, PostScript or PDF 4085 produced by some word processors for output purposes only. 4086 4087 The "Title Page" means, for a printed book, the title page itself, 4088 plus such following pages as are needed to hold, legibly, the 4089 material this License requires to appear in the title page. For 4090 works in formats which do not have any title page as such, "Title 4091 Page" means the text near the most prominent appearance of the 4092 work's title, preceding the beginning of the body of the text. 4093 4094 A section "Entitled XYZ" means a named subunit of the Document 4095 whose title either is precisely XYZ or contains XYZ in parentheses 4096 following text that translates XYZ in another language. (Here XYZ 4097 stands for a specific section name mentioned below, such as 4098 "Acknowledgements", "Dedications", "Endorsements", or "History".) 4099 To "Preserve the Title" of such a section when you modify the 4100 Document means that it remains a section "Entitled XYZ" according 4101 to this definition. 4102 4103 The Document may include Warranty Disclaimers next to the notice 4104 which states that this License applies to the Document. These 4105 Warranty Disclaimers are considered to be included by reference in 4106 this License, but only as regards disclaiming warranties: any other 4107 implication that these Warranty Disclaimers may have is void and 4108 has no effect on the meaning of this License. 4109 4110 2. VERBATIM COPYING 4111 4112 You may copy and distribute the Document in any medium, either 4113 commercially or noncommercially, provided that this License, the 4114 copyright notices, and the license notice saying this License 4115 applies to the Document are reproduced in all copies, and that you 4116 add no other conditions whatsoever to those of this License. You 4117 may not use technical measures to obstruct or control the reading 4118 or further copying of the copies you make or distribute. However, 4119 you may accept compensation in exchange for copies. If you 4120 distribute a large enough number of copies you must also follow 4121 the conditions in section 3. 4122 4123 You may also lend copies, under the same conditions stated above, 4124 and you may publicly display copies. 4125 4126 3. COPYING IN QUANTITY 4127 4128 If you publish printed copies (or copies in media that commonly 4129 have printed covers) of the Document, numbering more than 100, and 4130 the Document's license notice requires Cover Texts, you must 4131 enclose the copies in covers that carry, clearly and legibly, all 4132 these Cover Texts: Front-Cover Texts on the front cover, and 4133 Back-Cover Texts on the back cover. Both covers must also clearly 4134 and legibly identify you as the publisher of these copies. The 4135 front cover must present the full title with all words of the 4136 title equally prominent and visible. You may add other material 4137 on the covers in addition. Copying with changes limited to the 4138 covers, as long as they preserve the title of the Document and 4139 satisfy these conditions, can be treated as verbatim copying in 4140 other respects. 4141 4142 If the required texts for either cover are too voluminous to fit 4143 legibly, you should put the first ones listed (as many as fit 4144 reasonably) on the actual cover, and continue the rest onto 4145 adjacent pages. 4146 4147 If you publish or distribute Opaque copies of the Document 4148 numbering more than 100, you must either include a 4149 machine-readable Transparent copy along with each Opaque copy, or 4150 state in or with each Opaque copy a computer-network location from 4151 which the general network-using public has access to download 4152 using public-standard network protocols a complete Transparent 4153 copy of the Document, free of added material. If you use the 4154 latter option, you must take reasonably prudent steps, when you 4155 begin distribution of Opaque copies in quantity, to ensure that 4156 this Transparent copy will remain thus accessible at the stated 4157 location until at least one year after the last time you 4158 distribute an Opaque copy (directly or through your agents or 4159 retailers) of that edition to the public. 4160 4161 It is requested, but not required, that you contact the authors of 4162 the Document well before redistributing any large number of 4163 copies, to give them a chance to provide you with an updated 4164 version of the Document. 4165 4166 4. MODIFICATIONS 4167 4168 You may copy and distribute a Modified Version of the Document 4169 under the conditions of sections 2 and 3 above, provided that you 4170 release the Modified Version under precisely this License, with 4171 the Modified Version filling the role of the Document, thus 4172 licensing distribution and modification of the Modified Version to 4173 whoever possesses a copy of it. In addition, you must do these 4174 things in the Modified Version: 4175 4176 A. Use in the Title Page (and on the covers, if any) a title 4177 distinct from that of the Document, and from those of 4178 previous versions (which should, if there were any, be listed 4179 in the History section of the Document). You may use the 4180 same title as a previous version if the original publisher of 4181 that version gives permission. 4182 4183 B. List on the Title Page, as authors, one or more persons or 4184 entities responsible for authorship of the modifications in 4185 the Modified Version, together with at least five of the 4186 principal authors of the Document (all of its principal 4187 authors, if it has fewer than five), unless they release you 4188 from this requirement. 4189 4190 C. State on the Title page the name of the publisher of the 4191 Modified Version, as the publisher. 4192 4193 D. Preserve all the copyright notices of the Document. 4194 4195 E. Add an appropriate copyright notice for your modifications 4196 adjacent to the other copyright notices. 4197 4198 F. Include, immediately after the copyright notices, a license 4199 notice giving the public permission to use the Modified 4200 Version under the terms of this License, in the form shown in 4201 the Addendum below. 4202 4203 G. Preserve in that license notice the full lists of Invariant 4204 Sections and required Cover Texts given in the Document's 4205 license notice. 4206 4207 H. Include an unaltered copy of this License. 4208 4209 I. Preserve the section Entitled "History", Preserve its Title, 4210 and add to it an item stating at least the title, year, new 4211 authors, and publisher of the Modified Version as given on 4212 the Title Page. If there is no section Entitled "History" in 4213 the Document, create one stating the title, year, authors, 4214 and publisher of the Document as given on its Title Page, 4215 then add an item describing the Modified Version as stated in 4216 the previous sentence. 4217 4218 J. Preserve the network location, if any, given in the Document 4219 for public access to a Transparent copy of the Document, and 4220 likewise the network locations given in the Document for 4221 previous versions it was based on. These may be placed in 4222 the "History" section. You may omit a network location for a 4223 work that was published at least four years before the 4224 Document itself, or if the original publisher of the version 4225 it refers to gives permission. 4226 4227 K. For any section Entitled "Acknowledgements" or "Dedications", 4228 Preserve the Title of the section, and preserve in the 4229 section all the substance and tone of each of the contributor 4230 acknowledgements and/or dedications given therein. 4231 4232 L. Preserve all the Invariant Sections of the Document, 4233 unaltered in their text and in their titles. Section numbers 4234 or the equivalent are not considered part of the section 4235 titles. 4236 4237 M. Delete any section Entitled "Endorsements". Such a section 4238 may not be included in the Modified Version. 4239 4240 N. Do not retitle any existing section to be Entitled 4241 "Endorsements" or to conflict in title with any Invariant 4242 Section. 4243 4244 O. Preserve any Warranty Disclaimers. 4245 4246 If the Modified Version includes new front-matter sections or 4247 appendices that qualify as Secondary Sections and contain no 4248 material copied from the Document, you may at your option 4249 designate some or all of these sections as invariant. To do this, 4250 add their titles to the list of Invariant Sections in the Modified 4251 Version's license notice. These titles must be distinct from any 4252 other section titles. 4253 4254 You may add a section Entitled "Endorsements", provided it contains 4255 nothing but endorsements of your Modified Version by various 4256 parties--for example, statements of peer review or that the text 4257 has been approved by an organization as the authoritative 4258 definition of a standard. 4259 4260 You may add a passage of up to five words as a Front-Cover Text, 4261 and a passage of up to 25 words as a Back-Cover Text, to the end 4262 of the list of Cover Texts in the Modified Version. Only one 4263 passage of Front-Cover Text and one of Back-Cover Text may be 4264 added by (or through arrangements made by) any one entity. If the 4265 Document already includes a cover text for the same cover, 4266 previously added by you or by arrangement made by the same entity 4267 you are acting on behalf of, you may not add another; but you may 4268 replace the old one, on explicit permission from the previous 4269 publisher that added the old one. 4270 4271 The author(s) and publisher(s) of the Document do not by this 4272 License give permission to use their names for publicity for or to 4273 assert or imply endorsement of any Modified Version. 4274 4275 5. COMBINING DOCUMENTS 4276 4277 You may combine the Document with other documents released under 4278 this License, under the terms defined in section 4 above for 4279 modified versions, provided that you include in the combination 4280 all of the Invariant Sections of all of the original documents, 4281 unmodified, and list them all as Invariant Sections of your 4282 combined work in its license notice, and that you preserve all 4283 their Warranty Disclaimers. 4284 4285 The combined work need only contain one copy of this License, and 4286 multiple identical Invariant Sections may be replaced with a single 4287 copy. If there are multiple Invariant Sections with the same name 4288 but different contents, make the title of each such section unique 4289 by adding at the end of it, in parentheses, the name of the 4290 original author or publisher of that section if known, or else a 4291 unique number. Make the same adjustment to the section titles in 4292 the list of Invariant Sections in the license notice of the 4293 combined work. 4294 4295 In the combination, you must combine any sections Entitled 4296 "History" in the various original documents, forming one section 4297 Entitled "History"; likewise combine any sections Entitled 4298 "Acknowledgements", and any sections Entitled "Dedications". You 4299 must delete all sections Entitled "Endorsements." 4300 4301 6. COLLECTIONS OF DOCUMENTS 4302 4303 You may make a collection consisting of the Document and other 4304 documents released under this License, and replace the individual 4305 copies of this License in the various documents with a single copy 4306 that is included in the collection, provided that you follow the 4307 rules of this License for verbatim copying of each of the 4308 documents in all other respects. 4309 4310 You may extract a single document from such a collection, and 4311 distribute it individually under this License, provided you insert 4312 a copy of this License into the extracted document, and follow 4313 this License in all other respects regarding verbatim copying of 4314 that document. 4315 4316 7. AGGREGATION WITH INDEPENDENT WORKS 4317 4318 A compilation of the Document or its derivatives with other 4319 separate and independent documents or works, in or on a volume of 4320 a storage or distribution medium, is called an "aggregate" if the 4321 copyright resulting from the compilation is not used to limit the 4322 legal rights of the compilation's users beyond what the individual 4323 works permit. When the Document is included in an aggregate, this 4324 License does not apply to the other works in the aggregate which 4325 are not themselves derivative works of the Document. 4326 4327 If the Cover Text requirement of section 3 is applicable to these 4328 copies of the Document, then if the Document is less than one half 4329 of the entire aggregate, the Document's Cover Texts may be placed 4330 on covers that bracket the Document within the aggregate, or the 4331 electronic equivalent of covers if the Document is in electronic 4332 form. Otherwise they must appear on printed covers that bracket 4333 the whole aggregate. 4334 4335 8. TRANSLATION 4336 4337 Translation is considered a kind of modification, so you may 4338 distribute translations of the Document under the terms of section 4339 4. Replacing Invariant Sections with translations requires special 4340 permission from their copyright holders, but you may include 4341 translations of some or all Invariant Sections in addition to the 4342 original versions of these Invariant Sections. You may include a 4343 translation of this License, and all the license notices in the 4344 Document, and any Warranty Disclaimers, provided that you also 4345 include the original English version of this License and the 4346 original versions of those notices and disclaimers. In case of a 4347 disagreement between the translation and the original version of 4348 this License or a notice or disclaimer, the original version will 4349 prevail. 4350 4351 If a section in the Document is Entitled "Acknowledgements", 4352 "Dedications", or "History", the requirement (section 4) to 4353 Preserve its Title (section 1) will typically require changing the 4354 actual title. 4355 4356 9. TERMINATION 4357 4358 You may not copy, modify, sublicense, or distribute the Document 4359 except as expressly provided for under this License. Any other 4360 attempt to copy, modify, sublicense or distribute the Document is 4361 void, and will automatically terminate your rights under this 4362 License. However, parties who have received copies, or rights, 4363 from you under this License will not have their licenses 4364 terminated so long as such parties remain in full compliance. 4365 4366 10. FUTURE REVISIONS OF THIS LICENSE 4367 4368 The Free Software Foundation may publish new, revised versions of 4369 the GNU Free Documentation License from time to time. Such new 4370 versions will be similar in spirit to the present version, but may 4371 differ in detail to address new problems or concerns. See 4372 `http://www.gnu.org/copyleft/'. 4373 4374 Each version of the License is given a distinguishing version 4375 number. If the Document specifies that a particular numbered 4376 version of this License "or any later version" applies to it, you 4377 have the option of following the terms and conditions either of 4378 that specified version or of any later version that has been 4379 published (not as a draft) by the Free Software Foundation. If 4380 the Document does not specify a version number of this License, 4381 you may choose any version ever published (not as a draft) by the 4382 Free Software Foundation. 4383 4384ADDENDUM: How to use this License for your documents 4385==================================================== 4386 4387To use this License in a document you have written, include a copy of 4388the License in the document and put the following copyright and license 4389notices just after the title page: 4390 4391 Copyright (C) YEAR YOUR NAME. 4392 Permission is granted to copy, distribute and/or modify this document 4393 under the terms of the GNU Free Documentation License, Version 1.2 4394 or any later version published by the Free Software Foundation; 4395 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover 4396 Texts. A copy of the license is included in the section entitled ``GNU 4397 Free Documentation License''. 4398 4399 If you have Invariant Sections, Front-Cover Texts and Back-Cover 4400Texts, replace the "with...Texts." line with this: 4401 4402 with the Invariant Sections being LIST THEIR TITLES, with 4403 the Front-Cover Texts being LIST, and with the Back-Cover Texts 4404 being LIST. 4405 4406 If you have Invariant Sections without Cover Texts, or some other 4407combination of the three, merge those two alternatives to suit the 4408situation. 4409 4410 If your document contains nontrivial examples of program code, we 4411recommend releasing these examples in parallel under your choice of 4412free software license, such as the GNU General Public License, to 4413permit their use in free software. 4414 4415 4416File: gccinstall.info, Node: Concept Index, Prev: GNU Free Documentation License, Up: Top 4417 4418Concept Index 4419************* 4420 4421[index] 4422* Menu: 4423 4424* Binaries: Binaries. (line 6) 4425* Configuration: Configuration. (line 6) 4426* configurations supported by GCC: Configurations. (line 6) 4427* Downloading GCC: Downloading the source. 4428 (line 6) 4429* Downloading the Source: Downloading the source. 4430 (line 6) 4431* FDL, GNU Free Documentation License: GNU Free Documentation License. 4432 (line 6) 4433* Host specific installation: Specific. (line 6) 4434* Installing GCC: Binaries: Binaries. (line 6) 4435* Installing GCC: Building: Building. (line 6) 4436* Installing GCC: Configuration: Configuration. (line 6) 4437* Installing GCC: Testing: Testing. (line 6) 4438* Prerequisites: Prerequisites. (line 6) 4439* Specific: Specific. (line 6) 4440* Specific installation notes: Specific. (line 6) 4441* Target specific installation: Specific. (line 6) 4442* Target specific installation notes: Specific. (line 6) 4443* Testing: Testing. (line 6) 4444* Testsuite: Testing. (line 6) 4445 4446 4447 4448Tag Table: 4449Node: Top1989 4450Node: Installing GCC2547 4451Node: Prerequisites4062 4452Node: Downloading the source13724 4453Node: Configuration15661 4454Ref: with-gnu-as29803 4455Ref: with-as30701 4456Ref: with-gnu-ld32114 4457Node: Building75590 4458Node: Testing90901 4459Node: Final install98681 4460Node: Binaries103911 4461Node: Specific105415 4462Ref: alpha-x-x105921 4463Ref: alpha-dec-osf106410 4464Ref: arc-x-elf108711 4465Ref: arm-x-elf108811 4466Ref: avr109031 4467Ref: bfin109673 4468Ref: cris109915 4469Ref: crx110731 4470Ref: dos111394 4471Ref: x-x-freebsd111717 4472Ref: h8300-hms113530 4473Ref: hppa-hp-hpux113882 4474Ref: hppa-hp-hpux10116253 4475Ref: hppa-hp-hpux11116666 4476Ref: x-x-linux-gnu122325 4477Ref: ix86-x-linux122518 4478Ref: ix86-x-solaris289122831 4479Ref: ix86-x-solaris210123677 4480Ref: ia64-x-linux124907 4481Ref: ia64-x-hpux125677 4482Ref: x-ibm-aix126232 4483Ref: iq2000-x-elf132491 4484Ref: lm32-x-elf132631 4485Ref: lm32-x-uclinux132735 4486Ref: m32c-x-elf132863 4487Ref: m32r-x-elf132965 4488Ref: m6811-elf133067 4489Ref: m6812-elf133217 4490Ref: m68k-x-x133367 4491Ref: m68k-x-uclinux134339 4492Ref: mep-x-elf134702 4493Ref: mips-x-x134812 4494Ref: mips-sgi-irix5137489 4495Ref: mips-sgi-irix6138755 4496Ref: moxie-x-elf142086 4497Ref: powerpc-x-x142206 4498Ref: powerpc-x-darwin142411 4499Ref: powerpc-x-elf142958 4500Ref: powerpc-x-linux-gnu143043 4501Ref: powerpc-x-netbsd143138 4502Ref: powerpc-x-eabisim143226 4503Ref: powerpc-x-eabi143352 4504Ref: powerpcle-x-elf143428 4505Ref: powerpcle-x-eabisim143520 4506Ref: powerpcle-x-eabi143653 4507Ref: rx-x-elf143736 4508Ref: s390-x-linux143935 4509Ref: s390x-x-linux144007 4510Ref: s390x-ibm-tpf144094 4511Ref: x-x-solaris2144225 4512Ref: sparc-sun-solaris2148037 4513Ref: sparc-sun-solaris27150763 4514Ref: sparc-sun-solaris210153321 4515Ref: sparc-x-linux153697 4516Ref: sparc64-x-solaris2153922 4517Ref: sparcv9-x-solaris2154564 4518Ref: x-x-vxworks154651 4519Ref: x86-64-x-x156173 4520Ref: xtensa-x-elf156501 4521Ref: xtensa-x-linux157172 4522Ref: windows157513 4523Ref: x-x-cygwin159470 4524Ref: x-x-interix160023 4525Ref: x-x-mingw32160389 4526Ref: older160615 4527Ref: elf162732 4528Node: Old162990 4529Node: Configurations166127 4530Node: GNU Free Documentation License170109 4531Node: Concept Index192525 4532 4533End Tag Table 4534