Mercurial > hg > CbC > CbC_gcc
comparison gcc/doc/install.texi @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 \input texinfo.tex @c -*-texinfo-*- | 1 \input texinfo.tex @c -*-texinfo-*- |
2 @c @ifnothtml | 2 @c @ifnothtml |
3 @c %**start of header | 3 @c %**start of header |
4 @setfilename gccinstall.info | 4 @setfilename gccinstall.info |
5 @settitle Installing GCC | |
6 @setchapternewpage odd | 5 @setchapternewpage odd |
7 @c %**end of header | 6 @c %**end of header |
8 @c @end ifnothtml | 7 @c @end ifnothtml |
9 | 8 |
10 @include gcc-common.texi | 9 @include gcc-common.texi |
42 @end ifset | 41 @end ifset |
43 @ifset gfdlhtml | 42 @ifset gfdlhtml |
44 @settitle Installing GCC: GNU Free Documentation License | 43 @settitle Installing GCC: GNU Free Documentation License |
45 @end ifset | 44 @end ifset |
46 | 45 |
47 @c Copyright (C) 1988-2018 Free Software Foundation, Inc. | 46 @c Copyright (C) 1988-2020 Free Software Foundation, Inc. |
48 @c *** Converted to texinfo by Dean Wakerley, dean@wakerley.com | 47 @c *** Converted to texinfo by Dean Wakerley, dean@wakerley.com |
49 | 48 |
50 @c IMPORTANT: whenever you modify this file, run `install.texi2html' to | 49 @c IMPORTANT: whenever you modify this file, run `install.texi2html' to |
51 @c test the generation of HTML documents for the gcc.gnu.org web pages. | 50 @c test the generation of HTML documents for the gcc.gnu.org web pages. |
52 @c | 51 @c |
67 @set gfdlhtml | 66 @set gfdlhtml |
68 @end ifnothtml | 67 @end ifnothtml |
69 | 68 |
70 @c Part 2 Summary Description and Copyright | 69 @c Part 2 Summary Description and Copyright |
71 @copying | 70 @copying |
72 Copyright @copyright{} 1988-2018 Free Software Foundation, Inc. | 71 Copyright @copyright{} 1988-2020 Free Software Foundation, Inc. |
73 @sp 1 | 72 @sp 1 |
74 Permission is granted to copy, distribute and/or modify this document | 73 Permission is granted to copy, distribute and/or modify this document |
75 under the terms of the GNU Free Documentation License, Version 1.3 or | 74 under the terms of the GNU Free Documentation License, Version 1.3 or |
76 any later version published by the Free Software Foundation; with no | 75 any later version published by the Free Software Foundation; with no |
77 Invariant Sections, the Front-Cover texts being (a) (see below), and | 76 Invariant Sections, the Front-Cover texts being (a) (see below), and |
259 | 258 |
260 In order to build GCC, the C standard library and headers must be present | 259 In order to build GCC, the C standard library and headers must be present |
261 for all target variants for which target libraries will be built (and not | 260 for all target variants for which target libraries will be built (and not |
262 only the variant of the host C++ compiler). | 261 only the variant of the host C++ compiler). |
263 | 262 |
264 This affects the popular @samp{x86_64-unknown-linux-gnu} platform (among | 263 This affects the popular @samp{x86_64-pc-linux-gnu} platform (among |
265 other multilib targets), for which 64-bit (@samp{x86_64}) and 32-bit | 264 other multilib targets), for which 64-bit (@samp{x86_64}) and 32-bit |
266 (@samp{i386}) libc headers are usually packaged separately. If you do a | 265 (@samp{i386}) libc headers are usually packaged separately. If you do a |
267 build of a native compiler on @samp{x86_64-unknown-linux-gnu}, make sure you | 266 build of a native compiler on @samp{x86_64-pc-linux-gnu}, make sure you |
268 either have the 32-bit libc developer package properly installed (the exact | 267 either have the 32-bit libc developer package properly installed (the exact |
269 name of the package depends on your distro) or you must build GCC as a | 268 name of the package depends on your distro) or you must build GCC as a |
270 64-bit only compiler by configuring with the option | 269 64-bit only compiler by configuring with the option |
271 @option{--disable-multilib}. Otherwise, you may encounter an error such as | 270 @option{--disable-multilib}. Otherwise, you may encounter an error such as |
272 @samp{fatal error: gnu/stubs-32.h: No such file} | 271 @samp{fatal error: gnu/stubs-32.h: No such file} |
273 | 272 |
274 @item GNAT | 273 @item @anchor{GNAT-prerequisite}GNAT |
275 | 274 |
276 In order to build the Ada compiler (GNAT) you must already have GNAT | 275 In order to build GNAT, the Ada compiler, you need a working GNAT |
277 installed because portions of the Ada frontend are written in Ada (with | 276 compiler (GCC version 4.7 or later). |
278 GNAT extensions.) Refer to the Ada installation instructions for more | 277 |
279 specific information. | 278 This includes GNAT tools such as @command{gnatmake} and |
279 @command{gnatlink}, since the Ada front end is written in Ada and | |
280 uses some GNAT-specific extensions. | |
281 | |
282 In order to build a cross compiler, it is strongly recommended to install | |
283 the new compiler as native first, and then use it to build the cross | |
284 compiler. Other native compiler versions may work but this is not guaranteed and | |
285 will typically fail with hard to understand compilation errors during the | |
286 build. | |
287 | |
288 Similarly, it is strongly recommended to use an older version of GNAT to build | |
289 GNAT. More recent versions of GNAT than the version built are not guaranteed | |
290 to work and will often fail during the build with compilation errors. | |
291 | |
292 Note that @command{configure} does not test whether the GNAT installation works | |
293 and has a sufficiently recent version; if too old a GNAT version is | |
294 installed and @option{--enable-languages=ada} is used, the build will fail. | |
295 | |
296 @env{ADA_INCLUDE_PATH} and @env{ADA_OBJECT_PATH} environment variables | |
297 must not be set when building the Ada compiler, the Ada tools, or the | |
298 Ada runtime libraries. You can check that your build environment is clean | |
299 by verifying that @samp{gnatls -v} lists only one explicit path in each | |
300 section. | |
280 | 301 |
281 @item A ``working'' POSIX compatible shell, or GNU bash | 302 @item A ``working'' POSIX compatible shell, or GNU bash |
282 | 303 |
283 Necessary when running @command{configure} because some | 304 Necessary when running @command{configure} because some |
284 @command{/bin/sh} shells have bugs and may crash when configuring the | 305 @command{/bin/sh} shells have bugs and may crash when configuring the |
310 | 331 |
311 @item gzip version 1.2.4 (or later) or | 332 @item gzip version 1.2.4 (or later) or |
312 @itemx bzip2 version 1.0.2 (or later) | 333 @itemx bzip2 version 1.0.2 (or later) |
313 | 334 |
314 Necessary to uncompress GCC @command{tar} files when source code is | 335 Necessary to uncompress GCC @command{tar} files when source code is |
315 obtained via FTP mirror sites. | 336 obtained via HTTPS mirror sites. |
316 | 337 |
317 @item GNU make version 3.80 (or later) | 338 @item GNU make version 3.80 (or later) |
318 | 339 |
319 You must have GNU make installed to build GCC@. | 340 You must have GNU make installed to build GCC@. |
320 | 341 |
333 and up works. | 354 and up works. |
334 | 355 |
335 Necessary when regenerating @file{Makefile} dependencies in libiberty. | 356 Necessary when regenerating @file{Makefile} dependencies in libiberty. |
336 Necessary when regenerating @file{libiberty/functions.texi}. | 357 Necessary when regenerating @file{libiberty/functions.texi}. |
337 Necessary when generating manpages from Texinfo manuals. | 358 Necessary when generating manpages from Texinfo manuals. |
338 Used by various scripts to generate some files included in SVN (mainly | 359 Used by various scripts to generate some files included in the source |
339 Unicode-related and rarely changing) from source tables. | 360 repository (mainly Unicode-related and rarely changing) from source |
361 tables. | |
340 | 362 |
341 Used by @command{automake}. | 363 Used by @command{automake}. |
342 | 364 |
343 @end table | 365 @end table |
344 | 366 |
361 @option{--with-gmp} configure option. See also @option{--with-gmp-lib} | 383 @option{--with-gmp} configure option. See also @option{--with-gmp-lib} |
362 and @option{--with-gmp-include}. | 384 and @option{--with-gmp-include}. |
363 The in-tree build is only supported with the GMP version that | 385 The in-tree build is only supported with the GMP version that |
364 download_prerequisites installs. | 386 download_prerequisites installs. |
365 | 387 |
366 @item MPFR Library version 2.4.2 (or later) | 388 @item MPFR Library version 3.1.0 (or later) |
367 | 389 |
368 Necessary to build GCC@. It can be downloaded from | 390 Necessary to build GCC@. It can be downloaded from |
369 @uref{https://www.mpfr.org}. If an MPFR source distribution is found | 391 @uref{https://www.mpfr.org}. If an MPFR source distribution is found |
370 in a subdirectory of your GCC sources named @file{mpfr}, it will be | 392 in a subdirectory of your GCC sources named @file{mpfr}, it will be |
371 built together with GCC. Alternatively, if MPFR is already installed | 393 built together with GCC. Alternatively, if MPFR is already installed |
373 @option{--with-mpfr} configure option should be used. See also | 395 @option{--with-mpfr} configure option should be used. See also |
374 @option{--with-mpfr-lib} and @option{--with-mpfr-include}. | 396 @option{--with-mpfr-lib} and @option{--with-mpfr-include}. |
375 The in-tree build is only supported with the MPFR version that | 397 The in-tree build is only supported with the MPFR version that |
376 download_prerequisites installs. | 398 download_prerequisites installs. |
377 | 399 |
378 @item MPC Library version 0.8.1 (or later) | 400 @item MPC Library version 1.0.1 (or later) |
379 | 401 |
380 Necessary to build GCC@. It can be downloaded from | 402 Necessary to build GCC@. It can be downloaded from |
381 @uref{http://www.multiprecision.org/mpc/}. If an MPC source distribution | 403 @uref{http://www.multiprecision.org/mpc/}. If an MPC source distribution |
382 is found in a subdirectory of your GCC sources named @file{mpc}, it | 404 is found in a subdirectory of your GCC sources named @file{mpc}, it |
383 will be built together with GCC. Alternatively, if MPC is already | 405 will be built together with GCC. Alternatively, if MPC is already |
388 download_prerequisites installs. | 410 download_prerequisites installs. |
389 | 411 |
390 @item isl Library version 0.15 or later. | 412 @item isl Library version 0.15 or later. |
391 | 413 |
392 Necessary to build GCC with the Graphite loop optimizations. | 414 Necessary to build GCC with the Graphite loop optimizations. |
393 It can be downloaded from @uref{ftp://gcc.gnu.org/pub/gcc/infrastructure/}. | 415 It can be downloaded from @uref{https://gcc.gnu.org/pub/gcc/infrastructure/}. |
394 If an isl source distribution is found | 416 If an isl source distribution is found |
395 in a subdirectory of your GCC sources named @file{isl}, it will be | 417 in a subdirectory of your GCC sources named @file{isl}, it will be |
396 built together with GCC. Alternatively, the @option{--with-isl} configure | 418 built together with GCC. Alternatively, the @option{--with-isl} configure |
397 option should be used if isl is not installed in your default library | 419 option should be used if isl is not installed in your default library |
398 search path. | 420 search path. |
399 | 421 |
422 @item zstd Library. | |
423 | |
424 Necessary to build GCC with zstd compression used for LTO bytecode. | |
425 The library is searched in your default library patch search. | |
426 Alternatively, the @option{--with-zstd} configure option should be used. | |
427 | |
400 @end table | 428 @end table |
401 | 429 |
402 @heading Tools/packages necessary for modifying GCC | 430 @heading Tools/packages necessary for modifying GCC |
403 @table @asis | 431 @table @asis |
404 @item autoconf version 2.64 | 432 @item autoconf version 2.69 |
405 @itemx GNU m4 version 1.4.6 (or later) | 433 @itemx GNU m4 version 1.4.6 (or later) |
406 | 434 |
407 Necessary when modifying @file{configure.ac}, @file{aclocal.m4}, etc.@: | 435 Necessary when modifying @file{configure.ac}, @file{aclocal.m4}, etc.@: |
408 to regenerate @file{configure} and @file{config.in} files. | 436 to regenerate @file{configure} and @file{config.in} files. |
409 | 437 |
410 @item automake version 1.11.6 | 438 @item automake version 1.15.1 |
411 | 439 |
412 Necessary when modifying a @file{Makefile.am} file to regenerate its | 440 Necessary when modifying a @file{Makefile.am} file to regenerate its |
413 associated @file{Makefile.in}. | 441 associated @file{Makefile.in}. |
414 | 442 |
415 Much of GCC does not use automake, so directly edit the @file{Makefile.in} | 443 Much of GCC does not use automake, so directly edit the @file{Makefile.in} |
416 file. Specifically this applies to the @file{gcc}, @file{intl}, | 444 file. Specifically this applies to the @file{gcc}, @file{intl}, |
417 @file{libcpp}, @file{libiberty}, @file{libobjc} directories as well | 445 @file{libcpp}, @file{libiberty}, @file{libobjc} directories as well |
418 as any of their subdirectories. | 446 as any of their subdirectories. |
419 | 447 |
420 For directories that use automake, GCC requires the latest release in | 448 For directories that use automake, GCC requires the latest release in |
421 the 1.11 series, which is currently 1.11.6. When regenerating a directory | 449 the 1.15 series, which is currently 1.15.1. When regenerating a directory |
422 to a newer version, please update all the directories using an older 1.11 | 450 to a newer version, please update all the directories using an older 1.15 |
423 to the latest released version. | 451 to the latest released version. |
424 | |
425 Note that @command{automake} 1.11.6 is incompatible with | |
426 @command{perl} version 5.6.26. | |
427 | 452 |
428 @item gettext version 0.14.5 (or later) | 453 @item gettext version 0.14.5 (or later) |
429 | 454 |
430 Needed to regenerate @file{gcc.pot}. | 455 Needed to regenerate @file{gcc.pot}. |
431 | 456 |
438 @item DejaGnu 1.4.4 | 463 @item DejaGnu 1.4.4 |
439 @itemx Expect | 464 @itemx Expect |
440 @itemx Tcl | 465 @itemx Tcl |
441 | 466 |
442 Necessary to run the GCC testsuite; see the section on testing for | 467 Necessary to run the GCC testsuite; see the section on testing for |
443 details. Tcl 8.6 has a known regression in RE pattern handling that | 468 details. |
444 make parts of the testsuite fail. See | |
445 @uref{http://core.tcl.tk/tcl/tktview/267b7e2334ee2e9de34c4b00d6e72e2f1997085f} | |
446 for more information. This bug has been fixed in 8.6.1. | |
447 | 469 |
448 @item autogen version 5.5.4 (or later) and | 470 @item autogen version 5.5.4 (or later) and |
449 @itemx guile version 1.4.1 (or later) | 471 @itemx guile version 1.4.1 (or later) |
450 | 472 |
451 Necessary to regenerate @file{fixinc/fixincl.x} from | 473 Necessary to regenerate @file{fixinc/fixincl.x} from |
459 @item Flex version 2.5.4 (or later) | 481 @item Flex version 2.5.4 (or later) |
460 | 482 |
461 Necessary when modifying @file{*.l} files. | 483 Necessary when modifying @file{*.l} files. |
462 | 484 |
463 Necessary to build GCC during development because the generated output | 485 Necessary to build GCC during development because the generated output |
464 files are not included in the SVN repository. They are included in | 486 files are not included in the version-controlled source repository. |
465 releases. | 487 They are included in releases. |
466 | 488 |
467 @item Texinfo version 4.7 (or later) | 489 @item Texinfo version 4.7 (or later) |
468 | 490 |
469 Necessary for running @command{makeinfo} when modifying @file{*.texi} | 491 Necessary for running @command{makeinfo} when modifying @file{*.texi} |
470 files to test your changes. | 492 files to test your changes. |
472 Necessary for running @command{make dvi} or @command{make pdf} to | 494 Necessary for running @command{make dvi} or @command{make pdf} to |
473 create printable documentation in DVI or PDF format. Texinfo version | 495 create printable documentation in DVI or PDF format. Texinfo version |
474 4.8 or later is required for @command{make pdf}. | 496 4.8 or later is required for @command{make pdf}. |
475 | 497 |
476 Necessary to build GCC documentation during development because the | 498 Necessary to build GCC documentation during development because the |
477 generated output files are not included in the SVN repository. They are | 499 generated output files are not included in the repository. They are |
478 included in releases. | 500 included in releases. |
479 | 501 |
480 @item @TeX{} (any working version) | 502 @item @TeX{} (any working version) |
481 | 503 |
482 Necessary for running @command{texi2dvi} and @command{texi2pdf}, which | 504 Necessary for running @command{texi2dvi} and @command{texi2pdf}, which |
486 @item Sphinx version 1.0 (or later) | 508 @item Sphinx version 1.0 (or later) |
487 | 509 |
488 Necessary to regenerate @file{jit/docs/_build/texinfo} from the @file{.rst} | 510 Necessary to regenerate @file{jit/docs/_build/texinfo} from the @file{.rst} |
489 files in the directories below @file{jit/docs}. | 511 files in the directories below @file{jit/docs}. |
490 | 512 |
491 @item SVN (any version) | 513 @item git (any version) |
492 @itemx SSH (any version) | 514 @itemx SSH (any version) |
493 | 515 |
494 Necessary to access the SVN repository. Public releases and weekly | 516 Necessary to access the source repository. Public releases and weekly |
495 snapshots of the development sources are also available via FTP@. | 517 snapshots of the development sources are also available via HTTPS@. |
496 | 518 |
497 @item GNU diffutils version 2.7 (or later) | 519 @item GNU diffutils version 2.7 (or later) |
498 | 520 |
499 Useful when submitting patches for the GCC source code. | 521 Useful when submitting patches for the GCC source code. |
500 | 522 |
524 @chapter Downloading GCC | 546 @chapter Downloading GCC |
525 @end ifnothtml | 547 @end ifnothtml |
526 @cindex Downloading GCC | 548 @cindex Downloading GCC |
527 @cindex Downloading the Source | 549 @cindex Downloading the Source |
528 | 550 |
529 GCC is distributed via @uref{http://gcc.gnu.org/svn.html,,SVN} and FTP | 551 GCC is distributed via @uref{http://gcc.gnu.org/git.html,,git} and via |
530 tarballs compressed with @command{gzip} or | 552 HTTPS as tarballs compressed with @command{gzip} or @command{bzip2}. |
531 @command{bzip2}. | |
532 | 553 |
533 Please refer to the @uref{http://gcc.gnu.org/releases.html,,releases web page} | 554 Please refer to the @uref{http://gcc.gnu.org/releases.html,,releases web page} |
534 for information on how to obtain GCC@. | 555 for information on how to obtain GCC@. |
535 | 556 |
536 The source distribution includes the C, C++, Objective-C, Fortran, | 557 The source distribution includes the C, C++, Objective-C, Fortran, |
584 for both native and cross targets. | 605 for both native and cross targets. |
585 | 606 |
586 We use @var{srcdir} to refer to the toplevel source directory for | 607 We use @var{srcdir} to refer to the toplevel source directory for |
587 GCC; we use @var{objdir} to refer to the toplevel build/object directory. | 608 GCC; we use @var{objdir} to refer to the toplevel build/object directory. |
588 | 609 |
589 If you obtained the sources via SVN, @var{srcdir} must refer to the top | 610 If you obtained the sources by cloning the repository, @var{srcdir} |
590 @file{gcc} directory, the one where the @file{MAINTAINERS} file can be | 611 must refer to the top @file{gcc} directory, the one where the |
591 found, and not its @file{gcc} subdirectory, otherwise the build will fail. | 612 @file{MAINTAINERS} file can be found, and not its @file{gcc} |
613 subdirectory, otherwise the build will fail. | |
592 | 614 |
593 If either @var{srcdir} or @var{objdir} is located on an automounted NFS | 615 If either @var{srcdir} or @var{objdir} is located on an automounted NFS |
594 file system, the shell's built-in @command{pwd} command will return | 616 file system, the shell's built-in @command{pwd} command will return |
595 temporary pathnames. Using these can lead to various sorts of build | 617 temporary pathnames. Using these can lead to various sorts of build |
596 problems. To avoid this issue, set the @env{PWDCMD} environment | 618 problems. To avoid this issue, set the @env{PWDCMD} environment |
919 If a list of packages is given as an argument, build shared libraries | 941 If a list of packages is given as an argument, build shared libraries |
920 only for the listed packages. For other packages, only static libraries | 942 only for the listed packages. For other packages, only static libraries |
921 will be built. Package names currently recognized in the GCC tree are | 943 will be built. Package names currently recognized in the GCC tree are |
922 @samp{libgcc} (also known as @samp{gcc}), @samp{libstdc++} (not | 944 @samp{libgcc} (also known as @samp{gcc}), @samp{libstdc++} (not |
923 @samp{libstdc++-v3}), @samp{libffi}, @samp{zlib}, @samp{boehm-gc}, | 945 @samp{libstdc++-v3}), @samp{libffi}, @samp{zlib}, @samp{boehm-gc}, |
924 @samp{ada}, @samp{libada}, @samp{libgo}, and @samp{libobjc}. | 946 @samp{ada}, @samp{libada}, @samp{libgo}, @samp{libobjc}, and @samp{libphobos}. |
925 Note @samp{libiberty} does not support shared libraries at all. | 947 Note @samp{libiberty} does not support shared libraries at all. |
926 | 948 |
927 Use @option{--disable-shared} to build only static libraries. Note that | 949 Use @option{--disable-shared} to build only static libraries. Note that |
928 @option{--disable-shared} does not accept a list of package names as | 950 @option{--disable-shared} does not accept a list of package names as |
929 argument, only @option{--enable-shared} does. | 951 argument, only @option{--enable-shared} does. |
1064 softfloat, m68881, m68000, m68020. | 1086 softfloat, m68881, m68000, m68020. |
1065 | 1087 |
1066 @item mips*-*-* | 1088 @item mips*-*-* |
1067 single-float, biendian, softfloat. | 1089 single-float, biendian, softfloat. |
1068 | 1090 |
1091 @item msp430-*-* | |
1092 no-exceptions | |
1093 | |
1069 @item powerpc*-*-*, rs6000*-*-* | 1094 @item powerpc*-*-*, rs6000*-*-* |
1070 aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian, | 1095 aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian, |
1071 sysv, aix. | 1096 sysv, aix. |
1072 | 1097 |
1073 @end table | 1098 @end table |
1074 | 1099 |
1075 @item --with-multilib-list=@var{list} | 1100 @item --with-multilib-list=@var{list} |
1076 @itemx --without-multilib-list | 1101 @itemx --without-multilib-list |
1077 Specify what multilibs to build. @var{list} is a comma separated list of | 1102 Specify what multilibs to build. @var{list} is a comma separated list of |
1078 values, possibly consisting of a single value. Currently only implemented | 1103 values, possibly consisting of a single value. Currently only implemented |
1079 for arm*-*-*, riscv*-*-*, sh*-*-* and x86-64-*-linux*. The accepted | 1104 for aarch64*-*-*, arm*-*-*, riscv*-*-*, sh*-*-* and x86-64-*-linux*. The |
1080 values and meaning for each target is given below. | 1105 accepted values and meaning for each target is given below. |
1081 | 1106 |
1082 @table @code | 1107 @table @code |
1108 @item aarch64*-*-* | |
1109 @var{list} is a comma separated list of @code{ilp32}, and @code{lp64} | |
1110 to enable ILP32 and LP64 run-time libraries, respectively. If | |
1111 @var{list} is empty, then there will be no multilibs and only the | |
1112 default run-time library will be built. If @var{list} is | |
1113 @code{default} or --with-multilib-list= is not specified, then the | |
1114 default set of libraries is selected based on the value of | |
1115 @option{--target}. | |
1116 | |
1083 @item arm*-*-* | 1117 @item arm*-*-* |
1084 @var{list} is a comma separated list of @code{aprofile} and @code{rmprofile} | 1118 @var{list} is a comma separated list of @code{aprofile} and |
1085 to build multilibs for A or R and M architecture profiles respectively. Note | 1119 @code{rmprofile} to build multilibs for A or R and M architecture |
1086 that, due to some limitation of the current multilib framework, using the | 1120 profiles respectively. Note that, due to some limitation of the current |
1087 combined @code{aprofile,rmprofile} multilibs selects in some cases a less | 1121 multilib framework, using the combined @code{aprofile,rmprofile} |
1088 optimal multilib than when using the multilib profile for the architecture | 1122 multilibs selects in some cases a less optimal multilib than when using |
1089 targetted. The special value @code{default} is also accepted and is equivalent | 1123 the multilib profile for the architecture targetted. The special value |
1090 to omitting the option, ie. only the default run-time library will be enabled. | 1124 @code{default} is also accepted and is equivalent to omitting the |
1125 option, i.e., only the default run-time library will be enabled. | |
1126 | |
1127 @var{list} may instead contain @code{@@name}, to use the multilib | |
1128 configuration Makefile fragment @file{name} in @file{gcc/config/arm} in | |
1129 the source tree (it is part of the corresponding sources, after all). | |
1130 It is recommended, but not required, that files used for this purpose to | |
1131 be named starting with @file{t-ml-}, to make their intended purpose | |
1132 self-evident, in line with GCC conventions. Such files enable custom, | |
1133 user-chosen multilib lists to be configured. Whether multiple such | |
1134 files can be used together depends on the contents of the supplied | |
1135 files. See @file{gcc/config/arm/t-multilib} and its supplementary | |
1136 @file{gcc/config/arm/t-*profile} files for an example of what such | |
1137 Makefile fragments might look like for this version of GCC. The macros | |
1138 expected to be defined in these fragments are not stable across GCC | |
1139 releases, so make sure they define the @code{MULTILIB}-related macros | |
1140 expected by the version of GCC you are building. | |
1141 @ifnothtml | |
1142 @xref{Target Fragment,, Target Makefile Fragments, gccint, GNU Compiler | |
1143 Collection (GCC) Internals}. | |
1144 @end ifnothtml | |
1145 @ifhtml | |
1146 See ``Target Makefile Fragments'' in the internals manual. | |
1147 @end ifhtml | |
1091 | 1148 |
1092 The table below gives the combination of ISAs, architectures, FPUs and | 1149 The table below gives the combination of ISAs, architectures, FPUs and |
1093 floating-point ABIs for which multilibs are built for each accepted value. | 1150 floating-point ABIs for which multilibs are built for each predefined |
1094 The union of these options is considered when specifying both @code{aprofile} | 1151 profile. The union of these options is considered when specifying both |
1095 and @code{rmprofile}. | 1152 @code{aprofile} and @code{rmprofile}. |
1096 | 1153 |
1097 @multitable @columnfractions .15 .28 .30 | 1154 @multitable @columnfractions .15 .28 .30 |
1098 @item Option @tab aprofile @tab rmprofile | 1155 @item Option @tab aprofile @tab rmprofile |
1099 @item ISAs | 1156 @item ISAs |
1100 @tab @code{-marm} and @code{-mthumb} | 1157 @tab @code{-marm} and @code{-mthumb} |
1254 | 1311 |
1255 @item --disable-tls | 1312 @item --disable-tls |
1256 Specify that the target does not support TLS. | 1313 Specify that the target does not support TLS. |
1257 This is an alias for @option{--enable-tls=no}. | 1314 This is an alias for @option{--enable-tls=no}. |
1258 | 1315 |
1316 @item --disable-tm-clone-registry | |
1317 Disable TM clone registry in libgcc. It is enabled in libgcc by default. | |
1318 This option helps to reduce code size for embedded targets which do | |
1319 not use transactional memory. | |
1320 | |
1259 @item --with-cpu=@var{cpu} | 1321 @item --with-cpu=@var{cpu} |
1260 @itemx --with-cpu-32=@var{cpu} | 1322 @itemx --with-cpu-32=@var{cpu} |
1261 @itemx --with-cpu-64=@var{cpu} | 1323 @itemx --with-cpu-64=@var{cpu} |
1262 Specify which cpu variant the compiler should generate code for by default. | 1324 Specify which cpu variant the compiler should generate code for by default. |
1263 @var{cpu} will be used as the default value of the @option{-mcpu=} switch. | 1325 @var{cpu} will be used as the default value of the @option{-mcpu=} switch. |
1481 with @option{--enable-bootstrap}. | 1543 with @option{--enable-bootstrap}. |
1482 | 1544 |
1483 @item --enable-generated-files-in-srcdir | 1545 @item --enable-generated-files-in-srcdir |
1484 Neither the .c and .h files that are generated from Bison and flex nor the | 1546 Neither the .c and .h files that are generated from Bison and flex nor the |
1485 info manuals and man pages that are built from the .texi files are present | 1547 info manuals and man pages that are built from the .texi files are present |
1486 in the SVN development tree. When building GCC from that development tree, | 1548 in the repository development tree. When building GCC from that development tree, |
1487 or from one of our snapshots, those generated files are placed in your | 1549 or from one of our snapshots, those generated files are placed in your |
1488 build directory, which allows for the source to be in a readonly | 1550 build directory, which allows for the source to be in a readonly |
1489 directory. | 1551 directory. |
1490 | 1552 |
1491 If you configure with @option{--enable-generated-files-in-srcdir} then those | 1553 If you configure with @option{--enable-generated-files-in-srcdir} then those |
1500 subdirectory (@file{@var{libdir}/gcc}) rather than the usual places. In | 1562 subdirectory (@file{@var{libdir}/gcc}) rather than the usual places. In |
1501 addition, @samp{libstdc++}'s include files will be installed into | 1563 addition, @samp{libstdc++}'s include files will be installed into |
1502 @file{@var{libdir}} unless you overruled it by using | 1564 @file{@var{libdir}} unless you overruled it by using |
1503 @option{--with-gxx-include-dir=@var{dirname}}. Using this option is | 1565 @option{--with-gxx-include-dir=@var{dirname}}. Using this option is |
1504 particularly useful if you intend to use several versions of GCC in | 1566 particularly useful if you intend to use several versions of GCC in |
1505 parallel. This is currently supported by @samp{libgfortran}, | 1567 parallel. The default is @samp{yes} for @samp{libada}, and @samp{no} for |
1506 @samp{libstdc++}, and @samp{libobjc}. | 1568 the remaining libraries. |
1507 | 1569 |
1508 @item @anchor{WithAixSoname}--with-aix-soname=@samp{aix}, @samp{svr4} or @samp{both} | 1570 @item @anchor{WithAixSoname}--with-aix-soname=@samp{aix}, @samp{svr4} or @samp{both} |
1509 Traditional AIX shared library versioning (versioned @code{Shared Object} | 1571 Traditional AIX shared library versioning (versioned @code{Shared Object} |
1510 files as members of unversioned @code{Archive Library} files named | 1572 files as members of unversioned @code{Archive Library} files named |
1511 @samp{lib.a}) causes numerous headaches for package managers. However, | 1573 @samp{lib.a}) causes numerous headaches for package managers. However, |
1620 @file{gcc} directory of your GCC source tree:@* | 1682 @file{gcc} directory of your GCC source tree:@* |
1621 @smallexample | 1683 @smallexample |
1622 grep ^language= */config-lang.in | 1684 grep ^language= */config-lang.in |
1623 @end smallexample | 1685 @end smallexample |
1624 Currently, you can use any of the following: | 1686 Currently, you can use any of the following: |
1625 @code{all}, @code{default}, @code{ada}, @code{c}, @code{c++}, @code{fortran}, | 1687 @code{all}, @code{default}, @code{ada}, @code{c}, @code{c++}, @code{d}, |
1626 @code{go}, @code{jit}, @code{lto}, @code{objc}, @code{obj-c++}. | 1688 @code{fortran}, @code{go}, @code{jit}, @code{lto}, @code{objc}, @code{obj-c++}. |
1627 Building the Ada compiler has special requirements, see below. | 1689 Building the Ada compiler has special requirements, see below. |
1628 If you do not pass this flag, or specify the option @code{default}, then the | 1690 If you do not pass this flag, or specify the option @code{default}, then the |
1629 default languages available in the @file{gcc} sub-tree will be configured. | 1691 default languages available in the @file{gcc} sub-tree will be configured. |
1630 Ada, Go, Jit, and Objective-C++ are not default languages. LTO is not a | 1692 Ada, D, Go, Jit, and Objective-C++ are not default languages. LTO is not a |
1631 default language, but is built by default because @option{--enable-lto} is | 1693 default language, but is built by default because @option{--enable-lto} is |
1632 enabled by default. The other languages are default languages. If | 1694 enabled by default. The other languages are default languages. If |
1633 @code{all} is specified, then all available languages are built. An | 1695 @code{all} is specified, then all available languages are built. An |
1634 exception is @code{jit} language, which requires | 1696 exception is @code{jit} language, which requires |
1635 @option{--enable-host-shared} to be included with @code{all}. | 1697 @option{--enable-host-shared} to be included with @code{all}. |
1781 When you specify this option, the compiler is built to perform internal | 1843 When you specify this option, the compiler is built to perform internal |
1782 consistency checks of the requested complexity. This does not change the | 1844 consistency checks of the requested complexity. This does not change the |
1783 generated code, but adds error checking within the compiler. This will | 1845 generated code, but adds error checking within the compiler. This will |
1784 slow down the compiler and may only work properly if you are building | 1846 slow down the compiler and may only work properly if you are building |
1785 the compiler with GCC@. This is @samp{yes,extra} by default when building | 1847 the compiler with GCC@. This is @samp{yes,extra} by default when building |
1786 from SVN or snapshots, but @samp{release} for releases. The default | 1848 from the source repository or snapshots, but @samp{release} for releases. The default |
1787 for building the stage1 compiler is @samp{yes}. More control | 1849 for building the stage1 compiler is @samp{yes}. More control |
1788 over the checks may be had by specifying @var{list}. The categories of | 1850 over the checks may be had by specifying @var{list}. The categories of |
1789 checks available are @samp{yes} (most common checks | 1851 checks available are @samp{yes} (most common checks |
1790 @samp{assert,misc,tree,gc,rtlflag,runtime}), @samp{no} (no checks at | 1852 @samp{assert,misc,tree,gc,rtlflag,runtime}), @samp{no} (no checks at |
1791 all), @samp{all} (all but @samp{valgrind}), @samp{release} (cheapest | 1853 all), @samp{all} (all but @samp{valgrind}), @samp{release} (cheapest |
1905 @itemx --with-long-double-format=ieee | 1967 @itemx --with-long-double-format=ieee |
1906 Specify whether @code{long double} uses the IBM extended double format | 1968 Specify whether @code{long double} uses the IBM extended double format |
1907 or the IEEE 128-bit floating point format on PowerPC Linux systems. | 1969 or the IEEE 128-bit floating point format on PowerPC Linux systems. |
1908 This configuration switch will only work on little endian PowerPC | 1970 This configuration switch will only work on little endian PowerPC |
1909 Linux systems and on big endian 64-bit systems where the default cpu | 1971 Linux systems and on big endian 64-bit systems where the default cpu |
1910 is at least power7 (i.e. @option{--with-cpu=power7}, | 1972 is at least power7 (i.e.@: @option{--with-cpu=power7}, |
1911 @option{--with-cpu=power8}, or @option{--with-cpu=power9} is used). | 1973 @option{--with-cpu=power8}, or @option{--with-cpu=power9} is used). |
1912 | 1974 |
1913 If you use the @option{--with-long-double-64} configuration option, | 1975 If you use the @option{--with-long-double-64} configuration option, |
1914 the @option{--with-long-double-format=ibm} and | 1976 the @option{--with-long-double-format=ibm} and |
1915 @option{--with-long-double-format=ieee} options are ignored. | 1977 @option{--with-long-double-format=ieee} options are ignored. |
2048 By default, linker plugins (such as the LTO plugin) are built for the | 2110 By default, linker plugins (such as the LTO plugin) are built for the |
2049 host system architecture. For the case that the linker has a | 2111 host system architecture. For the case that the linker has a |
2050 different (but run-time compatible) architecture, these flags can be | 2112 different (but run-time compatible) architecture, these flags can be |
2051 specified to build plugins that are compatible to the linker. For | 2113 specified to build plugins that are compatible to the linker. For |
2052 example, if you are building GCC for a 64-bit x86_64 | 2114 example, if you are building GCC for a 64-bit x86_64 |
2053 (@samp{x86_64-unknown-linux-gnu}) host system, but have a 32-bit x86 | 2115 (@samp{x86_64-pc-linux-gnu}) host system, but have a 32-bit x86 |
2054 GNU/Linux (@samp{i686-pc-linux-gnu}) linker executable (which is | 2116 GNU/Linux (@samp{i686-pc-linux-gnu}) linker executable (which is |
2055 executable on the former system), you can configure GCC as follows for | 2117 executable on the former system), you can configure GCC as follows for |
2056 getting compatible linker plugins: | 2118 getting compatible linker plugins: |
2057 | 2119 |
2058 @smallexample | 2120 @smallexample |
2059 % @var{srcdir}/configure \ | 2121 % @var{srcdir}/configure \ |
2060 --host=x86_64-unknown-linux-gnu \ | 2122 --host=x86_64-pc-linux-gnu \ |
2061 --enable-linker-plugin-configure-flags=--host=i686-pc-linux-gnu \ | 2123 --enable-linker-plugin-configure-flags=--host=i686-pc-linux-gnu \ |
2062 --enable-linker-plugin-flags='CC=gcc\ -m32\ -Wl,-rpath,[...]/i686-pc-linux-gnu/lib' | 2124 --enable-linker-plugin-flags='CC=gcc\ -m32\ -Wl,-rpath,[...]/i686-pc-linux-gnu/lib' |
2063 @end smallexample | 2125 @end smallexample |
2064 | 2126 |
2065 @item --with-plugin-ld=@var{pathname} | 2127 @item --with-plugin-ld=@var{pathname} |
2098 path for them is @file{@var{exec-prefix}}, but it can be changed by | 2160 path for them is @file{@var{exec-prefix}}, but it can be changed by |
2099 specifying paths @var{path1}, @dots{}, @var{pathN}. | 2161 specifying paths @var{path1}, @dots{}, @var{pathN}. |
2100 | 2162 |
2101 @smallexample | 2163 @smallexample |
2102 % @var{srcdir}/configure \ | 2164 % @var{srcdir}/configure \ |
2103 --enable-offload-target=i686-unknown-linux-gnu=/path/to/i686/compiler,x86_64-pc-linux-gnu | 2165 --enable-offload-targets=x86_64-intelmicemul-linux-gnu=/path/to/x86_64/compiler,nvptx-none,hsa |
2104 @end smallexample | 2166 @end smallexample |
2105 | 2167 |
2106 If @samp{hsa} is specified as one of the targets, the compiler will be | 2168 If @samp{hsa} is specified as one of the targets, the compiler will be |
2107 built with support for HSA GPU accelerators. Because the same | 2169 built with support for HSA GPU accelerators. Because the same |
2108 compiler will emit the accelerator code, no path should be specified. | 2170 compiler will emit the accelerator code, no path should be specified. |
2130 The option is disabled by default. When @code{--enable-cet=auto} | 2192 The option is disabled by default. When @code{--enable-cet=auto} |
2131 is used, it is enabled on Linux/x86 if target binutils | 2193 is used, it is enabled on Linux/x86 if target binutils |
2132 supports @code{Intel CET} instructions and disabled otherwise. | 2194 supports @code{Intel CET} instructions and disabled otherwise. |
2133 In this case the target libraries are configured to get additional | 2195 In this case the target libraries are configured to get additional |
2134 @option{-fcf-protection} option. | 2196 @option{-fcf-protection} option. |
2197 | |
2198 @item --with-riscv-attribute=@samp{yes}, @samp{no} or @samp{default} | |
2199 Generate RISC-V attribute by default, in order to record extra build | |
2200 information in object. | |
2201 | |
2202 The option is disabled by default. It is enabled on RISC-V/ELF (bare-metal) | |
2203 target if target binutils supported. | |
2135 @end table | 2204 @end table |
2136 | 2205 |
2137 @subheading Cross-Compiler-Specific Options | 2206 @subheading Cross-Compiler-Specific Options |
2138 The following options only apply to building cross compilers. | 2207 The following options only apply to building cross compilers. |
2139 | 2208 |
2140 @table @code | 2209 @table @code |
2210 @item --with-toolexeclibdir=@var{dir} | |
2211 Specify the installation directory for libraries built with a cross compiler. | |
2212 The default is @option{$@{gcc_tooldir@}/lib}. | |
2213 | |
2141 @item --with-sysroot | 2214 @item --with-sysroot |
2142 @itemx --with-sysroot=@var{dir} | 2215 @itemx --with-sysroot=@var{dir} |
2143 Tells GCC to consider @var{dir} as the root of a tree that contains | 2216 Tells GCC to consider @var{dir} as the root of a tree that contains |
2144 (a subset of) the root filesystem of the target operating system. | 2217 (a subset of) the root filesystem of the target operating system. |
2145 Target system headers, libraries and run-time object files will be | 2218 Target system headers, libraries and run-time object files will be |
2209 Specifies that @samp{newlib} is | 2282 Specifies that @samp{newlib} is |
2210 being used as the target C library. This causes @code{__eprintf} to be | 2283 being used as the target C library. This causes @code{__eprintf} to be |
2211 omitted from @file{libgcc.a} on the assumption that it will be provided by | 2284 omitted from @file{libgcc.a} on the assumption that it will be provided by |
2212 @samp{newlib}. | 2285 @samp{newlib}. |
2213 | 2286 |
2287 @html | |
2288 <a name="avr"></a> | |
2289 @end html | |
2214 @item --with-avrlibc | 2290 @item --with-avrlibc |
2215 Specifies that @samp{AVR-Libc} is | 2291 Only supported for the AVR target. Specifies that @samp{AVR-Libc} is |
2216 being used as the target C library. This causes float support | 2292 being used as the target C@tie{} library. This causes float support |
2217 functions like @code{__addsf3} to be omitted from @file{libgcc.a} on | 2293 functions like @code{__addsf3} to be omitted from @file{libgcc.a} on |
2218 the assumption that it will be provided by @file{libm.a}. For more | 2294 the assumption that it will be provided by @file{libm.a}. For more |
2219 technical details, cf. @uref{http://gcc.gnu.org/PR54461,,PR54461}. | 2295 technical details, cf. @uref{http://gcc.gnu.org/PR54461,,PR54461}. |
2220 This option is only supported for the AVR target. It is not supported for | 2296 It is not supported for |
2221 RTEMS configurations, which currently use newlib. The option is | 2297 RTEMS configurations, which currently use newlib. The option is |
2222 supported since version 4.7.2 and is the default in 4.8.0 and newer. | 2298 supported since version 4.7.2 and is the default in 4.8.0 and newer. |
2299 | |
2300 @item --with-double=@{32|64|32,64|64,32@} | |
2301 @itemx --with-long-double=@{32|64|32,64|64,32|double@} | |
2302 Only supported for the AVR target since version@tie{}10. | |
2303 Specify the default layout available for the C/C++ @samp{double} | |
2304 and @samp{long double} type, respectively. The following rules apply: | |
2305 @itemize | |
2306 @item | |
2307 The first value after the @samp{=} specifies the default layout (in bits) | |
2308 of the type and also the default for the @option{-mdouble=} resp. | |
2309 @option{-mlong-double=} compiler option. | |
2310 @item | |
2311 If more than one value is specified, respective multilib variants are | |
2312 available, and @option{-mdouble=} resp. @option{-mlong-double=} acts | |
2313 as a multilib option. | |
2314 @item | |
2315 If @option{--with-long-double=double} is specified, @samp{double} and | |
2316 @samp{long double} will have the same layout. | |
2317 @item | |
2318 The defaults are @option{--with-long-double=64,32} and | |
2319 @option{--with-double=32,64}. The default @samp{double} layout imposed by | |
2320 the latter is compatible with older versions of the compiler that implement | |
2321 @samp{double} as a 32-bit type, which does not comply to the language standard. | |
2322 @end itemize | |
2323 Not all combinations of @option{--with-double=} and | |
2324 @option{--with-long-double=} are valid. For example, the combination | |
2325 @option{--with-double=32,64} @option{--with-long-double=32} will be | |
2326 rejected because the first option specifies the availability of | |
2327 multilibs for @samp{double}, whereas the second option implies | |
2328 that @samp{long double} --- and hence also @samp{double} --- is always | |
2329 32@tie{}bits wide. | |
2330 | |
2331 @item --with-double-comparison=@{tristate|bool|libf7@} | |
2332 Only supported for the AVR target since version@tie{}10. | |
2333 Specify what result format is returned by library functions that | |
2334 compare 64-bit floating point values (@code{DFmode}). | |
2335 The GCC default is @samp{tristate}. If the floating point | |
2336 implementation returns a boolean instead, set it to @samp{bool}. | |
2337 | |
2338 @item --with-libf7=@{libgcc|math|math-symbols|no@} | |
2339 Only supported for the AVR target since version@tie{}10. | |
2340 Specify to which degree code from LibF7 is included in libgcc. | |
2341 LibF7 is an ad-hoc, AVR-specific, 64-bit floating point emulation | |
2342 written in C and (inline) assembly. @samp{libgcc} adds support | |
2343 for functions that one would usually expect in libgcc like double addition, | |
2344 double comparisons and double conversions. @samp{math} also adds routines | |
2345 that one would expect in @file{libm.a}, but with @code{__} (two underscores) | |
2346 prepended to the symbol names as specified by @file{math.h}. | |
2347 @samp{math-symbols} also defines weak aliases for the functions | |
2348 declared in @file{math.h}. However, @code{--with-libf7} won't | |
2349 install no @file{math.h} header file whatsoever, this file must come | |
2350 from elsewhere. This option sets @option{--with-double-comparison} | |
2351 to @samp{bool}. | |
2223 | 2352 |
2224 @item --with-nds32-lib=@var{library} | 2353 @item --with-nds32-lib=@var{library} |
2225 Specifies that @var{library} setting is used for building @file{libgcc.a}. | 2354 Specifies that @var{library} setting is used for building @file{libgcc.a}. |
2226 Currently, the valid @var{library} is @samp{newlib} or @samp{mculib}. | 2355 Currently, the valid @var{library} is @samp{newlib} or @samp{mculib}. |
2227 This option is only supported for the NDS32 target. | 2356 This option is only supported for the NDS32 target. |
2280 | 2409 |
2281 @table @code | 2410 @table @code |
2282 @item --enable-objc-gc | 2411 @item --enable-objc-gc |
2283 Specify that an additional variant of the GNU Objective-C runtime library | 2412 Specify that an additional variant of the GNU Objective-C runtime library |
2284 is built, using an external build of the Boehm-Demers-Weiser garbage | 2413 is built, using an external build of the Boehm-Demers-Weiser garbage |
2285 collector (@uref{http://www.hboehm.info/gc/}). This library needs to be | 2414 collector (@uref{https://www.hboehm.info/gc/}). This library needs to be |
2286 available for each multilib variant, unless configured with | 2415 available for each multilib variant, unless configured with |
2287 @option{--enable-objc-gc=@samp{auto}} in which case the build of the | 2416 @option{--enable-objc-gc=@samp{auto}} in which case the build of the |
2288 additional runtime library is skipped when not available and the build | 2417 additional runtime library is skipped when not available and the build |
2289 continues. | 2418 continues. |
2290 | 2419 |
2292 @itemx --with-target-bdw-gc-include=@var{list} | 2421 @itemx --with-target-bdw-gc-include=@var{list} |
2293 @itemx --with-target-bdw-gc-lib=@var{list} | 2422 @itemx --with-target-bdw-gc-lib=@var{list} |
2294 Specify search directories for the garbage collector header files and | 2423 Specify search directories for the garbage collector header files and |
2295 libraries. @var{list} is a comma separated list of key value pairs of the | 2424 libraries. @var{list} is a comma separated list of key value pairs of the |
2296 form @samp{@var{multilibdir}=@var{path}}, where the default multilib key | 2425 form @samp{@var{multilibdir}=@var{path}}, where the default multilib key |
2297 is named as @samp{.} (dot), or is omitted (e.g. | 2426 is named as @samp{.} (dot), or is omitted (e.g.@: |
2298 @samp{--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32}). | 2427 @samp{--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32}). |
2299 | 2428 |
2300 The options @option{--with-target-bdw-gc-include} and | 2429 The options @option{--with-target-bdw-gc-include} and |
2301 @option{--with-target-bdw-gc-lib} must always be specified together | 2430 @option{--with-target-bdw-gc-lib} must always be specified together |
2302 for each multilib variant and they take precedence over | 2431 for each multilib variant and they take precedence over |
2303 @option{--with-target-bdw-gc}. If @option{--with-target-bdw-gc-include} | 2432 @option{--with-target-bdw-gc}. If @option{--with-target-bdw-gc-include} |
2304 is missing values for a multilib, then the value for the default | 2433 is missing values for a multilib, then the value for the default |
2305 multilib is used (e.g. @samp{--with-target-bdw-gc-include=/opt/bdw-gc/include} | 2434 multilib is used (e.g.@: @samp{--with-target-bdw-gc-include=/opt/bdw-gc/include} |
2306 @samp{--with-target-bdw-gc-lib=/opt/bdw-gc/lib64,32=/opt-bdw-gc/lib32}). | 2435 @samp{--with-target-bdw-gc-lib=/opt/bdw-gc/lib64,32=/opt-bdw-gc/lib32}). |
2307 If none of these options are specified, the library is assumed in | 2436 If none of these options are specified, the library is assumed in |
2308 default locations. | 2437 default locations. |
2438 @end table | |
2439 | |
2440 @subheading D-Specific Options | |
2441 | |
2442 The following options apply to the build of the D runtime library. | |
2443 | |
2444 @table @code | |
2445 @item --with-target-system-zlib | |
2446 Use installed @samp{zlib} rather than that included with GCC@. This needs | |
2447 to be available for each multilib variant, unless configured with | |
2448 @option{--with-target-system-zlib=@samp{auto}} in which case the GCC@ included | |
2449 @samp{zlib} is only used when the system installed library is not available. | |
2309 @end table | 2450 @end table |
2310 | 2451 |
2311 @html | 2452 @html |
2312 <hr /> | 2453 <hr /> |
2313 <p> | 2454 <p> |
2358 @file{sys/types.h}. If you find that @code{size_t} is a signed type and | 2499 @file{sys/types.h}. If you find that @code{size_t} is a signed type and |
2359 that type mismatches occur, this could be the cause. | 2500 that type mismatches occur, this could be the cause. |
2360 | 2501 |
2361 The solution is not to use such a directory for building GCC@. | 2502 The solution is not to use such a directory for building GCC@. |
2362 | 2503 |
2363 Similarly, when building from SVN or snapshots, or if you modify | 2504 Similarly, when building from the source repository or snapshots, or if you modify |
2364 @file{*.l} files, you need the Flex lexical analyzer generator | 2505 @file{*.l} files, you need the Flex lexical analyzer generator |
2365 installed. If you do not modify @file{*.l} files, releases contain | 2506 installed. If you do not modify @file{*.l} files, releases contain |
2366 the Flex-generated files and you do not need Flex installed to build | 2507 the Flex-generated files and you do not need Flex installed to build |
2367 them. There is still one Flex-based lexical analyzer (part of the | 2508 them. There is still one Flex-based lexical analyzer (part of the |
2368 build machinery, not of GCC itself) that is used even if you only | 2509 build machinery, not of GCC itself) that is used even if you only |
2369 build the C front end. | 2510 build the C front end. |
2370 | 2511 |
2371 When building from SVN or snapshots, or if you modify Texinfo | 2512 When building from the source repository or snapshots, or if you modify Texinfo |
2372 documentation, you need version 4.7 or later of Texinfo installed if you | 2513 documentation, you need version 4.7 or later of Texinfo installed if you |
2373 want Info documentation to be regenerated. Releases contain Info | 2514 want Info documentation to be regenerated. Releases contain Info |
2374 documentation pre-built for the unmodified documentation in the release. | 2515 documentation pre-built for the unmodified documentation in the release. |
2375 | 2516 |
2376 @section Building a native compiler | 2517 @section Building a native compiler |
2475 Removes any @option{-O}-started option from @code{BOOT_CFLAGS}, and adds | 2616 Removes any @option{-O}-started option from @code{BOOT_CFLAGS}, and adds |
2476 @option{-O1} to it. @samp{BUILD_CONFIG=bootstrap-O1} is equivalent to | 2617 @option{-O1} to it. @samp{BUILD_CONFIG=bootstrap-O1} is equivalent to |
2477 @samp{BOOT_CFLAGS='-g -O1'}. | 2618 @samp{BOOT_CFLAGS='-g -O1'}. |
2478 | 2619 |
2479 @item @samp{bootstrap-O3} | 2620 @item @samp{bootstrap-O3} |
2621 @itemx @samp{bootstrap-Og} | |
2480 Analogous to @code{bootstrap-O1}. | 2622 Analogous to @code{bootstrap-O1}. |
2481 | 2623 |
2482 @item @samp{bootstrap-lto} | 2624 @item @samp{bootstrap-lto} |
2483 Enables Link-Time Optimization for host tools during bootstrapping. | 2625 Enables Link-Time Optimization for host tools during bootstrapping. |
2484 @samp{BUILD_CONFIG=bootstrap-lto} is equivalent to adding | 2626 @samp{BUILD_CONFIG=bootstrap-lto} is equivalent to adding |
2485 @option{-flto} to @samp{BOOT_CFLAGS}. This option assumes that the host | 2627 @option{-flto} to @samp{BOOT_CFLAGS}. This option assumes that the host |
2486 supports the linker plugin (e.g. GNU ld version 2.21 or later or GNU gold | 2628 supports the linker plugin (e.g.@: GNU ld version 2.21 or later or GNU gold |
2487 version 2.21 or later). | 2629 version 2.21 or later). |
2488 | 2630 |
2489 @item @samp{bootstrap-lto-noplugin} | 2631 @item @samp{bootstrap-lto-noplugin} |
2490 This option is similar to @code{bootstrap-lto}, but is intended for | 2632 This option is similar to @code{bootstrap-lto}, but is intended for |
2491 hosts that do not support the linker plugin. Without the linker plugin | 2633 hosts that do not support the linker plugin. Without the linker plugin |
2492 static libraries are not compiled with link-time optimizations. Since | 2634 static libraries are not compiled with link-time optimizations. Since |
2493 the GCC middle end and back end are in @file{libbackend.a} this means | 2635 the GCC middle end and back end are in @file{libbackend.a} this means |
2494 that only the front end is actually LTO optimized. | 2636 that only the front end is actually LTO optimized. |
2637 | |
2638 @item @samp{bootstrap-lto-lean} | |
2639 This option is similar to @code{bootstrap-lto}, but is intended for | |
2640 faster build by only using LTO in the final bootstrap stage. | |
2641 With @samp{make profiledbootstrap} the LTO frontend | |
2642 is trained only on generator files. | |
2495 | 2643 |
2496 @item @samp{bootstrap-debug} | 2644 @item @samp{bootstrap-debug} |
2497 Verifies that the compiler generates the same executable code, whether | 2645 Verifies that the compiler generates the same executable code, whether |
2498 or not it is asked to emit debug information. To this end, this | 2646 or not it is asked to emit debug information. To this end, this |
2499 option builds stage2 host programs without debug information, and uses | 2647 option builds stage2 host programs without debug information, and uses |
2542 | 2690 |
2543 @item @samp{bootstrap-cet} | 2691 @item @samp{bootstrap-cet} |
2544 This option enables Intel CET for host tools during bootstrapping. | 2692 This option enables Intel CET for host tools during bootstrapping. |
2545 @samp{BUILD_CONFIG=bootstrap-cet} is equivalent to adding | 2693 @samp{BUILD_CONFIG=bootstrap-cet} is equivalent to adding |
2546 @option{-fcf-protection} to @samp{BOOT_CFLAGS}. This option | 2694 @option{-fcf-protection} to @samp{BOOT_CFLAGS}. This option |
2547 assumes that the host supports Intel CET (e.g. GNU assembler version | 2695 assumes that the host supports Intel CET (e.g.@: GNU assembler version |
2548 2.30 or later). | 2696 2.30 or later). |
2549 | 2697 |
2550 @item @samp{bootstrap-time} | 2698 @item @samp{bootstrap-time} |
2551 Arranges for the run time of each program started by the GCC driver, | 2699 Arranges for the run time of each program started by the GCC driver, |
2552 built in any stage, to be logged to @file{time.log}, in the top level of | 2700 built in any stage, to be logged to @file{time.log}, in the top level of |
2641 improving overall throughput; this is especially true for slow drives | 2789 improving overall throughput; this is especially true for slow drives |
2642 and network filesystems. | 2790 and network filesystems. |
2643 | 2791 |
2644 @section Building the Ada compiler | 2792 @section Building the Ada compiler |
2645 | 2793 |
2646 In order to build GNAT, the Ada compiler, you need a working GNAT | 2794 @ifnothtml |
2647 compiler (GCC version 4.0 or later). | 2795 @ref{GNAT-prerequisite}. |
2648 This includes GNAT tools such as @command{gnatmake} and | 2796 @end ifnothtml |
2649 @command{gnatlink}, since the Ada front end is written in Ada and | 2797 @ifhtml |
2650 uses some GNAT-specific extensions. | 2798 @uref{prerequisites.html#GNAT-prerequisite,,GNAT prerequisites}. |
2651 | 2799 @end ifhtml |
2652 In order to build a cross compiler, it is suggested to install | |
2653 the new compiler as native first, and then use it to build the cross | |
2654 compiler. | |
2655 | |
2656 @command{configure} does not test whether the GNAT installation works | |
2657 and has a sufficiently recent version; if too old a GNAT version is | |
2658 installed, the build will fail unless @option{--enable-languages} is | |
2659 used to disable building the Ada front end. | |
2660 | |
2661 @env{ADA_INCLUDE_PATH} and @env{ADA_OBJECT_PATH} environment variables | |
2662 must not be set when building the Ada compiler, the Ada tools, or the | |
2663 Ada runtime libraries. You can check that your build environment is clean | |
2664 by verifying that @samp{gnatls -v} lists only one explicit path in each | |
2665 section. | |
2666 | 2800 |
2667 @section Building with profile feedback | 2801 @section Building with profile feedback |
2668 | 2802 |
2669 It is possible to use profile feedback to optimize the compiler itself. This | 2803 It is possible to use profile feedback to optimize the compiler itself. This |
2670 should result in a faster compiler binary. Experiments done on x86 using gcc | 2804 should result in a faster compiler binary. Experiments done on x86 using gcc |
2769 | 2903 |
2770 @section How can you run the testsuite on selected tests? | 2904 @section How can you run the testsuite on selected tests? |
2771 | 2905 |
2772 In order to run sets of tests selectively, there are targets | 2906 In order to run sets of tests selectively, there are targets |
2773 @samp{make check-gcc} and language specific @samp{make check-c}, | 2907 @samp{make check-gcc} and language specific @samp{make check-c}, |
2774 @samp{make check-c++}, @samp{make check-fortran}, | 2908 @samp{make check-c++}, @samp{make check-d} @samp{make check-fortran}, |
2775 @samp{make check-ada}, @samp{make check-objc}, @samp{make check-obj-c++}, | 2909 @samp{make check-ada}, @samp{make check-objc}, @samp{make check-obj-c++}, |
2776 @samp{make check-lto} | 2910 @samp{make check-lto} |
2777 in the @file{gcc} subdirectory of the object directory. You can also | 2911 in the @file{gcc} subdirectory of the object directory. You can also |
2778 just run @samp{make check} in a subdirectory of the object directory. | 2912 just run @samp{make check} in a subdirectory of the object directory. |
2779 | 2913 |
3214 @item | 3348 @item |
3215 @uref{#aarch64-x-x,,aarch64*-*-*} | 3349 @uref{#aarch64-x-x,,aarch64*-*-*} |
3216 @item | 3350 @item |
3217 @uref{#alpha-x-x,,alpha*-*-*} | 3351 @uref{#alpha-x-x,,alpha*-*-*} |
3218 @item | 3352 @item |
3219 @uref{#amd64-x-solaris210,,amd64-*-solaris2.10} | 3353 @uref{#amd64-x-solaris2,,amd64-*-solaris2*} |
3220 @item | 3354 @item |
3221 @uref{#arm-x-eabi,,arm-*-eabi} | 3355 @uref{#arm-x-eabi,,arm-*-eabi} |
3222 @item | 3356 @item |
3223 @uref{#avr,,avr} | 3357 @uref{#avr,,avr} |
3224 @item | 3358 @item |
3238 @item | 3372 @item |
3239 @uref{#x-x-linux-gnu,,*-*-linux-gnu} | 3373 @uref{#x-x-linux-gnu,,*-*-linux-gnu} |
3240 @item | 3374 @item |
3241 @uref{#ix86-x-linux,,i?86-*-linux*} | 3375 @uref{#ix86-x-linux,,i?86-*-linux*} |
3242 @item | 3376 @item |
3243 @uref{#ix86-x-solaris210,,i?86-*-solaris2.10} | 3377 @uref{#ix86-x-solaris2,,i?86-*-solaris2*} |
3244 @item | 3378 @item |
3245 @uref{#ia64-x-linux,,ia64-*-linux} | 3379 @uref{#ia64-x-linux,,ia64-*-linux} |
3246 @item | 3380 @item |
3247 @uref{#ia64-x-hpux,,ia64-*-hpux*} | 3381 @uref{#ia64-x-hpux,,ia64-*-hpux*} |
3248 @item | 3382 @item |
3270 @item | 3404 @item |
3271 @uref{#nds32be-x-elf,,nds32be-*-elf} | 3405 @uref{#nds32be-x-elf,,nds32be-*-elf} |
3272 @item | 3406 @item |
3273 @uref{#nvptx-x-none,,nvptx-*-none} | 3407 @uref{#nvptx-x-none,,nvptx-*-none} |
3274 @item | 3408 @item |
3409 @uref{#or1k-x-elf,,or1k-*-elf} | |
3410 @item | |
3411 @uref{#or1k-x-linux,,or1k-*-linux} | |
3412 @item | |
3275 @uref{#powerpc-x-x,,powerpc*-*-*} | 3413 @uref{#powerpc-x-x,,powerpc*-*-*} |
3276 @item | 3414 @item |
3277 @uref{#powerpc-x-darwin,,powerpc-*-darwin*} | 3415 @uref{#powerpc-x-darwin,,powerpc-*-darwin*} |
3278 @item | 3416 @item |
3279 @uref{#powerpc-x-elf,,powerpc-*-elf} | 3417 @uref{#powerpc-x-elf,,powerpc-*-elf} |
3310 @item | 3448 @item |
3311 @uref{#sparc-x-x,,sparc*-*-*} | 3449 @uref{#sparc-x-x,,sparc*-*-*} |
3312 @item | 3450 @item |
3313 @uref{#sparc-sun-solaris2,,sparc-sun-solaris2*} | 3451 @uref{#sparc-sun-solaris2,,sparc-sun-solaris2*} |
3314 @item | 3452 @item |
3315 @uref{#sparc-sun-solaris210,,sparc-sun-solaris2.10} | |
3316 @item | |
3317 @uref{#sparc-x-linux,,sparc-*-linux*} | 3453 @uref{#sparc-x-linux,,sparc-*-linux*} |
3318 @item | 3454 @item |
3319 @uref{#sparc64-x-solaris2,,sparc64-*-solaris2*} | 3455 @uref{#sparc64-x-solaris2,,sparc64-*-solaris2*} |
3320 @item | 3456 @item |
3321 @uref{#sparcv9-x-solaris2,,sparcv9-*-solaris2*} | 3457 @uref{#sparcv9-x-solaris2,,sparcv9-*-solaris2*} |
3332 @item | 3468 @item |
3333 @uref{#x-x-vxworks,,*-*-vxworks*} | 3469 @uref{#x-x-vxworks,,*-*-vxworks*} |
3334 @item | 3470 @item |
3335 @uref{#x86-64-x-x,,x86_64-*-*, amd64-*-*} | 3471 @uref{#x86-64-x-x,,x86_64-*-*, amd64-*-*} |
3336 @item | 3472 @item |
3337 @uref{#x86-64-x-solaris210,,x86_64-*-solaris2.1[0-9]*} | 3473 @uref{#x86-64-x-solaris2,,x86_64-*-solaris2*} |
3338 @item | 3474 @item |
3339 @uref{#xtensa-x-elf,,xtensa*-*-elf} | 3475 @uref{#xtensa-x-elf,,xtensa*-*-elf} |
3340 @item | 3476 @item |
3341 @uref{#xtensa-x-linux,,xtensa*-*-linux*} | 3477 @uref{#xtensa-x-linux,,xtensa*-*-linux*} |
3342 @item | 3478 @item |
3387 @option{--disable-fix-cortex-a53-843419} will disable the workaround by default. | 3523 @option{--disable-fix-cortex-a53-843419} will disable the workaround by default. |
3388 The workaround is disabled by default if neither of | 3524 The workaround is disabled by default if neither of |
3389 @option{--enable-fix-cortex-a53-843419} or | 3525 @option{--enable-fix-cortex-a53-843419} or |
3390 @option{--disable-fix-cortex-a53-843419} is given at configure time. | 3526 @option{--disable-fix-cortex-a53-843419} is given at configure time. |
3391 | 3527 |
3528 To enable Branch Target Identification Mechanism and Return Address Signing by | |
3529 default at configure time use the @option{--enable-standard-branch-protection} | |
3530 option. This is equivalent to having @option{-mbranch-protection=standard} | |
3531 during compilation. This can be explicitly disabled during compilation by | |
3532 passing the @option{-mbranch-protection=none} option which turns off all | |
3533 types of branch protections. Conversely, | |
3534 @option{--disable-standard-branch-protection} will disable both the | |
3535 protections by default. This mechanism is turned off by default if neither | |
3536 of the options are given at configure time. | |
3537 | |
3392 @html | 3538 @html |
3393 <hr /> | 3539 <hr /> |
3394 @end html | 3540 @end html |
3395 @anchor{alpha-x-x} | 3541 @anchor{alpha-x-x} |
3396 @heading alpha*-*-* | 3542 @heading alpha*-*-* |
3397 This section contains general configuration information for all | 3543 This section contains general configuration information for all |
3398 Alpha-based platforms using ELF@. In addition to reading this | 3544 Alpha-based platforms using ELF@. In addition to reading this |
3399 section, please read all other sections that match your target. | 3545 section, please read all other sections that match your target. |
3400 | 3546 |
3401 We require binutils 2.11.2 or newer. | 3547 @html |
3402 Previous binutils releases had a number of problems with DWARF 2 | 3548 <hr /> |
3403 debugging information, not the least of which is incorrect linking of | 3549 @end html |
3404 shared libraries. | 3550 @anchor{amd64-x-solaris2} |
3405 | 3551 @heading amd64-*-solaris2* |
3406 @html | 3552 This is a synonym for @samp{x86_64-*-solaris2*}. |
3407 <hr /> | 3553 |
3408 @end html | 3554 @html |
3409 @anchor{amd64-x-solaris210} | 3555 <hr /> |
3410 @heading amd64-*-solaris2.1[0-9]* | 3556 @end html |
3411 This is a synonym for @samp{x86_64-*-solaris2.1[0-9]*}. | 3557 @anchor{amdgcn-unknown-amdhsa} |
3558 @heading amdgcn-unknown-amdhsa | |
3559 AMD GCN GPU target. | |
3560 | |
3561 Instead of GNU Binutils, you will need to install LLVM 6, or later, and copy | |
3562 @file{bin/llvm-mc} to @file{amdgcn-unknown-amdhsa/bin/as}, | |
3563 @file{bin/lld} to @file{amdgcn-unknown-amdhsa/bin/ld}, | |
3564 @file{bin/llvm-nm} to @file{amdgcn-unknown-amdhsa/bin/nm}, and | |
3565 @file{bin/llvm-ar} to both @file{bin/amdgcn-unknown-amdhsa-ar} and | |
3566 @file{bin/amdgcn-unknown-amdhsa-ranlib}. | |
3567 | |
3568 Use Newlib (2019-01-16, or newer). | |
3569 | |
3570 To run the binaries, install the HSA Runtime from the | |
3571 @uref{https://rocm.github.io,,ROCm Platform}, and use | |
3572 @file{libexec/gcc/amdhsa-unknown-amdhsa/@var{version}/gcn-run} to launch them | |
3573 on the GPU. | |
3412 | 3574 |
3413 @html | 3575 @html |
3414 <hr /> | 3576 <hr /> |
3415 @end html | 3577 @end html |
3416 @anchor{arc-x-elf32} | 3578 @anchor{arc-x-elf32} |
3487 @ifhtml | 3649 @ifhtml |
3488 See ``Blackfin Options'' in the main manual | 3650 See ``Blackfin Options'' in the main manual |
3489 @end ifhtml | 3651 @end ifhtml |
3490 | 3652 |
3491 More information, and a version of binutils with support for this processor, | 3653 More information, and a version of binutils with support for this processor, |
3492 is available at @uref{https://blackfin.uclinux.org} | 3654 are available at @uref{https://sourceforge.net/projects/adi-toolchain/}. |
3493 | 3655 |
3494 @html | 3656 @html |
3495 <hr /> | 3657 <hr /> |
3496 @end html | 3658 @end html |
3497 @anchor{cr16} | 3659 @anchor{cr16} |
3820 found on @uref{http://www.bitwizard.nl/sig11/,,www.bitwizard.nl}. | 3982 found on @uref{http://www.bitwizard.nl/sig11/,,www.bitwizard.nl}. |
3821 | 3983 |
3822 @html | 3984 @html |
3823 <hr /> | 3985 <hr /> |
3824 @end html | 3986 @end html |
3825 @anchor{ix86-x-solaris210} | 3987 @anchor{ix86-x-solaris2} |
3826 @heading i?86-*-solaris2.10 | 3988 @heading i?86-*-solaris2* |
3827 Use this for Solaris 10 or later on x86 and x86-64 systems. Starting | 3989 Use this for Solaris 11 or later on x86 and x86-64 systems. Starting |
3828 with GCC 4.7, there is also a 64-bit @samp{amd64-*-solaris2.1[0-9]*} or | 3990 with GCC 4.7, there is also a 64-bit @samp{amd64-*-solaris2*} or |
3829 @samp{x86_64-*-solaris2.1[0-9]*} configuration that corresponds to | 3991 @samp{x86_64-*-solaris2*} configuration that corresponds to |
3830 @samp{sparcv9-sun-solaris2*}. | 3992 @samp{sparcv9-sun-solaris2*}. |
3831 | 3993 |
3832 It is recommended that you configure GCC to use the GNU assembler. The | 3994 It is recommended that you configure GCC to use the GNU assembler. The |
3833 versions included in Solaris 10, from GNU binutils 2.15 (in | 3995 versions included in Solaris 11, from GNU binutils 2.19 or |
3834 @file{/usr/sfw/bin/gas}), and Solaris 11, from GNU binutils 2.19 or | |
3835 newer (also available as @file{/usr/bin/gas} and | 3996 newer (also available as @file{/usr/bin/gas} and |
3836 @file{/usr/gnu/bin/as}), work fine. The current version, from GNU | 3997 @file{/usr/gnu/bin/as}), work fine. The current version, from GNU |
3837 binutils 2.29, is known to work, but the version from GNU binutils 2.26 | 3998 binutils 2.32, is known to work, but the version from GNU binutils 2.26 |
3838 must be avoided. Recent versions of the Solaris assembler in | 3999 must be avoided. Recent versions of the Solaris assembler in |
3839 @file{/usr/ccs/bin/as} work almost as well, though. | 4000 @file{/usr/ccs/bin/as} work almost as well, though. |
3840 @c FIXME: as patch requirements? | 4001 @c FIXME: as patch requirements? |
3841 | 4002 |
3842 For linking, the Solaris linker, is preferred. If you want to use the GNU | 4003 For linking, the Solaris linker, is preferred. If you want to use the GNU |
3843 linker instead, note that due to a packaging bug the version in Solaris | 4004 linker instead, the version in Solaris 11, from GNU binutils 2.19 or |
3844 10, from GNU binutils 2.15 (in @file{/usr/sfw/bin/gld}), cannot be used, | 4005 newer (also in @file{/usr/gnu/bin/ld} and @file{/usr/bin/gld}), works, |
3845 while the version in Solaris 11, from GNU binutils 2.19 or newer (also | 4006 as does the latest version, from GNU binutils 2.32. |
3846 in @file{/usr/gnu/bin/ld} and @file{/usr/bin/gld}), works, as does the | |
3847 latest version, from GNU binutils 2.29. | |
3848 | 4007 |
3849 To use GNU @command{as}, configure with the options | 4008 To use GNU @command{as}, configure with the options |
3850 @option{--with-gnu-as --with-as=@//usr/@/sfw/@/bin/@/gas}. It may be necessary | 4009 @option{--with-gnu-as --with-as=@//usr/@/gnu/@/bin/@/as}. It may be necessary |
3851 to configure with @option{--without-gnu-ld --with-ld=@//usr/@/ccs/@/bin/@/ld} to | 4010 to configure with @option{--without-gnu-ld --with-ld=@//usr/@/ccs/@/bin/@/ld} to |
3852 guarantee use of Sun @command{ld}. | 4011 guarantee use of Sun @command{ld}. |
3853 @c FIXME: why --without-gnu-ld --with-ld? | 4012 @c FIXME: why --without-gnu-ld --with-ld? |
3854 | 4013 |
3855 @html | 4014 @html |
4198 | 4357 |
4199 @html | 4358 @html |
4200 <hr /> | 4359 <hr /> |
4201 @end html | 4360 @end html |
4202 @anchor{msp430-x-elf} | 4361 @anchor{msp430-x-elf} |
4203 @heading msp430-*-elf | 4362 @heading msp430-*-elf* |
4204 TI MSP430 processor. | 4363 TI MSP430 processor. |
4205 This configuration is intended for embedded systems. | 4364 This configuration is intended for embedded systems. |
4365 | |
4366 @samp{msp430-*-elf} is the standard configuration with most GCC | |
4367 features enabled by default. | |
4368 | |
4369 @samp{msp430-*-elfbare} is tuned for a bare-metal environment, and disables | |
4370 features related to shared libraries and other functionality not used for | |
4371 this device. This reduces code and data usage of the GCC libraries, resulting | |
4372 in a minimal run-time environment by default. | |
4373 | |
4374 Features disabled by default include: | |
4375 @itemize | |
4376 @item transactional memory | |
4377 @item __cxa_atexit | |
4378 @end itemize | |
4206 | 4379 |
4207 @html | 4380 @html |
4208 <hr /> | 4381 <hr /> |
4209 @end html | 4382 @end html |
4210 @anchor{nds32le-x-elf} | 4383 @anchor{nds32le-x-elf} |
4240 @option{--enable-newlib-io-long-long} options when configuring. | 4413 @option{--enable-newlib-io-long-long} options when configuring. |
4241 | 4414 |
4242 @html | 4415 @html |
4243 <hr /> | 4416 <hr /> |
4244 @end html | 4417 @end html |
4418 @anchor{or1k-x-elf} | |
4419 @heading or1k-*-elf | |
4420 The OpenRISC 1000 32-bit processor with delay slots. | |
4421 This configuration is intended for embedded systems. | |
4422 | |
4423 @html | |
4424 <hr /> | |
4425 @end html | |
4426 @anchor{or1k-x-linux} | |
4427 @heading or1k-*-linux | |
4428 The OpenRISC 1000 32-bit processor with delay slots. | |
4429 | |
4430 @html | |
4431 <hr /> | |
4432 @end html | |
4245 @anchor{powerpc-x-x} | 4433 @anchor{powerpc-x-x} |
4246 @heading powerpc-*-* | 4434 @heading powerpc-*-* |
4247 You can specify a default version for the @option{-mcpu=@var{cpu_type}} | 4435 You can specify a default version for the @option{-mcpu=@var{cpu_type}} |
4248 switch by using the configure option @option{--with-cpu-@var{cpu_type}}. | 4436 switch by using the configure option @option{--with-cpu-@var{cpu_type}}. |
4249 | 4437 |
4250 You will need GNU binutils 2.15 or newer. | 4438 You will need GNU binutils 2.20 or newer. |
4251 | 4439 |
4252 @html | 4440 @html |
4253 <hr /> | 4441 <hr /> |
4254 @end html | 4442 @end html |
4255 @anchor{powerpc-x-darwin} | 4443 @anchor{powerpc-x-darwin} |
4406 @c with 2.0 until 2.6, 7, 8, etc. Solaris 1 was a marketing name for | 4594 @c with 2.0 until 2.6, 7, 8, etc. Solaris 1 was a marketing name for |
4407 @c SunOS 4 releases which we don't use to avoid confusion. Solaris | 4595 @c SunOS 4 releases which we don't use to avoid confusion. Solaris |
4408 @c alone is too unspecific and must be avoided. | 4596 @c alone is too unspecific and must be avoided. |
4409 @anchor{x-x-solaris2} | 4597 @anchor{x-x-solaris2} |
4410 @heading *-*-solaris2* | 4598 @heading *-*-solaris2* |
4411 Support for Solaris 10 has been obsoleted in GCC 9, but can still be | 4599 Support for Solaris 10 has been removed in GCC 10. Support for Solaris |
4412 enabled by configuring with @option{--enable-obsolete}. Support will be | 4600 9 has been removed in GCC 5. Support for Solaris 8 has been removed in |
4413 removed in GCC 10. Support for Solaris 9 has been removed in GCC 5. | 4601 GCC 4.8. Support for Solaris 7 has been removed in GCC 4.6. |
4414 Support for Solaris 8 has been removed in GCC 4.8. Support for Solaris | 4602 |
4415 7 has been removed in GCC 4.6. | 4603 Solaris 11 provides GCC 4.5.2, 4.7.3, and 4.8.2 as |
4416 | |
4417 Sun does not ship a C compiler with Solaris 2 before Solaris 10, though | |
4418 you can download the Sun Studio compilers for free. In Solaris 10 and | |
4419 11, GCC 3.4.3 is available as @command{/usr/sfw/bin/gcc}. Solaris 11 | |
4420 also provides GCC 4.5.2, 4.7.3, and 4.8.2 as | |
4421 @command{/usr/gcc/4.5/bin/gcc} or similar. Alternatively, | 4604 @command{/usr/gcc/4.5/bin/gcc} or similar. Alternatively, |
4422 you can install a pre-built GCC to bootstrap and install GCC. See the | 4605 you can install a pre-built GCC to bootstrap and install GCC. See the |
4423 @uref{binaries.html,,binaries page} for details. | 4606 @uref{binaries.html,,binaries page} for details. |
4424 | 4607 |
4425 The Solaris 2 @command{/bin/sh} will often fail to configure | 4608 The Solaris 2 @command{/bin/sh} will often fail to configure |
4434 @noindent | 4617 @noindent |
4435 and proceed as described in @uref{configure.html,,the configure instructions}. | 4618 and proceed as described in @uref{configure.html,,the configure instructions}. |
4436 In addition we strongly recommend specifying an absolute path to invoke | 4619 In addition we strongly recommend specifying an absolute path to invoke |
4437 @command{@var{srcdir}/configure}. | 4620 @command{@var{srcdir}/configure}. |
4438 | 4621 |
4439 Solaris 10 comes with a number of optional OS packages. Some of these | 4622 In Solaris 11, you need to check for @code{system/header}, |
4440 are needed to use GCC fully, namely @code{SUNWarc}, | 4623 @code{system/linker}, and @code{developer/assembler} packages. |
4441 @code{SUNWbtool}, @code{SUNWesu}, @code{SUNWhea}, @code{SUNWlibm}, | |
4442 @code{SUNWsprot}, and @code{SUNWtoo}. If you did not install all | |
4443 optional packages when installing Solaris 10, you will need to verify that | |
4444 the packages that GCC needs are installed. | |
4445 To check whether an optional package is installed, use | |
4446 the @command{pkginfo} command. To add an optional package, use the | |
4447 @command{pkgadd} command. For further details, see the Solaris 10 | |
4448 documentation. | |
4449 | |
4450 Starting with Solaris 11, the package management has changed, so you | |
4451 need to check for @code{system/header}, @code{system/linker}, and | |
4452 @code{developer/assembler} packages. Checking for and installing | |
4453 packages is done with the @command{pkg} command now. | |
4454 | 4624 |
4455 Trying to use the linker and other tools in | 4625 Trying to use the linker and other tools in |
4456 @file{/usr/ucb} to install GCC has been observed to cause trouble. | 4626 @file{/usr/ucb} to install GCC has been observed to cause trouble. |
4457 For example, the linker may hang indefinitely. The fix is to remove | 4627 For example, the linker may hang indefinitely. The fix is to remove |
4458 @file{/usr/ucb} from your @env{PATH}. | 4628 @file{/usr/ucb} from your @env{PATH}. |
4461 have @file{/usr/xpg4/bin} in your @env{PATH}, we recommend that you place | 4631 have @file{/usr/xpg4/bin} in your @env{PATH}, we recommend that you place |
4462 @file{/usr/bin} before @file{/usr/xpg4/bin} for the duration of the build. | 4632 @file{/usr/bin} before @file{/usr/xpg4/bin} for the duration of the build. |
4463 | 4633 |
4464 We recommend the use of the Solaris assembler or the GNU assembler, in | 4634 We recommend the use of the Solaris assembler or the GNU assembler, in |
4465 conjunction with the Solaris linker. The GNU @command{as} | 4635 conjunction with the Solaris linker. The GNU @command{as} |
4466 versions included in Solaris 10, from GNU binutils 2.15 (in | 4636 versions included in Solaris 11, |
4467 @file{/usr/sfw/bin/gas}), and Solaris 11, | |
4468 from GNU binutils 2.19 or newer (also in @file{/usr/bin/gas} and | 4637 from GNU binutils 2.19 or newer (also in @file{/usr/bin/gas} and |
4469 @file{/usr/gnu/bin/as}), are known to work. | 4638 @file{/usr/gnu/bin/as}), are known to work. |
4470 The current version, from GNU binutils 2.29, | 4639 The current version, from GNU binutils 2.32, |
4471 is known to work as well. Note that your mileage may vary | 4640 is known to work as well. Note that your mileage may vary |
4472 if you use a combination of the GNU tools and the Solaris tools: while the | 4641 if you use a combination of the GNU tools and the Solaris tools: while the |
4473 combination GNU @command{as} + Sun @command{ld} should reasonably work, | 4642 combination GNU @command{as} + Sun @command{ld} should reasonably work, |
4474 the reverse combination Sun @command{as} + GNU @command{ld} may fail to | 4643 the reverse combination Sun @command{as} + GNU @command{ld} may fail to |
4475 build or cause memory corruption at runtime in some cases for C++ programs. | 4644 build or cause memory corruption at runtime in some cases for C++ programs. |
4476 @c FIXME: still? | 4645 @c FIXME: still? |
4477 GNU @command{ld} usually works as well, although the version included in | 4646 GNU @command{ld} usually works as well. Again, the current |
4478 Solaris 10 cannot be used due to several bugs. Again, the current | 4647 version (2.32) is known to work, but generally lacks platform specific |
4479 version (2.29) is known to work, but generally lacks platform specific | |
4480 features, so better stay with Solaris @command{ld}. To use the LTO linker | 4648 features, so better stay with Solaris @command{ld}. To use the LTO linker |
4481 plugin (@option{-fuse-linker-plugin}) with GNU @command{ld}, GNU | 4649 plugin (@option{-fuse-linker-plugin}) with GNU @command{ld}, GNU |
4482 binutils @emph{must} be configured with @option{--enable-largefile}. | 4650 binutils @emph{must} be configured with @option{--enable-largefile}. |
4483 | 4651 |
4484 To enable symbol versioning in @samp{libstdc++} with the Solaris linker, | 4652 To enable symbol versioning in @samp{libstdc++} with the Solaris linker, |
4485 you need to have any version of GNU @command{c++filt}, which is part of | 4653 you need to have any version of GNU @command{c++filt}, which is part of |
4486 GNU binutils. @samp{libstdc++} symbol versioning will be disabled if no | 4654 GNU binutils. @samp{libstdc++} symbol versioning will be disabled if no |
4487 appropriate version is found. Solaris @command{c++filt} from the Solaris | 4655 appropriate version is found. Solaris @command{c++filt} from the Solaris |
4488 Studio compilers does @emph{not} work. | 4656 Studio compilers does @emph{not} work. |
4489 | |
4490 Sun bug 4927647 sometimes causes random spurious testsuite failures | |
4491 related to missing diagnostic output. This bug doesn't affect GCC | |
4492 itself, rather it is a kernel bug triggered by the @command{expect} | |
4493 program which is used only by the GCC testsuite driver. When the bug | |
4494 causes the @command{expect} program to miss anticipated output, extra | |
4495 testsuite failures appear. | |
4496 | 4657 |
4497 @html | 4658 @html |
4498 <hr /> | 4659 <hr /> |
4499 @end html | 4660 @end html |
4500 @anchor{sparc-x-x} | 4661 @anchor{sparc-x-x} |
4534 not that of GMP or MPFR or MPC). For example on a Solaris 9 system: | 4695 not that of GMP or MPFR or MPC). For example on a Solaris 9 system: |
4535 | 4696 |
4536 @smallexample | 4697 @smallexample |
4537 % ./configure --build=sparc-sun-solaris2.9 --prefix=xxx | 4698 % ./configure --build=sparc-sun-solaris2.9 --prefix=xxx |
4538 @end smallexample | 4699 @end smallexample |
4539 | |
4540 @html | |
4541 <hr /> | |
4542 @end html | |
4543 @anchor{sparc-sun-solaris210} | |
4544 @heading sparc-sun-solaris2.10 | |
4545 There is a bug in older versions of the Sun assembler which breaks | |
4546 thread-local storage (TLS). A typical error message is | |
4547 | |
4548 @smallexample | |
4549 ld: fatal: relocation error: R_SPARC_TLS_LE_HIX22: file /var/tmp//ccamPA1v.o: | |
4550 symbol <unknown>: bad symbol type SECT: symbol type must be TLS | |
4551 @end smallexample | |
4552 | |
4553 @noindent | |
4554 This bug is fixed in Sun patch 118683-03 or later. | |
4555 | 4700 |
4556 @html | 4701 @html |
4557 <hr /> | 4702 <hr /> |
4558 @end html | 4703 @end html |
4559 @anchor{sparc-x-linux} | 4704 @anchor{sparc-x-linux} |
4666 both 64-bit x86-64 and 32-bit x86 code (via the @option{-m32} switch). | 4811 both 64-bit x86-64 and 32-bit x86 code (via the @option{-m32} switch). |
4667 | 4812 |
4668 @html | 4813 @html |
4669 <hr /> | 4814 <hr /> |
4670 @end html | 4815 @end html |
4671 @anchor{x86-64-x-solaris210} | 4816 @anchor{x86-64-x-solaris2} |
4672 @heading x86_64-*-solaris2.1[0-9]* | 4817 @heading x86_64-*-solaris2* |
4673 GCC also supports the x86-64 architecture implemented by the AMD64 | 4818 GCC also supports the x86-64 architecture implemented by the AMD64 |
4674 processor (@samp{amd64-*-*} is an alias for @samp{x86_64-*-*}) on | 4819 processor (@samp{amd64-*-*} is an alias for @samp{x86_64-*-*}) on |
4675 Solaris 10 or later. Unlike other systems, without special options a | 4820 Solaris 10 or later. Unlike other systems, without special options a |
4676 bi-arch compiler is built which generates 32-bit code by default, but | 4821 bi-arch compiler is built which generates 32-bit code by default, but |
4677 can generate 64-bit x86-64 code with the @option{-m64} switch. Since | 4822 can generate 64-bit x86-64 code with the @option{-m64} switch. Since |