📄 gcc.texinfo
字号:
Dump after first jump optimization.@item sDump after CSE (including the jump optimization that sometimesfollows CSE).@item LDump after loop optimization.@item fDump after flow analysis.@item cDump after instruction combination.@item lDump after local register allocation.@item gDump after global register allocation.@item dDump after delayed branch scheduling.@item JDump after last jump optimization.@item mPrint statistics on memory usage, at the end of the run.@end table@item -pedanticIssue all the warnings demanded by strict ANSI standard C; rejectall programs that use forbidden extensions.Valid ANSI standard C programs should compile properly with or withoutthis option (though a rare few will require @samp{-ansi}). However,without this option, certain GNU extensions and traditional C featuresare supported as well. With this option, they are rejected. There isno reason to @i{use} this option; it exists only to satisfy pedants.@samp{-pedantic} does not cause warning messages for use of thealternate keywords whose names begin and end with @samp{__}.@xref{Alternate Keywords}.@item -staticOn Suns running version 4, this prevents linking with the sharedlibraries. (@samp{-g} has the same effect.)@end tableThese options control the C preprocessor, which is run on each C sourcefile before actual compilation. If you use the @samp{-E} option, nothingis done except C preprocessing. Some of these options make sense onlytogether with @samp{-E} because they request preprocessor output that isnot suitable for actual compilation.@table @samp@item -CTell the preprocessor not to discard comments. Used with the@samp{-E} option.@item -I@var{dir}Search directory @var{dir} for include files.@item -I-Any directories specified with @samp{-I} options before the @samp{-I-}option are searched only for the case of @samp{#include "@var{file}"};they are not searched for @samp{#include <@var{file}>}.If additional directories are specified with @samp{-I} options afterthe @samp{-I-}, these directories are searched for all @samp{#include}directives. (Ordinarily @emph{all} @samp{-I} directories are usedthis way.)In addition, the @samp{-I-} option inhibits the use of the currentdirectory (where the current input file came from) as the first searchdirectory for @samp{#include "@var{file}"}. There is no way to overridethis effect of @samp{-I-}. With @samp{-I.} you can specify searchingthe directory which was current when the compiler was invoked. That isnot exactly the same as what the preprocessor does by default, but it isoften satisfactory.@samp{-I-} does not inhibit the use of the standard system directoriesfor header files. Thus, @samp{-I-} and @samp{-nostdinc} areindependent.@item -i @var{file}Process @var{file} as input, discarding the resulting output, beforeprocessing the regular input file. Because the output generated from@var{file} is discarded, the only effect of @samp{-i @var{file}} is tomake the macros defined in @var{file} available for use in the maininput.@item -nostdincDo not search the standard system directories for header files. Onlythe directories you have specified with @samp{-I} options (and thecurrent directory, if appropriate) are searched.Between @samp{-nostdinc} and @samp{-I-}, you can eliminate alldirectories from the search path except those you specify.@item -MTell the preprocessor to output a rule suitable for @code{make}describing the dependencies of each object file. For each sourcefile, the preprocessor outputs one @code{make}-rule whose target isthe object file name for that source file and whose dependencies areall the files @samp{#include}d in it. This rule may be a single lineor may be continued with @samp{\}-newline if it is long.@samp{-M} implies @samp{-E}.@item -MMLike @samp{-M} but the output mentions only the user-header filesincluded with @samp{#include "@var{file}"}. System header filesincluded with @samp{#include <@var{file}>} are omitted.@samp{-MM} implies @samp{-E}.@item -D@var{macro}Define macro @var{macro} with the string @samp{1} as its definition.@item -D@var{macro}=@var{defn}Define macro @var{macro} as @var{defn}.@item -U@var{macro}Undefine macro @var{macro}.@item -trigraphsSupport ANSI C trigraphs. You don't want to know about thisbrain-damage. The @samp{-ansi} option also has this effect.@end table@node Installation, Trouble, Options, Top@chapter Installing GNU CCHere is the procedure for installing GNU CC on a Unix system.@menu* Other Dir:: Compiling in a separate directory (not where the source is).* Sun Install:: See below for installation on the Sun.* 3B1 Install:: See below for installation on the 3B1.* SCO Install:: See below for installation on SCO System V 3.2. (Or ESIX.)* VMS Install:: See below for installation on VMS.* HPUX Install:: See below for installation on HPUX.* Tower Install:: See below for installation on an NCR Tower.@end menu@iftexSee below for VMS systems, and modified procedures needed on Sunsystems, 3b1 machines and HPUX. The following section says how tocompile in a separate directory on Unix; here we assume you compile inthe same directory that contains the source files.@end iftex@enumerate@itemEdit @file{Makefile}. If you are using HPUX, or any form of system V,you must make a few changes described in comments at the beginning ofthe file. Genix requires changes also, and so does the Pyramid.@itemOn a Sequent system, go to the Berkeley universe.@itemChoose configuration files. The easy way to do this is to run thecommand file @file{config.gcc} with a single argument, which specifiesthe type of machine (and in some cases which operating system).Here is a list of the possible arguments:@table @samp@item vaxVaxes running BSD.@item vmsVaxes running VMS.@item vax-sysvVaxes running system V.@item i386-sysvIntel 386 PCs running system V.@item i386-sysv-gasIntel 386 PCs running system V, using the GNU assembler and GNUlinker.@item i386-sysv4Intel 386 PCs running system V.4. You must run the shell script@file{fixincludes-V4} in order for GNU CC to work properly. You mustalso uncomment some lines in @file{Makefile}.@item sequent-i386Sequent with Intel 386 processors.@item i386-aixIntel 386 PCs or PS/2s running AIX.@item sun2Sun 2 running system version 2 or 3.@item sun3Sun 3 running system version 4, with 68881.Note there we do not provide a configuration file to use an FPAby default, because programs that establish signal handlers forfloating point traps inherently cannot work with the FPA.@item sun3-nfpSun 3 running system version 4, without 68881.@item sun4Sun 4 running system version 4. @xref{Incompatibilities},for calling convention incompatibilities on the Sun 4 (sparc).@item sun2-os4Sun 2 running system version 4.@item sun3-os3Sun 3 running system version 2 or 3, with 68881.@item sun3-nfp-os3Sun 3 running system version 2 or 3, without 68881.@item sun4-os3Sun 4 running system version 2 or 3. @xref{Incompatibilities},for calling convention incompatibilities on the Sun 4 (sparc).@item sun386Sun 386 (``roadrunner'').@item alliantAlliant FX/8 computer. Note that the standard installed C compiler inConcentrix 5.0 has a bug which prevent it from compiling GNU CCcorrectly. You can patch the compiler bug as follows:@examplecp /bin/pcc ./pccadb -w ./pcc - << EOF15f6?w 6610EOF@end exampleThen you must use the @samp{-ip12} option when compiling GNU CCwith the patched compiler, as shown here:@examplemake CC="./pcc -ip12" CFLAGS=-w@end exampleNote also that Alliant's version of DBX does not manage to work with theoutput from GNU CC.@item tahoeThe tahoe computer (running BSD, and using DBX).@item decstationThe DEC 3100 Mips machine (``pmax''). Note that GNU CC cannot generatedebugging information in the unusual format used on the Mips.@item mips-sysv-os5The Mips computer, RS series, with the System V environmentrunning on revision 5.00 of RISC-OS as default.Note that GNU CC cannot generate debugging information in the unusualformat used on the Mips, and also cannot be used to createprograms that use shared libraries.@item mips-sysvThe Mips computer, RS series, with the System V environment as default.Note that GNU CC cannot generate debugging information in the unusualformat used on the Mips.@item mips-bsd43-os5The Mips computer, RS series, with the BSD 4.3 environmentrunning revision 5.00 of RISC-OS as default.Note that GNU CC cannot generate debugging information in the unusualformat used on the Mips, and also cannot be used to createprograms that use shared libraries.@item mips-bsd43The Mips computer, RS series, with the BSD 4.3 environment as default.Note that GNU CC cannot generate debugging information in the unusualformat used on the Mips.@item mips-os5The Mips computer, M series running revision 5.00 of RISC-OS.Note that GNU CC cannot generate debugging information in theunusual format used on the Mips, and also cannot be used tocreate programs that use shared libraries.@item mipsThe Mips computer, M series. Note that GNU CC cannot generate debugginginformation in the unusual format used on the Mips.@item irisAnother variant of the Mips computer, the Silicon Graphics Iris 4D.Note that GNU CC cannot generate debugging information in the unusualformat used on the Mips.@item convex-c1Convex C1 computer. With operating system version 9, use @samp{cc -pcc}as the compilation command when building stage 1 of GNU CC.@item convex-c2Convex C2 computer. With operating system version 9, use @samp{cc -pcc}as the compilation command when building stage 1 of GNU CC.@item pyramidPyramid computer.@item hp9k320HP 9000 series 300 using HPUX assembler. Note there is nosupport in GNU CC for HP's debugger; thus, @samp{-g} is notavailable in this configuration.@item hp9k320-gasHP 9000 series 300 using GNU assembler, linker and debugger.This requires the HP-adapt package, which is available along withthe GNU linker as part of the ``binutils'' distribution.This is on the GNU CC distribution tape.@item hp9k320-oldHP 9000 series 300 using HPUX assembler, in operating system versionsolder than 6.5. Note there is no support in GNU CC for HP's debugger;thus, @samp{-g} is not available in this configuration.@item hp9k320-bsdHP 9000 series 300 running BSD.@item hp9k200-bsdHP 9000 series 200 running BSD. Note that the C compiler that comeswith this system cannot compile GNU CC; contact @code{law@@super.org} toget binaries of GNU CC for bootstrapping. Additionally, a minor patchis necessary if you wish to build kernels with GNU CC; contact@code{law@@super.org} to get a copy of the patch.@item isi68ISI 68000 or 68020 system with a 68881.@item isi68-nfpISI 68000 or 68020 system without a 68881.@item news800Sony NEWS 68020 system.@item nextNeXT system.@item towerNCR Tower 32 system.@item altosAltos 3068. Note that you must use the GNU assembler, linker anddebugger, with COFF-encapsulation. Also, you must fix a kernelbug. Details in the file @file{ALTOS-README}.@item 3b1AT&T 3b1, a.k.a. 7300 PC. Note that special procedures are neededto compile GNU CC with this machine's standard C compiler, due tobugs in that compiler. @xref{3b1 Install}. You can bootstrap itmore easily with previous versions of GNU CC if you have them.@item 3b1-gasAT&T 3b1 using the GNU assembler.@item sequent-ns32kSequent containing ns32000 processors.@item encoreEncore ns32000 system.@item genixNational Semiconductor ns32000 system.@item 88000Motorola 88000 processor. This port is not finished.@end tableHere we spell out what files need to be set up:@itemize @bullet@itemMake a symbolic link named @file{config.h} to the top-levelconfig file for the machine you are using (@pxref{Config}). Thisfile is responsible for defining information about the hostmachine. It includes @file{tm.h}.The file is located in the subdirectory @file{config}. Its nameshould be @file{xm-@var{machine}.h}, with these exceptions:@table @file@item xm-vms.hfor vaxen running VMS.@item xm-vaxv.hfor vaxen running system V.@item xm-i386v.hfor Intel 80386's running system V.@item xm-sun386i.hfor Sun roadrunner running any version of the operating system.@item xm-hp9k320.hfor the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -