📄 gcc.texinfo
字号:
@var{one line to give the program's name and a brief idea of what it does.}Copyright (C) 19@var{yy} @var{name of author}This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 1, or (at your option)any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.@end smallexampleAlso add information on how to contact you by electronic and paper mail.If the program is interactive, make it output a short notice like thiswhen it starts in an interactive mode:@smallexampleGnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.This is free software, and you are welcome to redistribute itunder certain conditions; type `show c' for details.@end smallexampleThe hypothetical commands `show w' and `show c' should show theappropriate parts of the General Public License. Of course, thecommands you use may be called something other than `show w' and `showc'; they could even be mouse-clicks or menu items---whatever suits yourprogram.You should also get your employer (if you work as a programmer) or yourschool, if any, to sign a ``copyright disclaimer'' for the program, ifnecessary. Here a sample; alter the names:@exampleYoyodyne, Inc., hereby disclaims all copyright interest in theprogram `Gnomovision' (a program to direct compilers to make passesat assemblers) written by James Hacker.@var{signature of Ty Coon}, 1 April 1989Ty Coon, President of Vice@end exampleThat's all there is to it!@node Contributors, Boycott, Copying, Top@unnumbered Contributors to GNU CCIn addition to Richard Stallman, several people have written partsof GNU CC.@itemize @bullet@itemThe idea of using RTL and some of the optimization ideas came from theU. of Arizona Portable Optimizer, written by Jack Davidson andChristopher Fraser. See ``Register Allocation and Exhaustive PeepholeOptimization'', Software Practice and Experience 14 (9), Sept. 1984,857-866.@itemPaul Rubin wrote most of the preprocessor.@itemLeonard Tower wrote parts of the parser, RTL generator, and RTLdefinitions, and of the Vax machine description.@itemTed Lemon wrote parts of the RTL reader and printer.@itemJim Wilson implemented loop strength reduction and some otherloop optimizations.@itemNobuyuki Hikichi of Software Research Associates, Tokyo, contributedthe support for the Sony NEWS machine.@itemCharles LaBrec contributed the support for the Integrated Solutions68020 system.@itemMichael Tiemann of MCC wrote most of the description of the NationalSemiconductor 32000 series cpu. He also wrote the code for inlinefunction integration and for the SPARC cpu and Motorola 88000 cpuand part of the Sun FPA support.@itemJan Stein of the Chalmers Computer Society provided support forGenix, as well as part of the 32000 machine description.@itemRandy Smith finished the Sun FPA support.@itemRobert Brown implemented the support for Encore 32000 systems.@itemDavid Kashtan of SRI adapted GNU CC to the Vomit-Making System.@itemAlex Crain provided changes for the 3b1.@itemGreg Satz and Chris Hanson assisted in making GNU CC work on HP-UX forthe 9000 series 300.@itemWilliam Schelter did most of the work on the Intel 80386 support.@itemChristopher Smith did the port for Convex machines.@itemPaul Petersen wrote the machine description for the Alliant FX/8.@itemAlain Lichnewsky ported GNU CC to the Mips cpu.@itemDevon Bowen, Dale Wiles and Kevin Zachmann ported GNU CC to the Tahoe.@itemJonathan Stone wrote the machine description for the Pyramid computer.@end itemize@node Boycott, Options, Contributors, Top@chapter Protect Your Freedom---Fight ``Look And Feel''@quotation@i{This section is a political message from the League for ProgrammingFreedom to the users of GNU CC. It is included here as an expressionof support for the League on the part of the Free Software Foundationand Richard Stallman.}@end quotationAshton-Tate, Apple, Lotus and Xerox are trying to create a new form oflegal monopoly: a copyright on a class of user interfaces. Thesemonopolies would cause serious problems for users and developers ofcomputer software and systems.Until a few years ago, the law seemed clear: no one could restrictothers from using a user interface; programmers were free to implementany interface they chose. Imitating interfaces, sometimes with changes,was standard practice in the computer field. The interfaces we knowevolved gradually in this way; for example, the Macintosh user interfacedrew ideas from the Xerox interface, which in turn drew on work done atStanford and SRI. 1-2-3 imitated VisiCalc, and dBase imitated adatabase program from JPL.Most computer companies, and nearly all computer users, were happy withthis state of affairs. The companies that are suing say it does notoffer ``enough incentive'' to develop their products, but they must haveconsidered it ``enough'' when they made their decision to do so. Itseems they are not satisfied with the opportunity to continue to competein the marketplace---not even with a head start.If Xerox, Lotus, Apple and Ashton-Tate are permitted to make law throughthe courts, the precedent will hobble the software industry:@itemize @bullet@itemGratuitous incompatibilities will burden users. Imagine if eachcar manufacturer had to arrange the pedals in a different order.@itemSoftware will become and remain more expensive. Users will be``locked in'' to proprietary interfaces, for which there is no realcompetition.@itemLarge companies have an unfair advantage wherever lawsuits becomecommonplace. Since they can easily afford to sue, they can intimidatesmall companies with threats even when they don't really have a case.@itemUser interface improvements will come slower, since incrementalevolution through creative imitation will no longer be permitted.@itemEven Apple, etc., will find it harder to make improvements ifthey can no longer adapt the good ideas that others introduce, forfear of weakening their own legal positions. Some users suggest thatthis stagnation may already have started.@itemIf you use GNU software, you might find it of some concern that userinterface copyright will make it hard for the Free Software Foundationto develop programs compatible with the interfaces that you alreadyknow.@end itemizeTo protect our freedom from lawsuits like these, a group of programmersand users have formed a new grass-roots political organization, theLeague for Programming Freedom.The purpose of the League is to oppose new monopolistic practices suchas user-interface copyright and software patents; it calls for a returnto the legal policies of the recent past, in which these practices werenot allowed. The League is not concerned with free software as anissue, and not affiliated with the Free Software Foundation.The League's membership rolls include John McCarthy, inventor of Lisp,Marvin Minsky, founder of the Artificial Intelligence lab, Guy L.Steele, Jr., author of well-known books on Lisp and C, as well asRichard Stallman, the developer of GNU CC. Please join and add yourname to the list. Membership dues in the League are $42 per year forprogrammers, managers and professionals; $10.50 for students; $21 forothers.The League needs both activist members and members who only pay theirdues.To join, or for more information, phone (617) 492-0023 or write to:@exampleLeague for Programming Freedom1 Kendall Square #143P.O. Box 9171Cambridge, MA 02139 league@@prep.ai.mit.edu@end exampleHere are some suggestions from the League for how you can protect yourfreedom to write programs:@itemize @bullet@itemDon't buy from Xerox, Lotus, Apple or Ashton-Tate. Buy from theircompetitors or from the defendants they are suing.@itemDon't develop software to work with the systems made by these companies.@itemPort your existing software to competing systems, so that you encourageusers to switch.@itemWrite letters to company presidents to let them know their conductis unacceptable.@itemTell your friends and colleagues about this issue and how it threatensto ruin the computer industry.@itemAbove all, don't work for the look-and-feel plaintiffs, and don'taccept contracts from them.@itemWrite to Congress to explain the importance of this issue.@exampleHouse Subcommittee on Intellectual Property2137 Rayburn BldgWashington, DC 20515Senate Subcommittee on Patents, Trademarks and CopyrightsUnited States SenateWashington, DC 20510@end example@end itemizeExpress your opinion! You can make a difference.@node Options, Installation, Boycott, Top@chapter GNU CC Command OptionsThe GNU C compiler uses a command syntax much like the Unix C compiler.The @code{gcc} program accepts options and file names as operands.Multiple single-letter options may @emph{not} be grouped: @samp{-dr} isvery different from @w{@samp{-d -r}}.When you invoke GNU CC, it normally does preprocessing, compilation,assembly and linking. File names which end in @samp{.c} are taken as Csource to be preprocessed and compiled; file names ending in @samp{.i}are taken as preprocessor output to be compiled; compiler output filesplus any input files with names ending in @samp{.s} are assembled; thenthe resulting object files, plus any other input files, are linkedtogether to produce an executable.Command options allow you to stop this process at an intermediate stage.For example, the @samp{-c} option says not to run the linker. Then theoutput consists of object files output by the assembler.Other command options are passed on to one stage of processing. Someoptions control the preprocessor and others the compiler itself. Yetother options control the assembler and linker; these are not documentedhere, but you rarely need to use any of them.Here are the options to control the overall compilation process, includingthose that say whether to link, whether to assemble, and so on.@table @samp@item -o @var{file}Place output in file @var{file}. This applies regardless to whateversort of output is being produced, whether it be an executable file,an object file, an assembler file or preprocessed C code.If @samp{-o} is not specified, the default is to put an executable filein @file{a.out}, the object file @file{@var{source}.c} in@file{@var{source}.o}, an assembler file in @file{@var{source}.s}, andpreprocessed C on standard output.@refill@item -cCompile or assemble the source files, but do not link. Produce objectfiles with names made by replacing @samp{.c} or @samp{.s} with@samp{.o} at the end of the input file names. Do nothing at all forobject files specified as input.@item -SCompile into assembler code but do not assemble. The assembler outputfile name is made by replacing @samp{.c} with @samp{.s} at the end ofthe input file name. Do nothing at all for assembler source files orobject files specified as input.@item -ERun only the C preprocessor. Preprocess all the C source filesspecified and output the results to standard output.@item -vCompiler driver program prints the commands it executes as it runsthe preprocessor, compiler proper, assembler and linker. Some ofthese are directed to print their own version numbers.@item -pipeUse pipes rather than temporary files for communication between thevarious stages of compilation. This fails to work on some systemswhere the assembler is unable to read from a pipe; but the GNUassembler has no trouble.@item -B@var{prefix}Compiler driver program tries @var{prefix} as a prefix for eachprogram it tries to run. These programs are @file{cpp}, @file{cc1},@file{as} and @file{ld}.For each subprogram to be run, the compiler driver first tries the@samp{-B} prefix, if any. If that name is not found, or if @samp{-B}was not specified, the driver tries two standard prefixes, which are@file{/usr/lib/gcc-} and @file{/usr/local/lib/gcc-}. If neither ofthose results in a file name that is found, the unmodified programname is searched for using the directories specified in your
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -