📄 install.texi
字号:
\input texinfo.tex @c -*-texinfo-*-@c @ifnothtml@c %**start of header@setfilename gccinstall.info@settitle Installing GCC@setchapternewpage odd@c %**end of header@c @end ifnothtml@include gcc-common.texi@c Specify title for specific html page@ifset indexhtml@settitle Installing GCC@end ifset@ifset specifichtml@settitle Host/Target specific installation notes for GCC@end ifset@ifset prerequisiteshtml@settitle Prerequisites for GCC@end ifset@ifset downloadhtml@settitle Downloading GCC@end ifset@ifset configurehtml@settitle Installing GCC: Configuration@end ifset@ifset buildhtml@settitle Installing GCC: Building@end ifset@ifset testhtml@settitle Installing GCC: Testing@end ifset@ifset finalinstallhtml@settitle Installing GCC: Final installation@end ifset@ifset binarieshtml@settitle Installing GCC: Binaries@end ifset@ifset oldhtml@settitle Installing GCC: Old documentation@end ifset@ifset gfdlhtml@settitle Installing GCC: GNU Free Documentation License@end ifset@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,@c 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.@c *** Converted to texinfo by Dean Wakerley, dean@wakerley.com@c IMPORTANT: whenever you modify this file, run `install.texi2html' to@c test the generation of HTML documents for the gcc.gnu.org web pages.@c@c Do not use @footnote{} in this file as it breaks install.texi2html!@c Include everything if we're not making html@ifnothtml@set indexhtml@set specifichtml@set prerequisiteshtml@set downloadhtml@set configurehtml@set buildhtml@set testhtml@set finalinstallhtml@set binarieshtml@set oldhtml@set gfdlhtml@end ifnothtml@c Part 2 Summary Description and Copyright@copyingCopyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.@sp 1Permission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.2 orany later version published by the Free Software Foundation; with noInvariant Sections, the Front-Cover texts being (a) (see below), andwith the Back-Cover Texts being (b) (see below). A copy of thelicense is included in the section entitled ``@uref{./gfdl.html,,GNUFree Documentation License}''.(a) The FSF's Front-Cover Text is: A GNU Manual(b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.@end copying@ifinfo@insertcopying@end ifinfo@dircategory Software development@direntry* gccinstall: (gccinstall). Installing the GNU Compiler Collection.@end direntry@c Part 3 Titlepage and Copyright@titlepage@title Installing GCC@versionsubtitle@c The following two commands start the copyright page.@page@vskip 0pt plus 1filll@insertcopying@end titlepage@c Part 4 Top node, Master Menu, and/or Table of Contents@ifinfo@node Top, , , (dir)@comment node-name, next, Previous, up@menu* Installing GCC:: This document describes the generic installation procedure for GCC as well as detailing some target specific installation instructions.* Specific:: Host/target specific installation notes for GCC.* Binaries:: Where to get pre-compiled binaries.* Old:: Old installation documentation.* GNU Free Documentation License:: How you can copy and share this manual.* Concept Index:: This index has two entries.@end menu@end ifinfo@iftex@contents@end iftex@c Part 5 The Body of the Document@c ***Installing GCC**********************************************************@ifnothtml@comment node-name, next, previous, up@node Installing GCC, Binaries, , Top@end ifnothtml@ifset indexhtml@ifnothtml@chapter Installing GCC@end ifnothtmlThe latest version of this document is always available at@uref{http://gcc.gnu.org/install/,,http://gcc.gnu.org/install/}.This document describes the generic installation procedure for GCC as wellas detailing some target specific installation instructions.GCC includes several components that previously were separate distributionswith their own installation instructions. This document supersedes allpackage specific installation instructions.@emph{Before} starting the build/install procedure please check the@ifnothtml@ref{Specific, host/target specific installation notes}.@end ifnothtml@ifhtml@uref{specific.html,,host/target specific installation notes}.@end ifhtmlWe recommend you browse the entire generic installation instructions beforeyou proceed.Lists of successful builds for released versions of GCC areavailable at @uref{http://gcc.gnu.org/buildstat.html}.These lists are updated as new information becomes available.The installation procedure itself is broken into five steps.@ifinfo@menu* Prerequisites::* Downloading the source::* Configuration::* Building::* Testing:: (optional)* Final install::@end menu@end ifinfo@ifhtml@enumerate@item@uref{prerequisites.html,,Prerequisites}@item@uref{download.html,,Downloading the source}@item@uref{configure.html,,Configuration}@item@uref{build.html,,Building}@item@uref{test.html,,Testing} (optional)@item@uref{finalinstall.html,,Final install}@end enumerate@end ifhtmlPlease note that GCC does not support @samp{make uninstall} and probablywon't do so in the near future as this would open a can of worms. Instead,we suggest that you install GCC into a directory of its own and simplyremove that directory when you do not need that specific version of GCCany longer, and, if shared libraries are installed there as well, nomore binaries exist that use them.@ifhtmlThere are also some @uref{old.html,,old installation instructions},which are mostly obsolete but still contain some information which hasnot yet been merged into the main part of this manual.@end ifhtml@html<hr /><p>@end html@ifhtml@uref{./index.html,,Return to the GCC Installation page}@insertcopying@end ifhtml@end ifset@c ***Prerequisites**************************************************@ifnothtml@comment node-name, next, previous, up@node Prerequisites, Downloading the source, , Installing GCC@end ifnothtml@ifset prerequisiteshtml@ifnothtml@chapter Prerequisites@end ifnothtml@cindex PrerequisitesGCC requires that various tools and packages be available for use in thebuild procedure. Modifying GCC sources requires additional toolsdescribed below.@heading Tools/packages necessary for building GCC@table @asis@item ISO C90 compilerNecessary to bootstrap GCC, although versions of GCC priorto 3.4 also allow bootstrapping with a traditional (K&R) C compiler.To build all languages in a cross-compiler or other configuration where3-stage bootstrap is not performed, you need to start with an existingGCC binary (version 2.95 or later) because source code for languagefrontends other than C might use GCC extensions.@item GNATIn order to build the Ada compiler (GNAT) you must already have GNATinstalled because portions of the Ada frontend are written in Ada (withGNAT extensions.) Refer to the Ada installation instructions for morespecific information.@item A ``working'' POSIX compatible shell, or GNU bashNecessary when running @command{configure} because some@command{/bin/sh} shells have bugs and may crash when configuring thetarget libraries. In other cases, @command{/bin/sh} or @command{ksh}have disastrous corner-case performance problems. Thiscan cause target @command{configure} runs to literally take days tocomplete in some cases.So on some platforms @command{/bin/ksh} is sufficient, on others itisn't. See the host/target specific instructions for your platform, oruse @command{bash} to be sure. Then set @env{CONFIG_SHELL} in yourenvironment to your ``good'' shell prior to running@command{configure}/@command{make}.@command{zsh} is not a fully compliant POSIX shell and will notwork when configuring GCC@.@item A POSIX or SVR4 awkNecessary for creating some of the generated source files for GCC@.If in doubt, use a recent GNU awk version, as some of the older onesare broken. GNU awk version 3.1.5 is known to work.@item GNU binutilsNecessary in some circumstances, optional in others. See thehost/target specific instructions for your platform for the exactrequirements.@item gzip version 1.2.4 (or later) or@itemx bzip2 version 1.0.2 (or later)Necessary to uncompress GCC @command{tar} files when source code isobtained via FTP mirror sites.@item GNU make version 3.79.1 (or later)You must have GNU make installed to build GCC@.@item GNU tar version 1.14 (or later)Necessary (only on some platforms) to untar the source code. Manysystems' @command{tar} programs will also work, only try GNU@command{tar} if you have problems.@item GNU Multiple Precision Library (GMP) version 4.1 (or later)Necessary to build GCC@. If you do not have it installed in yourlibrary search path, you will have to configure with the@option{--with-gmp} configure option. See also@option{--with-gmp-lib} and @option{--with-gmp-include}.@item MPFR Library version 2.3.0 (or later)Necessary to build GCC@. It can be downloaded from@uref{http://www.mpfr.org/}. The version of MPFR that is bundled withGMP 4.1.x contains numerous bugs. Although GCC may appear to functionwith the buggy versions of MPFR, there are a few bugs that will not befixed when using this version. It is strongly recommended to upgradeto the recommended version of MPFR.The @option{--with-mpfr} configure option should be used if your MPFRLibrary is not installed in your default library search path. Seealso @option{--with-mpfr-lib} and @option{--with-mpfr-include}.@item @command{jar}, or InfoZIP (@command{zip} and @command{unzip})Necessary to build libgcj, the GCJ runtime.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -