home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / info / gcc.i01 < prev    next >
Encoding:
GNU Info File  |  1993-06-12  |  45.7 KB  |  1,014 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.47 from the input
  2. file gcc.tex.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc.
  7.  
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.  
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided also
  14. that the sections entitled "GNU General Public License" and "Protect
  15. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  16. original, and provided that the entire resulting derived work is
  17. distributed under the terms of a permission notice identical to this
  18. one.
  19.  
  20.    Permission is granted to copy and distribute translations of this
  21. manual into another language, under the above conditions for modified
  22. versions, except that the sections entitled "GNU General Public
  23. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  24. permission notice, may be included in translations approved by the Free
  25. Software Foundation instead of in the original English.
  26.  
  27. 
  28. File: gcc.info,  Node: Top,  Next: Copying,  Up: (DIR)
  29.  
  30. Introduction
  31. ************
  32.  
  33.    This manual documents how to run, install and port the GNU C
  34. compiler, as well as its new features and incompatibilities, and how to
  35. report bugs. It corresponds to GNU CC version 2.3.
  36.  
  37. * Menu:
  38.  
  39. * Copying::         GNU General Public License says
  40.                      how you can copy and share GNU CC.
  41. * Contributors::    People who have contributed to GNU CC.
  42. * Boycott::        Protect your freedom--fight "look and feel".
  43. * Invoking GCC::    Command options supported by `gcc'.
  44. * Installation::    How to configure, compile and install GNU CC.
  45. * Extensions::      GNU extensions to the C language.
  46. * Trouble::         If you have trouble installing GNU CC.
  47. * Bugs::            How, why and where to report bugs.
  48. * Service::         How to find suppliers of support for GNU CC.
  49. * VMS::             Using GNU CC on VMS.
  50. * Portability::     Goals of GNU CC's portability features.
  51. * Interface::       Function-call interface of GNU CC output.
  52. * Passes::          Order of passes, what they do, and what each file is for.
  53. * RTL::             The intermediate representation that most passes work on.
  54. * Machine Desc::    How to write machine description instruction patterns.
  55. * Target Macros::   How to write the machine description C macros.
  56. * Config::          Writing the `xm-MACHINE.h' file.
  57. * Index::        Index of concepts and symbol names.
  58.  
  59. 
  60. File: gcc.info,  Node: Copying,  Next: Contributors,  Prev: Top,  Up: Top
  61.  
  62. GNU GENERAL PUBLIC LICENSE
  63. **************************
  64.  
  65.                          Version 2, June 1991
  66.  
  67.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  68.      675 Mass Ave, Cambridge, MA 02139, USA
  69.      
  70.      Everyone is permitted to copy and distribute verbatim copies
  71.      of this license document, but changing it is not allowed.
  72.  
  73. Preamble
  74. ========
  75.  
  76.    The licenses for most software are designed to take away your
  77. freedom to share and change it.  By contrast, the GNU General Public
  78. License is intended to guarantee your freedom to share and change free
  79. software--to make sure the software is free for all its users.  This
  80. General Public License applies to most of the Free Software
  81. Foundation's software and to any other program whose authors commit to
  82. using it.  (Some other Free Software Foundation software is covered by
  83. the GNU Library General Public License instead.)  You can apply it to
  84. your programs, too.
  85.  
  86.    When we speak of free software, we are referring to freedom, not
  87. price.  Our General Public Licenses are designed to make sure that you
  88. have the freedom to distribute copies of free software (and charge for
  89. this service if you wish), that you receive source code or can get it
  90. if you want it, that you can change the software or use pieces of it in
  91. new free programs; and that you know you can do these things.
  92.  
  93.    To protect your rights, we need to make restrictions that forbid
  94. anyone to deny you these rights or to ask you to surrender the rights.
  95. These restrictions translate to certain responsibilities for you if you
  96. distribute copies of the software, or if you modify it.
  97.  
  98.    For example, if you distribute copies of such a program, whether
  99. gratis or for a fee, you must give the recipients all the rights that
  100. you have.  You must make sure that they, too, receive or can get the
  101. source code.  And you must show them these terms so they know their
  102. rights.
  103.  
  104.    We protect your rights with two steps: (1) copyright the software,
  105. and (2) offer you this license which gives you legal permission to copy,
  106. distribute and/or modify the software.
  107.  
  108.    Also, for each author's protection and ours, we want to make certain
  109. that everyone understands that there is no warranty for this free
  110. software.  If the software is modified by someone else and passed on, we
  111. want its recipients to know that what they have is not the original, so
  112. that any problems introduced by others will not reflect on the original
  113. authors' reputations.
  114.  
  115.    Finally, any free program is threatened constantly by software
  116. patents.  We wish to avoid the danger that redistributors of a free
  117. program will individually obtain patent licenses, in effect making the
  118. program proprietary.  To prevent this, we have made it clear that any
  119. patent must be licensed for everyone's free use or not licensed at all.
  120.  
  121.    The precise terms and conditions for copying, distribution and
  122. modification follow.
  123.  
  124.     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  125.  
  126.   1. This License applies to any program or other work which contains a
  127.      notice placed by the copyright holder saying it may be distributed
  128.      under the terms of this General Public License.  The "Program",
  129.      below, refers to any such program or work, and a "work based on
  130.      the Program" means either the Program or any derivative work under
  131.      copyright law: that is to say, a work containing the Program or a
  132.      portion of it, either verbatim or with modifications and/or
  133.      translated into another language.  (Hereinafter, translation is
  134.      included without limitation in the term "modification".)  Each
  135.      licensee is addressed as "you".
  136.  
  137.      Activities other than copying, distribution and modification are
  138.      not covered by this License; they are outside its scope.  The act
  139.      of running the Program is not restricted, and the output from the
  140.      Program is covered only if its contents constitute a work based on
  141.      the Program (independent of having been made by running the
  142.      Program). Whether that is true depends on what the Program does.
  143.  
  144.   2. You may copy and distribute verbatim copies of the Program's
  145.      source code as you receive it, in any medium, provided that you
  146.      conspicuously and appropriately publish on each copy an appropriate
  147.      copyright notice and disclaimer of warranty; keep intact all the
  148.      notices that refer to this License and to the absence of any
  149.      warranty; and give any other recipients of the Program a copy of
  150.      this License along with the Program.
  151.  
  152.      You may charge a fee for the physical act of transferring a copy,
  153.      and you may at your option offer warranty protection in exchange
  154.      for a fee.
  155.  
  156.   3. You may modify your copy or copies of the Program or any portion
  157.      of it, thus forming a work based on the Program, and copy and
  158.      distribute such modifications or work under the terms of Section 1
  159.      above, provided that you also meet all of these conditions:
  160.  
  161.        a. You must cause the modified files to carry prominent notices
  162.           stating that you changed the files and the date of any change.
  163.  
  164.        b. You must cause any work that you distribute or publish, that
  165.           in whole or in part contains or is derived from the Program
  166.           or any part thereof, to be licensed as a whole at no charge
  167.           to all third parties under the terms of this License.
  168.  
  169.        c. If the modified program normally reads commands interactively
  170.           when run, you must cause it, when started running for such
  171.           interactive use in the most ordinary way, to print or display
  172.           an announcement including an appropriate copyright notice and
  173.           a notice that there is no warranty (or else, saying that you
  174.           provide a warranty) and that users may redistribute the
  175.           program under these conditions, and telling the user how to
  176.           view a copy of this License.  (Exception: if the Program
  177.           itself is interactive but does not normally print such an
  178.           announcement, your work based on the Program is not required
  179.           to print an announcement.)
  180.  
  181.      These requirements apply to the modified work as a whole.  If
  182.      identifiable sections of that work are not derived from the
  183.      Program, and can be reasonably considered independent and separate
  184.      works in themselves, then this License, and its terms, do not
  185.      apply to those sections when you distribute them as separate
  186.      works.  But when you distribute the same sections as part of a
  187.      whole which is a work based on the Program, the distribution of
  188.      the whole must be on the terms of this License, whose permissions
  189.      for other licensees extend to the entire whole, and thus to each
  190.      and every part regardless of who wrote it.
  191.  
  192.      Thus, it is not the intent of this section to claim rights or
  193.      contest your rights to work written entirely by you; rather, the
  194.      intent is to exercise the right to control the distribution of
  195.      derivative or collective works based on the Program.
  196.  
  197.      In addition, mere aggregation of another work not based on the
  198.      Program with the Program (or with a work based on the Program) on
  199.      a volume of a storage or distribution medium does not bring the
  200.      other work under the scope of this License.
  201.  
  202.   4. You may copy and distribute the Program (or a work based on it,
  203.      under Section 2) in object code or executable form under the terms
  204.      of Sections 1 and 2 above provided that you also do one of the
  205.      following:
  206.  
  207.        a. Accompany it with the complete corresponding machine-readable
  208.           source code, which must be distributed under the terms of
  209.           Sections 1 and 2 above on a medium customarily used for
  210.           software interchange; or,
  211.  
  212.        b. Accompany it with a written offer, valid for at least three
  213.           years, to give any third party, for a charge no more than your
  214.           cost of physically performing source distribution, a complete
  215.           machine-readable copy of the corresponding source code, to be
  216.           distributed under the terms of Sections 1 and 2 above on a
  217.           medium customarily used for software interchange; or,
  218.  
  219.        c. Accompany it with the information you received as to the offer
  220.           to distribute corresponding source code.  (This alternative is
  221.           allowed only for noncommercial distribution and only if you
  222.           received the program in object code or executable form with
  223.           such an offer, in accord with Subsection b above.)
  224.  
  225.      The source code for a work means the preferred form of the work for
  226.      making modifications to it.  For an executable work, complete
  227.      source code means all the source code for all modules it contains,
  228.      plus any associated interface definition files, plus the scripts
  229.      used to control compilation and installation of the executable. 
  230.      However, as a special exception, the source code distributed need
  231.      not include anything that is normally distributed (in either
  232.      source or binary form) with the major components (compiler,
  233.      kernel, and so on) of the operating system on which the executable
  234.      runs, unless that component itself accompanies the executable.
  235.  
  236.      If distribution of executable or object code is made by offering
  237.      access to copy from a designated place, then offering equivalent
  238.      access to copy the source code from the same place counts as
  239.      distribution of the source code, even though third parties are not
  240.      compelled to copy the source along with the object code.
  241.  
  242.   5. You may not copy, modify, sublicense, or distribute the Program
  243.      except as expressly provided under this License.  Any attempt
  244.      otherwise to copy, modify, sublicense or distribute the Program is
  245.      void, and will automatically terminate your rights under this
  246.      License. However, parties who have received copies, or rights,
  247.      from you under this License will not have their licenses
  248.      terminated so long as such parties remain in full compliance.
  249.  
  250.   6. You are not required to accept this License, since you have not
  251.      signed it.  However, nothing else grants you permission to modify
  252.      or distribute the Program or its derivative works.  These actions
  253.      are prohibited by law if you do not accept this License. 
  254.      Therefore, by modifying or distributing the Program (or any work
  255.      based on the Program), you indicate your acceptance of this
  256.      License to do so, and all its terms and conditions for copying,
  257.      distributing or modifying the Program or works based on it.
  258.  
  259.   7. Each time you redistribute the Program (or any work based on the
  260.      Program), the recipient automatically receives a license from the
  261.      original licensor to copy, distribute or modify the Program
  262.      subject to these terms and conditions.  You may not impose any
  263.      further restrictions on the recipients' exercise of the rights
  264.      granted herein. You are not responsible for enforcing compliance
  265.      by third parties to this License.
  266.  
  267.   8. If, as a consequence of a court judgment or allegation of patent
  268.      infringement or for any other reason (not limited to patent
  269.      issues), conditions are imposed on you (whether by court order,
  270.      agreement or otherwise) that contradict the conditions of this
  271.      License, they do not excuse you from the conditions of this
  272.      License.  If you cannot distribute so as to satisfy simultaneously
  273.      your obligations under this License and any other pertinent
  274.      obligations, then as a consequence you may not distribute the
  275.      Program at all.  For example, if a patent license would not permit
  276.      royalty-free redistribution of the Program by all those who
  277.      receive copies directly or indirectly through you, then the only
  278.      way you could satisfy both it and this License would be to refrain
  279.      entirely from distribution of the Program.
  280.  
  281.      If any portion of this section is held invalid or unenforceable
  282.      under any particular circumstance, the balance of the section is
  283.      intended to apply and the section as a whole is intended to apply
  284.      in other circumstances.
  285.  
  286.      It is not the purpose of this section to induce you to infringe any
  287.      patents or other property right claims or to contest validity of
  288.      any such claims; this section has the sole purpose of protecting
  289.      the integrity of the free software distribution system, which is
  290.      implemented by public license practices.  Many people have made
  291.      generous contributions to the wide range of software distributed
  292.      through that system in reliance on consistent application of that
  293.      system; it is up to the author/donor to decide if he or she is
  294.      willing to distribute software through any other system and a
  295.      licensee cannot impose that choice.
  296.  
  297.      This section is intended to make thoroughly clear what is believed
  298.      to be a consequence of the rest of this License.
  299.  
  300.   9. If the distribution and/or use of the Program is restricted in
  301.      certain countries either by patents or by copyrighted interfaces,
  302.      the original copyright holder who places the Program under this
  303.      License may add an explicit geographical distribution limitation
  304.      excluding those countries, so that distribution is permitted only
  305.      in or among countries not thus excluded.  In such case, this
  306.      License incorporates the limitation as if written in the body of
  307.      this License.
  308.  
  309.  10. The Free Software Foundation may publish revised and/or new
  310.      versions of the General Public License from time to time.  Such
  311.      new versions will be similar in spirit to the present version, but
  312.      may differ in detail to address new problems or concerns.
  313.  
  314.      Each version is given a distinguishing version number.  If the
  315.      Program specifies a version number of this License which applies
  316.      to it and "any later version", you have the option of following
  317.      the terms and conditions either of that version or of any later
  318.      version published by the Free Software Foundation.  If the Program
  319.      does not specify a version number of this License, you may choose
  320.      any version ever published by the Free Software Foundation.
  321.  
  322.  11. If you wish to incorporate parts of the Program into other free
  323.      programs whose distribution conditions are different, write to the
  324.      author to ask for permission.  For software which is copyrighted
  325.      by the Free Software Foundation, write to the Free Software
  326.      Foundation; we sometimes make exceptions for this.  Our decision
  327.      will be guided by the two goals of preserving the free status of
  328.      all derivatives of our free software and of promoting the sharing
  329.      and reuse of software generally.
  330.  
  331.                                 NO WARRANTY
  332.  
  333.  12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  334.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  335.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  336.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  337.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  338.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  339.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  340.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  341.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  342.      SERVICING, REPAIR OR CORRECTION.
  343.  
  344.  13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  345.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  346.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  347.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  348.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  349.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  350.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  351.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  352.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  353.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  354.  
  355.                       END OF TERMS AND CONDITIONS
  356.  
  357. How to Apply These Terms to Your New Programs
  358. =============================================
  359.  
  360.    If you develop a new program, and you want it to be of the greatest
  361. possible use to the public, the best way to achieve this is to make it
  362. free software which everyone can redistribute and change under these
  363. terms.
  364.  
  365.    To do so, attach the following notices to the program.  It is safest
  366. to attach them to the start of each source file to most effectively
  367. convey the exclusion of warranty; and each file should have at least
  368. the "copyright" line and a pointer to where the full notice is found.
  369.  
  370.      ONE LINE TO GIVE THE PROGRAM'S NAME AND AN IDEA OF WHAT IT DOES.
  371.      Copyright (C) 19YY  NAME OF AUTHOR
  372.      
  373.      This program is free software; you can redistribute it and/or
  374.      modify it under the terms of the GNU General Public License
  375.      as published by the Free Software Foundation; either version 2
  376.      of the License, or (at your option) any later version.
  377.      
  378.      This program is distributed in the hope that it will be useful,
  379.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  380.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  381.      GNU General Public License for more details.
  382.      
  383.      You should have received a copy of the GNU General Public License
  384.      along with this program; if not, write to the Free Software
  385.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  386.  
  387.    Also add information on how to contact you by electronic and paper
  388. mail.
  389.  
  390.    If the program is interactive, make it output a short notice like
  391. this when it starts in an interactive mode:
  392.  
  393.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  394.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
  395.      type `show w'.  This is free software, and you are welcome
  396.      to redistribute it under certain conditions; type `show c'
  397.      for details.
  398.  
  399.    The hypothetical commands `show w' and `show c' should show the
  400. appropriate parts of the General Public License.  Of course, the
  401. commands you use may be called something other than `show w' and `show
  402. c'; they could even be mouse-clicks or menu items--whatever suits your
  403. program.
  404.  
  405.    You should also get your employer (if you work as a programmer) or
  406. your school, if any, to sign a "copyright disclaimer" for the program,
  407. if necessary.  Here is a sample; alter the names:
  408.  
  409.      Yoyodyne, Inc., hereby disclaims all copyright
  410.      interest in the program `Gnomovision'
  411.      (which makes passes at compilers) written
  412.      by James Hacker.
  413.      
  414.      SIGNATURE OF TY COON, 1 April 1989
  415.      Ty Coon, President of Vice
  416.  
  417.    This General Public License does not permit incorporating your
  418. program into proprietary programs.  If your program is a subroutine
  419. library, you may consider it more useful to permit linking proprietary
  420. applications with the library.  If this is what you want to do, use the
  421. GNU Library General Public License instead of this License.
  422.  
  423. 
  424. File: gcc.info,  Node: Contributors,  Next: Boycott,  Prev: Copying,  Up: Top
  425.  
  426. Contributors to GNU CC
  427. **********************
  428.  
  429.    In addition to Richard Stallman, several people have written parts
  430. of GNU CC.
  431.  
  432.    * The idea of using RTL and some of the optimization ideas came from
  433.      the program PO written at the University of Arizona by Jack
  434.      Davidson and Christopher Fraser.  See "Register Allocation and
  435.      Exhaustive Peephole Optimization", Software Practice and
  436.      Experience 14 (9), Sept. 1984, 857-866.
  437.  
  438.    * Paul Rubin wrote most of the preprocessor.
  439.  
  440.    * Leonard Tower wrote parts of the parser, RTL generator, and RTL
  441.      definitions, and of the Vax machine description.
  442.  
  443.    * Ted Lemon wrote parts of the RTL reader and printer.
  444.  
  445.    * Jim Wilson implemented loop strength reduction and some other loop
  446.      optimizations.
  447.  
  448.    * Nobuyuki Hikichi of Software Research Associates, Tokyo,
  449.      contributed the support for the Sony NEWS machine.
  450.  
  451.    * Charles LaBrec contributed the support for the Integrated Solutions
  452.      68020 system.
  453.  
  454.    * Michael Tiemann of Cygnus Support wrote the front end for C++, as
  455.      well as the support for inline functions and instruction
  456.      scheduling.  Also the descriptions of the National Semiconductor
  457.      32000 series cpu, the SPARC cpu and part of the Motorola 88000 cpu.
  458.  
  459.    * Jan Stein of the Chalmers Computer Society provided support for
  460.      Genix, as well as part of the 32000 machine description.
  461.  
  462.    * Randy Smith finished the Sun FPA support.
  463.  
  464.    * Robert Brown implemented the support for Encore 32000 systems.
  465.  
  466.    * David Kashtan of SRI adapted GNU CC to the Vomit-Making System
  467.      (VMS).
  468.  
  469.    * Alex Crain provided changes for the 3b1.
  470.  
  471.    * Greg Satz and Chris Hanson assisted in making GNU CC work on HP-UX
  472.      for the 9000 series 300.
  473.  
  474.    * William Schelter did most of the work on the Intel 80386 support.
  475.  
  476.    * Christopher Smith did the port for Convex machines.
  477.  
  478.    * Paul Petersen wrote the machine description for the Alliant FX/8.
  479.  
  480.    * Alain Lichnewsky ported GNU CC to the Mips cpu.
  481.  
  482.    * Devon Bowen, Dale Wiles and Kevin Zachmann ported GNU CC to the
  483.      Tahoe.
  484.  
  485.    * Jonathan Stone wrote the machine description for the Pyramid
  486.      computer.
  487.  
  488.    * Gary Miller ported GNU CC to Charles River Data Systems machines.
  489.  
  490.    * Richard Kenner of the New York University Ultracomputer Research
  491.      Laboratory wrote the machine descriptions for the AMD 29000, the
  492.      DEC Alpha, the IBM RT PC, and the IBM RS/6000 as well as the
  493.      support for instruction attributes.  He also made changes to
  494.      better support RISC processors including changes to common
  495.      subexpression elimination, strength reduction, function calling
  496.      sequence handling, and condition code support, in addition to
  497.      generalizing the code for frame pointer elimination.
  498.  
  499.    * Richard Kenner and Michael Tiemann jointly developed reorg.c, the
  500.      delay slot scheduler.
  501.  
  502.    * Mike Meissner and Tom Wood of Data General finished the port to the
  503.      Motorola 88000.
  504.  
  505.    * Masanobu Yuhara of Fujitsu Laboratories implemented the machine
  506.      description for the Tron architecture (specifically, the Gmicro).
  507.  
  508.    * NeXT, Inc. donated the front end that supports the Objective C
  509.      language.
  510.  
  511.    * James van Artsdalen wrote the code that makes efficient use of the
  512.      Intel 80387 register stack.
  513.  
  514.    * Mike Meissner at the Open Software Foundation finished the port to
  515.      the MIPS cpu, including adding ECOFF debug support.
  516.  
  517.    * Ron Guilmette implemented the `protoize' and `unprotoize' tools,
  518.      the support for Dwarf symbolic debugging information, and much of
  519.      the support for System V Release 4.  He has also worked heavily on
  520.      the Intel 386 and 860 support.
  521.  
  522.    * Torbjorn Granlund of the Swedish Institute of Computer Science
  523.      implemented multiply-by-constant optimization and better long long
  524.      support, and improved leaf function register allocation.
  525.  
  526.    * Mike Stump implemented the support for Elxsi 64 bit CPU.
  527.  
  528. 
  529. File: gcc.info,  Node: Boycott,  Next: Invoking GCC,  Prev: Contributors,  Up: Top
  530.  
  531. Protect Your Freedom--Fight "Look And Feel"
  532. *******************************************
  533.  
  534.      This section is a political message from the League for Programming
  535.      Freedom to the users of GNU CC.  It is included here as an
  536.      expression of support for the League on the part of the Free
  537.      Software Foundation.
  538.  
  539.    Apple and Lotus are trying to create a new form of legal monopoly: a
  540. copyright on a class of user interfaces.  These monopolies would cause
  541. serious problems for users and developers of computer software and
  542. systems.  Xerox, too, has tried to make a monopoly for itself on window
  543. systems; their suit against Apple was thrown out on a technicality, but
  544. Xerox has not said anything to indicate it wouldn't try again.
  545.  
  546.    Until a few years ago, the law seemed clear: no one could restrict
  547. others from using a user interface; programmers were free to implement
  548. any interface they chose.  Imitating interfaces, sometimes with changes,
  549. was standard practice in the computer field.  The interfaces we know
  550. evolved gradually in this way; for example, the Macintosh user interface
  551. drew ideas from the Xerox interface, which in turn drew on work done at
  552. Stanford and SRI.  1-2-3 imitated VisiCalc, and dBase imitated a
  553. database program from JPL.
  554.  
  555.    Most computer companies, and nearly all computer users, were happy
  556. with this state of affairs.  The companies that are suing say it does
  557. not offer "enough incentive" to develop their products, but they must
  558. have considered it "enough" when they made their decision to do so.  It
  559. seems they are not satisfied with the opportunity to continue to compete
  560. in the marketplace--not even with a head start.
  561.  
  562.    If companies like Xerox, Lotus, and Apple are permitted to make law
  563. through the courts, the precedent will hobble the software industry:
  564.  
  565.    * Gratuitous incompatibilities will burden users.  Imagine if each
  566.      car manufacturer had to arrange the pedals in a different order.
  567.  
  568.    * Software will become and remain more expensive.  Users will be
  569.      "locked in" to proprietary interfaces, for which there is no real
  570.      competition.
  571.  
  572.    * Large companies have an unfair advantage wherever lawsuits become
  573.      commonplace.  Since they can easily afford to sue, they can
  574.      intimidate small companies with threats even when they don't
  575.      really have a case.
  576.  
  577.    * User interface improvements will come slower, since incremental
  578.      evolution through creative imitation will no longer be permitted.
  579.  
  580.    * Even Apple, etc., will find it harder to make improvements if they
  581.      can no longer adapt the good ideas that others introduce, for fear
  582.      of weakening their own legal positions.  Some users suggest that
  583.      this stagnation may already have started.
  584.  
  585.    * If you use GNU software, you might find it of some concern that
  586.      user interface copyright will make it hard for the Free Software
  587.      Foundation to develop programs compatible with the interfaces that
  588.      you already know.
  589.  
  590.    To protect our freedom from lawsuits like these, a group of
  591. programmers and users have formed a new grass-roots political
  592. organization, the League for Programming Freedom.
  593.  
  594.    The purpose of the League is to oppose new monopolistic practices
  595. such as user-interface copyright and software patents; it calls for a
  596. return to the legal policies of the recent past, in which these
  597. practices were not allowed.  The League is not concerned with free
  598. software as an issue, and not affiliated with the Free Software
  599. Foundation.
  600.  
  601.    The League's membership rolls include John McCarthy, inventor of
  602. Lisp, Marvin Minsky, founder of the Artificial Intelligence lab, Guy L.
  603. Steele, Jr., author of well-known books on Lisp and C, as well as
  604. Richard Stallman, the developer of GNU CC.  Please join and add your
  605. name to the list.  Membership dues in the League are $42 per year for
  606. programmers, managers and professionals; $10.50 for students; $21 for
  607. others.
  608.  
  609.    The League needs both activist members and members who only pay their
  610. dues.
  611.  
  612.    To join, or for more information, phone (617) 243-4091 or write to:
  613.  
  614.      League for Programming Freedom
  615.      1 Kendall Square #143
  616.      P.O. Box 9171
  617.      Cambridge, MA 02139
  618.  
  619.    You can also send electronic mail to `league@prep.ai.mit.edu'.
  620.  
  621.    Here are some suggestions from the League for things you can do to
  622. protect your freedom to write programs:
  623.  
  624.    * Don't buy from Xerox, Lotus or Apple.  Buy from their competitors
  625.      or from the defendants they are suing.
  626.  
  627.    * Don't develop software to work with the systems made by these
  628.      companies.
  629.  
  630.    * Port your existing software to competing systems, so that you
  631.      encourage users to switch.
  632.  
  633.    * Write letters to company presidents to let them know their conduct
  634.      is unacceptable.
  635.  
  636.    * Tell your friends and colleagues about this issue and how it
  637.      threatens to ruin the computer industry.
  638.  
  639.    * Above all, don't work for the look-and-feel plaintiffs, and don't
  640.      accept contracts from them.
  641.  
  642.    * Write to Congress to explain the importance of this issue.
  643.  
  644.           House Subcommittee on Intellectual Property
  645.           2137 Rayburn Bldg
  646.           Washington, DC 20515
  647.           
  648.           Senate Subcommittee on Patents, Trademarks and Copyrights
  649.           United States Senate
  650.           Washington, DC 20510
  651.  
  652.      (These committees have received lots of mail already; let's give
  653.      them even more.)
  654.  
  655.    Express your opinion!  You can make a difference.
  656.  
  657. 
  658. File: gcc.info,  Node: Invoking GCC,  Next: Installation,  Prev: Boycott,  Up: Top
  659.  
  660. GNU CC Command Options
  661. **********************
  662.  
  663.    When you invoke GNU CC, it normally does preprocessing, compilation,
  664. assembly and linking.  The "overall options" allow you to stop this
  665. process at an intermediate stage.  For example, the `-c' option says
  666. not to run the linker.  Then the output consists of object files output
  667. by the assembler.
  668.  
  669.    Other options are passed on to one stage of processing.  Some options
  670. control the preprocessor and others the compiler itself.  Yet other
  671. options control the assembler and linker; most of these are not
  672. documented here, since you rarely need to use any of them.
  673.  
  674.    The `gcc' program accepts options and file names as operands.  Many
  675. options have multiletter names; therefore multiple single-letter options
  676. may *not* be grouped: `-dr' is very different from `-d -r'.
  677.  
  678.    You can mix options and other arguments.  For the most part, the
  679. order you use doesn't matter.  Order does matter when you use several
  680. options of the same kind; for example, if you specify `-L' more than
  681. once, the directories are searched in the order specified.
  682.  
  683.    Many options have long names starting with `-f' or with `-W'--for
  684. example, `-fforce-mem', `-fstrength-reduce', `-Wformat' and so on. 
  685. Most of these have both positive and negative forms; the negative form
  686. of `-ffoo' would be `-fno-foo'.  This manual documents only one of
  687. these two forms, whichever one is not the default.
  688.  
  689. * Menu:
  690.  
  691. * Option Summary::    Brief list of all options, without explanations.
  692. * Overall Options::     Controlling the kind of output:
  693.                         an executable, object files, assembler files,
  694.                         or preprocessed source.
  695. * Dialect Options::     Controlling the variant of C language compiled.
  696. * Warning Options::     How picky should the compiler be?
  697. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  698. * Optimize Options::    How much optimization?
  699. * Preprocessor Options:: Controlling header files and macro definitions.
  700.                          Also, getting dependency information for Make.
  701. * Assembler Options::   Passing options to the assembler.
  702. * Link Options::        Specifying libraries and so on.
  703. * Directory Options::   Where to find header files and libraries.
  704.                         Where to find the compiler executable files.
  705. * Target Options::      Running a cross-compiler, or an old version of GNU CC.
  706. * Submodel Options::    Specifying minor hardware or convention variations,
  707.                         such as 68010 vs 68020.
  708. * Code Gen Options::    Specifying conventions for function calls, data layout
  709.                         and register usage.
  710. * Environment Variables:: Env vars that affect GNU CC.
  711. * Running Protoize::    Automatically adding or removing function prototypes.
  712.  
  713. 
  714. File: gcc.info,  Node: Option Summary,  Next: Overall Options,  Up: Invoking GCC
  715.  
  716. Option Summary
  717. ==============
  718.  
  719.    Here is a summary of all the options, grouped by type.  Explanations
  720. are in the following sections.
  721.  
  722. *Overall Options*
  723.      *Note Options Controlling the Kind of Output: Overall Options.
  724.           -c  -S  -E  -o FILE  -pipe  -v  -x LANGUAGE
  725.  
  726. *Language Options*
  727.      *Note Options Controlling Dialect: Dialect Options.
  728.           -ansi  -fcond-mismatch  -fno-asm  -fno-builtin
  729.           -fsigned-bitfields  -fsigned-char
  730.           -funsigned-bitfields  -funsigned-char  -fwritable-strings
  731.           -traditional  -traditional-cpp  -trigraphs
  732.           -fall-virtual  -fdollars-in-identifiers  -fenum-int-equiv
  733.           -fno-strict-prototype  -fthis-is-variable
  734.  
  735. *Warning Options*
  736.      *Note Options to Request or Suppress Warnings: Warning Options.
  737.           -fsyntax-only  -pedantic  -pedantic-errors
  738.           -w  -W  -Wall  -Waggregate-return
  739.           -Wcast-align  -Wcast-qual  -Wcomment  -Wconversion  -Werror
  740.           -Wformat  -Wid-clash-LEN  -Wenum-clash  -Wimplicit  -Wimport
  741.           -Winline -Wmissing-prototypes  -Wnested-externs  -Wparentheses
  742.           -Wpointer-arith  -Wredundant-decls  -Wreturn-type  -Wshadow
  743.           -Wstrict-prototypes  -Wswitch  -Wtraditional  -Wtrigraphs
  744.           -Wuninitialized  -Wunused  -Wwrite-strings  -Wchar-subscripts
  745.  
  746. *Debugging Options*
  747.      *Note Options for Debugging Your Program or GCC: Debugging Options.
  748.           -a  -dLETTERS  -fpretend-float
  749.           -g  -gLEVEL -ggdb  -gdwarf -gdwarf+
  750.           -gstabs  -gstabs+  -gcoff -gxcoff -gxcoff+
  751.           -p  -pg  -save-temps
  752.  
  753. *Optimization Options*
  754.      *Note Options that Control Optimization: Optimize Options.
  755.           -fcaller-saves  -fcse-follow-jumps  -fcse-skip-blocks
  756.           -fdelayed-branch   -fexpensive-optimizations  -ffast-math
  757.           -ffloat-store  -fforce-addr  -fforce-mem
  758.           -finline-functions  -fkeep-inline-functions  -fno-defer-pop
  759.           -fno-function-cse  -fno-inline  -fno-peephole  -fomit-frame-pointer
  760.           -frerun-cse-after-loop  -fschedule-insns  -fschedule-insns2
  761.           -fstrength-reduce  -fthread-jumps
  762.           -funroll-all-loops  -funroll-loops
  763.           -felide-constructors  -fmemoize-lookups  -fno-default-inline
  764.           -O  -O2
  765.  
  766. *Preprocessor Options*
  767.      *Note Options Controlling the Preprocessor: Preprocessor Options.
  768.           -AASSERTION  -C  -dD  -dM  -dN
  769.           -DMACRO[=DEFN]  -E  -H
  770.           -include FILE  -imacros FILE
  771.           -M  -MD  -MM  -MMD  -nostdinc  -P  -trigraphs  -UMACRO
  772.  
  773. *Assembler Option*
  774.      *Note Passing Options to the Assembler: Assembler Options.
  775.           -Wa,OPTION
  776.  
  777. *Linker Options*
  778.      *Note Options for Linking: Link Options.
  779.           OBJECT-FILE-NAME
  780.           -lLIBRARY  -nostdlib
  781.           -static  -shared  -symbolic
  782.           -Xlinker OPTION
  783.           -u SYMBOL
  784.  
  785. *Directory Options*
  786.      *Note Options for Directory Search: Directory Options.
  787.           -BPREFIX  -IDIR  -I-  -LDIR
  788.  
  789. *Target Options*
  790.      *Note Target Machine and Compiler Version: Target Options.
  791.           -b MACHINE  -V VERSION
  792.  
  793. *Machine Dependent Options*
  794.      *Note Hardware Models and Configurations: Submodel Options.
  795.           *M680x0 Options*
  796.           -m68000 -m68020 -m68020-40 -m68030 -m68040 -m68881 -mbitfield
  797.           -mc68000 -mc68020 -mfpa -mnobitfield -mrtd -mshort -msoft-float
  798.           
  799.           *VAX Options*
  800.           -mg -mgnu -munix
  801.           
  802.           *SPARC Options*
  803.           -mforce-align  -mno-epilogue
  804.           
  805.           *Convex Options*
  806.           -margcount -mc1 -mc2 -mnoargcount
  807.           
  808.           *AMD29K Options*
  809.           -m29000 -m29050 -mbw -mdw -mkernel-registers -mlarge
  810.           -mnbw -mnodw -msmall -mstack-check -muser-registers
  811.           
  812.           *M88K Options*
  813.           -m88000 -m88100 -m88110 -mbig-pic -mcheck-zero-division
  814.           -mhandle-large-shift -midentify-revision
  815.           -mno-check-zero-division -mno-ocs-debug-info
  816.           -mno-ocs-frame-position -mno-optimize-arg-area -mno-underscores
  817.           -mocs-debug-info -mocs-frame-position -moptimize-arg-area
  818.           -mshort-data-NUM -msvr3 -msvr4 -mtrap-large-shift
  819.           -muse-div-instruction -mversion-03.00 -mwarn-passed-structs
  820.           
  821.           *RS/6000 Options*
  822.           -mfp-in-toc -mno-fop-in-toc
  823.           
  824.           *RT Options*
  825.           -mcall-lib-mul -mfp-arg-in-fpregs -mfp-arg-in-gregs
  826.           -mfull-fp-blocks -mhc-struct-return -min-line-mul
  827.           -mminimum-fp-blocks -mnohc-struct-return
  828.           
  829.           *MIPS Options*
  830.           -mcpu=CPU TYPE -mips2 -mips3 -mint64 -mlong64 -mlonglong128
  831.           -mmips-as -mgas -mrnames -mno-rnames -mgpopt -mno-gpopt -mstats
  832.           -mno-stats -mmemcpy -mno-memcpy -mno-mips-tfile -mmips-tfile
  833.           -msoft-float -mhard-float -mabicalls -mno-abicalls -mhalf-pic
  834.           -mno-half-pic -G NUM -nocpp
  835.           
  836.           *i386 Options*
  837.           -m486 -mno-486 -msoft-float -msvr3-shlib -mieee-fp
  838.           -mno-fp-ret-in-387
  839.           
  840.           *HPPA Options*
  841.           -mno-bss
  842.           -mpa-risc-1-0
  843.           -mpa-risc-1-1
  844.           -mkernel
  845.           -mshared-libs
  846.           -mno-shared-libs
  847.           -mlong-calls
  848.           
  849.           *Intel 960 Options*
  850.           -mCPU TYPE
  851.           -mnumerics -msoft-float
  852.           -mcode-align -mno-code-align
  853.           -mleaf-procedures -mno-leaf-procedures
  854.           -mtail-call -mno-tail-call
  855.           -mcomplex-addr -mno-complex-addr
  856.           -mclean-linkage -mno-clean-linkage
  857.           -mic-compat -mic2.0-compat -mic3.0-compat
  858.           -masm-compat -mintel-asm
  859.           -mstrict-align -mno-strict-align
  860.           -mold-align -mno-old-align
  861.           
  862.           *DEC Alpha Options*
  863.           -mfp-regs -mno-fp-regs -mno-soft-float -msoft-float
  864.           
  865.           *System V Options*
  866.           -G  -Qy  -Qn  -YP,PATHS  -Ym,DIR
  867.  
  868. *Code Generation Options*
  869.      *Note Options for Code Generation Conventions: Code Gen Options.
  870.           -fcall-saved-REG  -fcall-used-REG  -ffixed-REG
  871.           -finhibit-size-directive  -fnonnull-objects  -fno-common
  872.           -fno-ident  -fno-gnu-linker  -fpcc-struct-return  -fpic  -fPIC
  873.           -fshared-data  -fshort-enums  -fshort-double  -fvolatile
  874.           -fverbose-asm
  875.  
  876. * Menu:
  877.  
  878. * Overall Options::     Controlling the kind of output:
  879.                         an executable, object files, assembler files,
  880.                         or preprocessed source.
  881. * Dialect Options::     Controlling the variant of C language compiled.
  882. * Warning Options::     How picky should the compiler be?
  883. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  884. * Optimize Options::    How much optimization?
  885. * Preprocessor Options:: Controlling header files and macro definitions.
  886.                          Also, getting dependency information for Make.
  887. * Assembler Options::   Passing options to the assembler.
  888. * Link Options::        Specifying libraries and so on.
  889. * Directory Options::   Where to find header files and libraries.
  890.                         Where to find the compiler executable files.
  891. * Target Options::      Running a cross-compiler, or an old version of GNU CC.
  892.  
  893. 
  894. File: gcc.info,  Node: Overall Options,  Next: Dialect Options,  Prev: Option Summary,  Up: Invoking GCC
  895.  
  896. Options Controlling the Kind of Output
  897. ======================================
  898.  
  899.    Compilation can involve up to four stages: preprocessing, compilation
  900. proper, assembly and linking, always in that order.  The first three
  901. stages apply to an individual source file, and end by producing an
  902. object file; linking combines all the object files (those newly
  903. compiled, and those specified as input) into an executable file.
  904.  
  905.    For any given input file, the file name suffix determines what kind
  906. of compilation is done:
  907.  
  908. `FILE.c'
  909.      C source code which must be preprocessed.
  910.  
  911. `FILE.i'
  912.      C source code which should not be preprocessed.
  913.  
  914. `FILE.ii'
  915.      C++ source code which should not be preprocessed.
  916.  
  917. `FILE.m'
  918.      Objective-C source code.  Note that you must link with the library
  919.      `libobjc.a' to make an Objective-C program work.
  920.  
  921. `FILE.h'
  922.      C header file (not to be compiled or linked).
  923.  
  924. `FILE.cc'
  925. `FILE.cxx'
  926. `FILE.C'
  927.      C++ source code which must be preprocessed.
  928.  
  929. `FILE.s'
  930.      Assembler code.
  931.  
  932. `FILE.S'
  933.      Assembler code which must be preprocessed.
  934.  
  935. `OTHER'
  936.      An object file to be fed straight into linking. Any file name with
  937.      no recognized suffix is treated this way.
  938.  
  939.    You can specify the input language explicitly with the `-x' option:
  940.  
  941. `-x LANGUAGE'
  942.      Specify explicitly the LANGUAGE for the following input files
  943.      (rather than choosing a default based on the file name suffix).
  944.      This option applies to all following input files until the next
  945.      `-x' option.  Possible values of LANGUAGE are `c', `objective-c',
  946.      `c-header', `c++', `cpp-output', `assembler', and
  947.      `assembler-with-cpp'.
  948.  
  949. `-x none'
  950.      Turn off any specification of a language, so that subsequent files
  951.      are handled according to their file name suffixes (as they are if
  952.      `-x' has not been used at all).
  953.  
  954.    If you only want some of the stages of compilation, you can use `-x'
  955. (or filename suffixes) to tell `gcc' where to start, and one of the
  956. options `-c', `-S', or `-E' to say where `gcc' is to stop.  Note that
  957. some combinations (for example, `-x cpp-output -E' instruct `gcc' to do
  958. nothing at all.
  959.  
  960. `-c'
  961.      Compile or assemble the source files, but do not link.  The linking
  962.      stage simply is not done.  The ultimate output is in the form of an
  963.      object file for each source file.
  964.  
  965.      By default, the object file name for a source file is made by
  966.      replacing the suffix `.c', `.i', `.s', etc., with `.o'.
  967.  
  968.      Unrecognized input files, not requiring compilation or assembly,
  969.      are ignored.
  970.  
  971. `-S'
  972.      Stop after the stage of compilation proper; do not assemble.  The
  973.      output is in the form of an assembler code file for each
  974.      non-assembler input file specified.
  975.  
  976.      By default, the assembler file name for a source file is made by
  977.      replacing the suffix `.c', `.i', etc., with `.s'.
  978.  
  979.      Input files that don't require compilation are ignored.
  980.  
  981. `-E'
  982.      Stop after the preprocessing stage; do not run the compiler
  983.      proper.  The output is in the form of preprocessed source code,
  984.      which is sent to the standard output.
  985.  
  986.      Input files which don't require preprocessing are ignored.
  987.  
  988. `-o FILE'
  989.      Place output in file FILE.  This applies regardless to whatever
  990.      sort of output is being produced, whether it be an executable file,
  991.      an object file, an assembler file or preprocessed C code.
  992.  
  993.      Since only one output file can be specified, it does not make
  994.      sense to use `-o' when compiling more than one input file, unless
  995.      you are producing an executable file as output.
  996.  
  997.      If `-o' is not specified, the default is to put an executable file
  998.      in `a.out', the object file for `SOURCE.SUFFIX' in `SOURCE.o', its
  999.      assembler file in `SOURCE.s', and all preprocessed C source on
  1000.      standard output.
  1001.  
  1002. `-v'
  1003.      Print (on standard error output) the commands executed to run the
  1004.      stages of compilation.  Also print the version number of the
  1005.      compiler driver program and of the preprocessor and the compiler
  1006.      proper.
  1007.  
  1008. `-pipe'
  1009.      Use pipes rather than temporary files for communication between the
  1010.      various stages of compilation.  This fails to work on some systems
  1011.      where the assembler is unable to read from a pipe; but the GNU
  1012.      assembler has no trouble.
  1013.  
  1014.