home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / gcc.info-4 (.txt) < prev    next >
GNU Info File  |  1995-11-26  |  48KB  |  917 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  5. Boston, MA 02111-1307 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995 Free Software
  7. Foundation, Inc.
  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.    Permission is granted to copy and distribute modified versions of
  12. this manual under the conditions for verbatim copying, provided also
  13. that the sections entitled "GNU General Public License," "Funding for
  14. Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
  15. included exactly as in the original, and provided that the entire
  16. resulting derived work is distributed under the terms of a permission
  17. notice identical to this one.
  18.    Permission is granted to copy and distribute translations of this
  19. manual into another language, under the above conditions for modified
  20. versions, except that the sections entitled "GNU General Public
  21. License," "Funding for Free Software," and "Protect Your Freedom--Fight
  22. `Look And Feel'", and this permission notice, may be included in
  23. translations approved by the Free Software Foundation instead of in the
  24. original English.
  25. File: gcc.info,  Node: Directory Options,  Next: Target Options,  Prev: Link Options,  Up: Invoking GCC
  26. Options for Directory Search
  27. ============================
  28.    These options specify directories to search for header files, for
  29. libraries and for parts of the compiler:
  30. `-IDIR'
  31.      Add the directory DIRECTORY to the head of the list of directories
  32.      to be searched for header files.  This can be used to override a
  33.      system header file, substituting your own version, since these
  34.      directories are searched before the system header file
  35.      directories.  If you use more than one `-I' option, the
  36.      directories are scanned in left-to-right order; the standard
  37.      system directories come after.
  38. `-I-'
  39.      Any directories you specify with `-I' options before the `-I-'
  40.      option are searched only for the case of `#include "FILE"'; they
  41.      are not searched for `#include <FILE>'.
  42.      If additional directories are specified with `-I' options after
  43.      the `-I-', these directories are searched for all `#include'
  44.      directives.  (Ordinarily *all* `-I' directories are used this way.)
  45.      In addition, the `-I-' option inhibits the use of the current
  46.      directory (where the current input file came from) as the first
  47.      search directory for `#include "FILE"'.  There is no way to
  48.      override this effect of `-I-'.  With `-I.' you can specify
  49.      searching the directory which was current when the compiler was
  50.      invoked.  That is not exactly the same as what the preprocessor
  51.      does by default, but it is often satisfactory.
  52.      `-I-' does not inhibit the use of the standard system directories
  53.      for header files.  Thus, `-I-' and `-nostdinc' are independent.
  54. `-LDIR'
  55.      Add directory DIR to the list of directories to be searched for
  56.      `-l'.
  57. `-BPREFIX'
  58.      This option specifies where to find the executables, libraries,
  59.      include files, and data files of the compiler itself.
  60.      The compiler driver program runs one or more of the subprograms
  61.      `cpp', `cc1', `as' and `ld'.  It tries PREFIX as a prefix for each
  62.      program it tries to run, both with and without `MACHINE/VERSION/'
  63.      (*note Target Options::.).
  64.      For each subprogram to be run, the compiler driver first tries the
  65.      `-B' prefix, if any.  If that name is not found, or if `-B' was
  66.      not specified, the driver tries two standard prefixes, which are
  67.      `/usr/lib/gcc/' and `/usr/local/lib/gcc-lib/'.  If neither of
  68.      those results in a file name that is found, the unmodified program
  69.      name is searched for using the directories specified in your
  70.      `PATH' environment variable.
  71.      `-B' prefixes that effectively specify directory names also apply
  72.      to libraries in the linker, because the compiler translates these
  73.      options into `-L' options for the linker.  They also apply to
  74.      includes files in the preprocessor, because the compiler
  75.      translates these options into `-isystem' options for the
  76.      preprocessor.  In this case, the compiler appends `include' to the
  77.      prefix.
  78.      The run-time support file `libgcc.a' can also be searched for using
  79.      the `-B' prefix, if needed.  If it is not found there, the two
  80.      standard prefixes above are tried, and that is all.  The file is
  81.      left out of the link if it is not found by those means.
  82.      Another way to specify a prefix much like the `-B' prefix is to use
  83.      the environment variable `GCC_EXEC_PREFIX'.  *Note Environment
  84.      Variables::.
  85. File: gcc.info,  Node: Target Options,  Next: Submodel Options,  Prev: Directory Options,  Up: Invoking GCC
  86. Specifying Target Machine and Compiler Version
  87. ==============================================
  88.    By default, GNU CC compiles code for the same type of machine that
  89. you are using.  However, it can also be installed as a cross-compiler,
  90. to compile for some other type of machine.  In fact, several different
  91. configurations of GNU CC, for different target machines, can be
  92. installed side by side.  Then you specify which one to use with the
  93. `-b' option.
  94.    In addition, older and newer versions of GNU CC can be installed side
  95. by side.  One of them (probably the newest) will be the default, but
  96. you may sometimes wish to use another.
  97. `-b MACHINE'
  98.      The argument MACHINE specifies the target machine for compilation.
  99.      This is useful when you have installed GNU CC as a cross-compiler.
  100.      The value to use for MACHINE is the same as was specified as the
  101.      machine type when configuring GNU CC as a cross-compiler.  For
  102.      example, if a cross-compiler was configured with `configure
  103.      i386v', meaning to compile for an 80386 running System V, then you
  104.      would specify `-b i386v' to run that cross compiler.
  105.      When you do not specify `-b', it normally means to compile for the
  106.      same type of machine that you are using.
  107. `-V VERSION'
  108.      The argument VERSION specifies which version of GNU CC to run.
  109.      This is useful when multiple versions are installed.  For example,
  110.      VERSION might be `2.0', meaning to run GNU CC version 2.0.
  111.      The default version, when you do not specify `-V', is the last
  112.      version of GNU CC that you installed.
  113.    The `-b' and `-V' options actually work by controlling part of the
  114. file name used for the executable files and libraries used for
  115. compilation.  A given version of GNU CC, for a given target machine, is
  116. normally kept in the directory `/usr/local/lib/gcc-lib/MACHINE/VERSION'.
  117.    Thus, sites can customize the effect of `-b' or `-V' either by
  118. changing the names of these directories or adding alternate names (or
  119. symbolic links).  If in directory `/usr/local/lib/gcc-lib/' the file
  120. `80386' is a link to the file `i386v', then `-b 80386' becomes an alias
  121. for `-b i386v'.
  122.    In one respect, the `-b' or `-V' do not completely change to a
  123. different compiler: the top-level driver program `gcc' that you
  124. originally invoked continues to run and invoke the other executables
  125. (preprocessor, compiler per se, assembler and linker) that do the real
  126. work.  However, since no real work is done in the driver program, it
  127. usually does not matter that the driver program in use is not the one
  128. for the specified target and version.
  129.    The only way that the driver program depends on the target machine is
  130. in the parsing and handling of special machine-specific options.
  131. However, this is controlled by a file which is found, along with the
  132. other executables, in the directory for the specified version and
  133. target machine.  As a result, a single installed driver program adapts
  134. to any specified target machine and compiler version.
  135.    The driver program executable does control one significant thing,
  136. however: the default version and target machine.  Therefore, you can
  137. install different instances of the driver program, compiled for
  138. different targets or versions, under different names.
  139.    For example, if the driver for version 2.0 is installed as `ogcc'
  140. and that for version 2.1 is installed as `gcc', then the command `gcc'
  141. will use version 2.1 by default, while `ogcc' will use 2.0 by default.
  142. However, you can choose either version with either command with the
  143. `-V' option.
  144. File: gcc.info,  Node: Submodel Options,  Next: Code Gen Options,  Prev: Target Options,  Up: Invoking GCC
  145. Hardware Models and Configurations
  146. ==================================
  147.    Earlier we discussed the standard option `-b' which chooses among
  148. different installed compilers for completely different target machines,
  149. such as Vax vs. 68000 vs. 80386.
  150.    In addition, each of these target machine types can have its own
  151. special options, starting with `-m', to choose among various hardware
  152. models or configurations--for example, 68010 vs 68020, floating
  153. coprocessor or none.  A single installed version of the compiler can
  154. compile for any model or configuration, according to the options
  155. specified.
  156.    Some configurations of the compiler also support additional special
  157. options, usually for compatibility with other compilers on the same
  158. platform.
  159.    These options are defined by the macro `TARGET_SWITCHES' in the
  160. machine description.  The default for the options is also defined by
  161. that macro, which enables you to change the defaults.
  162. * Menu:
  163. * M680x0 Options::
  164. * VAX Options::
  165. * SPARC Options::
  166. * Convex Options::
  167. * AMD29K Options::
  168. * ARM Options::
  169. * M88K Options::
  170. * RS/6000 and PowerPC Options::
  171. * RT Options::
  172. * MIPS Options::
  173. * i386 Options::
  174. * HPPA Options::
  175. * Intel 960 Options::
  176. * DEC Alpha Options::
  177. * Clipper Options::
  178. * H8/300 Options::
  179. * System V Options::
  180. File: gcc.info,  Node: M680x0 Options,  Next: VAX Options,  Up: Submodel Options
  181. M680x0 Options
  182. --------------
  183.    These are the `-m' options defined for the 68000 series.  The default
  184. values for these options depends on which style of 68000 was selected
  185. when the compiler was configured; the defaults for the most common
  186. choices are given below.
  187. `-m68000'
  188. `-mc68000'
  189.      Generate output for a 68000.  This is the default when the
  190.      compiler is configured for 68000-based systems.
  191. `-m68020'
  192. `-mc68020'
  193.      Generate output for a 68020.  This is the default when the
  194.      compiler is configured for 68020-based systems.
  195. `-m68881'
  196.      Generate output containing 68881 instructions for floating point.
  197.      This is the default for most 68020 systems unless `-nfp' was
  198.      specified when the compiler was configured.
  199. `-m68030'
  200.      Generate output for a 68030.  This is the default when the
  201.      compiler is configured for 68030-based systems.
  202. `-m68040'
  203.      Generate output for a 68040.  This is the default when the
  204.      compiler is configured for 68040-based systems.
  205.      This option inhibits the use of 68881/68882 instructions that have
  206.      to be emulated by software on the 68040.  If your 68040 does not
  207.      have code to emulate those instructions, use `-m68040'.
  208. `-m68020-40'
  209.      Generate output for a 68040, without using any of the new
  210.      instructions.  This results in code which can run relatively
  211.      efficiently on either a 68020/68881 or a 68030 or a 68040.  The
  212.      generated code does use the 68881 instructions that are emulated
  213.      on the 68040.
  214. `-mfpa'
  215.      Generate output containing Sun FPA instructions for floating point.
  216. `-msoft-float'
  217.      Generate output containing library calls for floating point.
  218.      *Warning:* the requisite libraries are not available for all m68k
  219.      targets.  Normally the facilities of the machine's usual C
  220.      compiler are used, but this can't be done directly in
  221.      cross-compilation.  You must make your own arrangements to provide
  222.      suitable library functions for cross-compilation.  The embedded
  223.      targets `m68k-*-aout' and `m68k-*-coff' do provide software
  224.      floating point support.
  225. `-mshort'
  226.      Consider type `int' to be 16 bits wide, like `short int'.
  227. `-mnobitfield'
  228.      Do not use the bit-field instructions.  The `-m68000' option
  229.      implies `-mnobitfield'.
  230. `-mbitfield'
  231.      Do use the bit-field instructions.  The `-m68020' option implies
  232.      `-mbitfield'.  This is the default if you use a configuration
  233.      designed for a 68020.
  234. `-mrtd'
  235.      Use a different function-calling convention, in which functions
  236.      that take a fixed number of arguments return with the `rtd'
  237.      instruction, which pops their arguments while returning.  This
  238.      saves one instruction in the caller since there is no need to pop
  239.      the arguments there.
  240.      This calling convention is incompatible with the one normally used
  241.      on Unix, so you cannot use it if you need to call libraries
  242.      compiled with the Unix compiler.
  243.      Also, you must provide function prototypes for all functions that
  244.      take variable numbers of arguments (including `printf'); otherwise
  245.      incorrect code will be generated for calls to those functions.
  246.      In addition, seriously incorrect code will result if you call a
  247.      function with too many arguments.  (Normally, extra arguments are
  248.      harmlessly ignored.)
  249.      The `rtd' instruction is supported by the 68010 and 68020
  250.      processors, but not by the 68000.
  251. File: gcc.info,  Node: VAX Options,  Next: SPARC Options,  Prev: M680x0 Options,  Up: Submodel Options
  252. VAX Options
  253. -----------
  254.    These `-m' options are defined for the Vax:
  255. `-munix'
  256.      Do not output certain jump instructions (`aobleq' and so on) that
  257.      the Unix assembler for the Vax cannot handle across long ranges.
  258. `-mgnu'
  259.      Do output those jump instructions, on the assumption that you will
  260.      assemble with the GNU assembler.
  261. `-mg'
  262.      Output code for g-format floating point numbers instead of
  263.      d-format.
  264. File: gcc.info,  Node: SPARC Options,  Next: Convex Options,  Prev: VAX Options,  Up: Submodel Options
  265. SPARC Options
  266. -------------
  267.    These `-m' switches are supported on the SPARC:
  268. `-mno-app-regs'
  269. `-mapp-regs'
  270.      Specify `-mapp-regs' to generate output using the global registers
  271.      2 through 4, which the SPARC SVR4 ABI reserves for applications.
  272.      This is the default.
  273.      To be fully SVR4 ABI compliant at the cost of some performance
  274.      loss, specify `-mno-app-regs'.  You should compile libraries and
  275.      system software with this option.
  276. `-mfpu'
  277. `-mhard-float'
  278.      Generate output containing floating point instructions.  This is
  279.      the default.
  280. `-mno-fpu'
  281. `-msoft-float'
  282.      Generate output containing library calls for floating point.
  283.      *Warning:* the requisite libraries are not available for all SPARC
  284.      targets.  Normally the facilities of the machine's usual C
  285.      compiler are used, but this cannot be done directly in
  286.      cross-compilation.  You must make your own arrangements to provide
  287.      suitable library functions for cross-compilation.  The embedded
  288.      targets `sparc-*-aout' and `sparclite-*-*' do provide software
  289.      floating point support.
  290.      `-msoft-float' changes the calling convention in the output file;
  291.      therefore, it is only useful if you compile *all* of a program with
  292.      this option.  In particular, you need to compile `libgcc.a', the
  293.      library that comes with GNU CC, with `-msoft-float' in order for
  294.      this to work.
  295. `-mhard-quad-float'
  296.      Generate output containing quad-word (long double) floating point
  297.      instructions.
  298. `-msoft-quad-float'
  299.      Generate output containing library calls for quad-word (long
  300.      double) floating point instructions.  The functions called are
  301.      those specified in the SPARC ABI.  This is the default.
  302.      As of this writing, there are no sparc implementations that have
  303.      hardware support for the quad-word floating point instructions.
  304.      They all invoke a trap handler for one of these instructions, and
  305.      then the trap handler emulates the effect of the instruction.
  306.      Because of the trap handler overhead, this is much slower than
  307.      calling the ABI library routines.  Thus the `-msoft-quad-float'
  308.      option is the default.
  309. `-mno-epilogue'
  310. `-mepilogue'
  311.      With `-mepilogue' (the default), the compiler always emits code for
  312.      function exit at the end of each function.  Any function exit in
  313.      the middle of the function (such as a return statement in C) will
  314.      generate a jump to the exit code at the end of the function.
  315.      With `-mno-epilogue', the compiler tries to emit exit code inline
  316.      at every function exit.
  317. `-mno-flat'
  318. `-mflat'
  319.      With `-mflat', the compiler does not generate save/restore
  320.      instructions and will use a "flat" or single register window
  321.      calling convention.  This model uses %i7 as the frame pointer and
  322.      is compatible with the normal register window model.  Code from
  323.      either may be intermixed although debugger support is still
  324.      incomplete.  The local registers and the input registers (0-5) are
  325.      still treated as "call saved" registers and will be saved on the
  326.      stack as necessary.
  327.      With `-mno-flat' (the default), the compiler emits save/restore
  328.      instructions (except for leaf functions) and is the normal mode of
  329.      operation.
  330. `-mno-unaligned-doubles'
  331. `-munaligned-doubles'
  332.      Assume that doubles have 8 byte alignment.  This is the default.
  333.      With `-munaligned-doubles', GNU CC assumes that doubles have 8 byte
  334.      alignment only if they are contained in another type, or if they
  335.      have an absolute address.  Otherwise, it assumes they have 4 byte
  336.      alignment.  Specifying this option avoids some rare compatibility
  337.      problems with code generated by other compilers.  It is not the
  338.      default because it results in a performance loss, especially for
  339.      floating point code.
  340. `-mv8'
  341. `-msparclite'
  342.      These two options select variations on the SPARC architecture.
  343.      By default (unless specifically configured for the Fujitsu
  344.      SPARClite), GCC generates code for the v7 variant of the SPARC
  345.      architecture.
  346.      `-mv8' will give you SPARC v8 code.  The only difference from v7
  347.      code is that the compiler emits the integer multiply and integer
  348.      divide instructions which exist in SPARC v8 but not in SPARC v7.
  349.      `-msparclite' will give you SPARClite code.  This adds the integer
  350.      multiply, integer divide step and scan (`ffs') instructions which
  351.      exist in SPARClite but not in SPARC v7.
  352. `-mcypress'
  353. `-msupersparc'
  354.      These two options select the processor for which the code is
  355.      optimised.
  356.      With `-mcypress' (the default), the compiler optimizes code for the
  357.      Cypress CY7C602 chip, as used in the SparcStation/SparcServer 3xx
  358.      series.  This is also appropriate for the older SparcStation 1, 2,
  359.      IPX etc.
  360.      With `-msupersparc' the compiler optimizes code for the SuperSparc
  361.      cpu, as used in the SparcStation 10, 1000 and 2000 series. This
  362.      flag also enables use of the full SPARC v8 instruction set.
  363.    In a future version of GCC, these options will very likely be
  364. renamed to `-mcpu=cypress' and `-mcpu=supersparc'.
  365.    These `-m' switches are supported in addition to the above on SPARC
  366. V9 processors:
  367. `-mmedlow'
  368.      Generate code for the Medium/Low code model: assume a 32 bit
  369.      address space.  Programs are statically linked, PIC is not
  370.      supported.  Pointers are still 64 bits.
  371.      It is very likely that a future version of GCC will rename this
  372.      option.
  373. `-mmedany'
  374.      Generate code for the Medium/Anywhere code model: assume a 32 bit
  375.      text segment starting at offset 0, and a 32 bit data segment
  376.      starting anywhere (determined at link time).  Programs are
  377.      statically linked, PIC is not supported.  Pointers are still 64
  378.      bits.
  379.      It is very likely that a future version of GCC will rename this
  380.      option.
  381. `-mint64'
  382.      Types long and int are 64 bits.
  383. `-mlong32'
  384.      Types long and int are 32 bits.
  385. `-mlong64'
  386. `-mint32'
  387.      Type long is 64 bits, and type int is 32 bits.
  388. `-mstack-bias'
  389. `-mno-stack-bias'
  390.      With `-mstack-bias', GNU CC assumes that the stack pointer, and
  391.      frame pointer if present, are offset by -2047 which must be added
  392.      back when making stack frame references.  Otherwise, assume no
  393.      such offset is present.
  394. File: gcc.info,  Node: Convex Options,  Next: AMD29K Options,  Prev: SPARC Options,  Up: Submodel Options
  395. Convex Options
  396. --------------
  397.    These `-m' options are defined for Convex:
  398. `-mc1'
  399.      Generate output for C1.  The code will run on any Convex machine.
  400.      The preprocessor symbol `__convex__c1__' is defined.
  401. `-mc2'
  402.      Generate output for C2.  Uses instructions not available on C1.
  403.      Scheduling and other optimizations are chosen for max performance
  404.      on C2.  The preprocessor symbol `__convex_c2__' is defined.
  405. `-mc32'
  406.      Generate output for C32xx.  Uses instructions not available on C1.
  407.      Scheduling and other optimizations are chosen for max performance
  408.      on C32.  The preprocessor symbol `__convex_c32__' is defined.
  409. `-mc34'
  410.      Generate output for C34xx.  Uses instructions not available on C1.
  411.      Scheduling and other optimizations are chosen for max performance
  412.      on C34.  The preprocessor symbol `__convex_c34__' is defined.
  413. `-mc38'
  414.      Generate output for C38xx.  Uses instructions not available on C1.
  415.      Scheduling and other optimizations are chosen for max performance
  416.      on C38.  The preprocessor symbol `__convex_c38__' is defined.
  417. `-margcount'
  418.      Generate code which puts an argument count in the word preceding
  419.      each argument list.  This is compatible with regular CC, and a few
  420.      programs may need the argument count word.  GDB and other
  421.      source-level debuggers do not need it; this info is in the symbol
  422.      table.
  423. `-mnoargcount'
  424.      Omit the argument count word.  This is the default.
  425. `-mvolatile-cache'
  426.      Allow volatile references to be cached.  This is the default.
  427. `-mvolatile-nocache'
  428.      Volatile references bypass the data cache, going all the way to
  429.      memory.  This is only needed for multi-processor code that does
  430.      not use standard synchronization instructions.  Making
  431.      non-volatile references to volatile locations will not necessarily
  432.      work.
  433. `-mlong32'
  434.      Type long is 32 bits, the same as type int.  This is the default.
  435. `-mlong64'
  436.      Type long is 64 bits, the same as type long long.  This option is
  437.      useless, because no library support exists for it.
  438. File: gcc.info,  Node: AMD29K Options,  Next: ARM Options,  Prev: Convex Options,  Up: Submodel Options
  439. AMD29K Options
  440. --------------
  441.    These `-m' options are defined for the AMD Am29000:
  442. `-mdw'
  443.      Generate code that assumes the `DW' bit is set, i.e., that byte and
  444.      halfword operations are directly supported by the hardware.  This
  445.      is the default.
  446. `-mndw'
  447.      Generate code that assumes the `DW' bit is not set.
  448. `-mbw'
  449.      Generate code that assumes the system supports byte and halfword
  450.      write operations.  This is the default.
  451. `-mnbw'
  452.      Generate code that assumes the systems does not support byte and
  453.      halfword write operations.  `-mnbw' implies `-mndw'.
  454. `-msmall'
  455.      Use a small memory model that assumes that all function addresses
  456.      are either within a single 256 KB segment or at an absolute
  457.      address of less than 256k.  This allows the `call' instruction to
  458.      be used instead of a `const', `consth', `calli' sequence.
  459. `-mnormal'
  460.      Use the normal memory model: Generate `call' instructions only when
  461.      calling functions in the same file and `calli' instructions
  462.      otherwise.  This works if each file occupies less than 256 KB but
  463.      allows the entire executable to be larger than 256 KB.  This is
  464.      the default.
  465. `-mlarge'
  466.      Always use `calli' instructions.  Specify this option if you expect
  467.      a single file to compile into more than 256 KB of code.
  468. `-m29050'
  469.      Generate code for the Am29050.
  470. `-m29000'
  471.      Generate code for the Am29000.  This is the default.
  472. `-mkernel-registers'
  473.      Generate references to registers `gr64-gr95' instead of to
  474.      registers `gr96-gr127'.  This option can be used when compiling
  475.      kernel code that wants a set of global registers disjoint from
  476.      that used by user-mode code.
  477.      Note that when this option is used, register names in `-f' flags
  478.      must use the normal, user-mode, names.
  479. `-muser-registers'
  480.      Use the normal set of global registers, `gr96-gr127'.  This is the
  481.      default.
  482. `-mstack-check'
  483. `-mno-stack-check'
  484.      Insert (or do not insert) a call to `__msp_check' after each stack
  485.      adjustment.  This is often used for kernel code.
  486. `-mstorem-bug'
  487. `-mno-storem-bug'
  488.      `-mstorem-bug' handles 29k processors which cannot handle the
  489.      separation of a mtsrim insn and a storem instruction (most 29000
  490.      chips to date, but not the 29050).
  491. `-mno-reuse-arg-regs'
  492. `-mreuse-arg-regs'
  493.      `-mno-reuse-arg-regs' tells the compiler to only use incoming
  494.      argument registers for copying out arguments.  This helps detect
  495.      calling a function with fewer arguments than it was declared with.
  496. `-msoft-float'
  497.      Generate output containing library calls for floating point.
  498.      *Warning:* the requisite libraries are not part of GNU CC.
  499.      Normally the facilities of the machine's usual C compiler are
  500.      used, but this can't be done directly in cross-compilation.  You
  501.      must make your own arrangements to provide suitable library
  502.      functions for cross-compilation.
  503. File: gcc.info,  Node: ARM Options,  Next: M88K Options,  Prev: AMD29K Options,  Up: Submodel Options
  504. ARM Options
  505. -----------
  506.    These `-m' options are defined for Advanced RISC Machines (ARM)
  507. architectures:
  508. `-m2'
  509. `-m3'
  510.      These options are identical.  Generate code for the ARM2 and ARM3
  511.      processors.  This option is the default.  You should also use this
  512.      option to generate code for ARM6 processors that are running with a
  513.      26-bit program counter.
  514. `-m6'
  515.      Generate code for the ARM6 processor when running with a 32-bit
  516.      program counter.
  517. `-mapcs'
  518.      Generate a stack frame that is compliant with the ARM Procedure
  519.      Call Standard for all functions, even if this is not strictly
  520.      necessary for correct execution of the code.
  521. `-mbsd'
  522.      This option only applies to RISC iX.  Emulate the native BSD-mode
  523.      compiler.  This is the default if `-ansi' is not specified.
  524. `-mxopen'
  525.      This option only applies to RISC iX.  Emulate the native
  526.      X/Open-mode compiler.
  527. `-mno-symrename'
  528.      This option only applies to RISC iX.  Do not run the assembler
  529.      post-processor, `symrename', after code has been assembled.
  530.      Normally it is necessary to modify some of the standard symbols in
  531.      preparation for linking with the RISC iX C library; this option
  532.      suppresses this pass.  The post-processor is never run when the
  533.      compiler is built for cross-compilation.
  534. File: gcc.info,  Node: M88K Options,  Next: RS/6000 and PowerPC Options,  Prev: ARM Options,  Up: Submodel Options
  535. M88K Options
  536. ------------
  537.    These `-m' options are defined for Motorola 88k architectures:
  538. `-m88000'
  539.      Generate code that works well on both the m88100 and the m88110.
  540. `-m88100'
  541.      Generate code that works best for the m88100, but that also runs
  542.      on the m88110.
  543. `-m88110'
  544.      Generate code that works best for the m88110, and may not run on
  545.      the m88100.
  546. `-mbig-pic'
  547.      Obsolete option to be removed from the next revision.  Use `-fPIC'.
  548. `-midentify-revision'
  549.      Include an `ident' directive in the assembler output recording the
  550.      source file name, compiler name and version, timestamp, and
  551.      compilation flags used.
  552. `-mno-underscores'
  553.      In assembler output, emit symbol names without adding an underscore
  554.      character at the beginning of each name.  The default is to use an
  555.      underscore as prefix on each name.
  556. `-mocs-debug-info'
  557. `-mno-ocs-debug-info'
  558.      Include (or omit) additional debugging information (about
  559.      registers used in each stack frame) as specified in the 88open
  560.      Object Compatibility Standard, "OCS".  This extra information
  561.      allows debugging of code that has had the frame pointer
  562.      eliminated.  The default for DG/UX, SVr4, and Delta 88 SVr3.2 is
  563.      to include this information; other 88k configurations omit this
  564.      information by default.
  565. `-mocs-frame-position'
  566.      When emitting COFF debugging information for automatic variables
  567.      and parameters stored on the stack, use the offset from the
  568.      canonical frame address, which is the stack pointer (register 31)
  569.      on entry to the function.  The DG/UX, SVr4, Delta88 SVr3.2, and
  570.      BCS configurations use `-mocs-frame-position'; other 88k
  571.      configurations have the default `-mno-ocs-frame-position'.
  572. `-mno-ocs-frame-position'
  573.      When emitting COFF debugging information for automatic variables
  574.      and parameters stored on the stack, use the offset from the frame
  575.      pointer register (register 30).  When this option is in effect,
  576.      the frame pointer is not eliminated when debugging information is
  577.      selected by the -g switch.
  578. `-moptimize-arg-area'
  579. `-mno-optimize-arg-area'
  580.      Control how function arguments are stored in stack frames.
  581.      `-moptimize-arg-area' saves space by optimizing them, but this
  582.      conflicts with the 88open specifications.  The opposite
  583.      alternative, `-mno-optimize-arg-area', agrees with 88open
  584.      standards.  By default GNU CC does not optimize the argument area.
  585. `-mshort-data-NUM'
  586.      Generate smaller data references by making them relative to `r0',
  587.      which allows loading a value using a single instruction (rather
  588.      than the usual two).  You control which data references are
  589.      affected by specifying NUM with this option.  For example, if you
  590.      specify `-mshort-data-512', then the data references affected are
  591.      those involving displacements of less than 512 bytes.
  592.      `-mshort-data-NUM' is not effective for NUM greater than 64k.
  593. `-mserialize-volatile'
  594. `-mno-serialize-volatile'
  595.      Do, or don't, generate code to guarantee sequential consistency of
  596.      volatile memory references.  By default, consistency is guaranteed.
  597.      The order of memory references made by the MC88110 processor does
  598.      not always match the order of the instructions requesting those
  599.      references.  In particular, a load instruction may execute before
  600.      a preceding store instruction.  Such reordering violates
  601.      sequential consistency of volatile memory references, when there
  602.      are multiple processors.   When consistency must be guaranteed,
  603.      GNU C generates special instructions, as needed, to force
  604.      execution in the proper order.
  605.      The MC88100 processor does not reorder memory references and so
  606.      always provides sequential consistency.  However, by default, GNU
  607.      C generates the special instructions to guarantee consistency even
  608.      when you use `-m88100', so that the code may be run on an MC88110
  609.      processor.  If you intend to run your code only on the MC88100
  610.      processor, you may use `-mno-serialize-volatile'.
  611.      The extra code generated to guarantee consistency may affect the
  612.      performance of your application.  If you know that you can safely
  613.      forgo this guarantee, you may use `-mno-serialize-volatile'.
  614. `-msvr4'
  615. `-msvr3'
  616.      Turn on (`-msvr4') or off (`-msvr3') compiler extensions related
  617.      to System V release 4 (SVr4).  This controls the following:
  618.        1. Which variant of the assembler syntax to emit.
  619.        2. `-msvr4' makes the C preprocessor recognize `#pragma weak'
  620.           that is used on System V release 4.
  621.        3. `-msvr4' makes GNU CC issue additional declaration directives
  622.           used in SVr4.
  623.      `-msvr4' is the default for the m88k-motorola-sysv4 and
  624.      m88k-dg-dgux m88k configurations. `-msvr3' is the default for all
  625.      other m88k configurations.
  626. `-mversion-03.00'
  627.      This option is obsolete, and is ignored.
  628. `-mno-check-zero-division'
  629. `-mcheck-zero-division'
  630.      Do, or don't, generate code to guarantee that integer division by
  631.      zero will be detected.  By default, detection is guaranteed.
  632.      Some models of the MC88100 processor fail to trap upon integer
  633.      division by zero under certain conditions.  By default, when
  634.      compiling code that might be run on such a processor, GNU C
  635.      generates code that explicitly checks for zero-valued divisors and
  636.      traps with exception number 503 when one is detected.  Use of
  637.      mno-check-zero-division suppresses such checking for code
  638.      generated to run on an MC88100 processor.
  639.      GNU C assumes that the MC88110 processor correctly detects all
  640.      instances of integer division by zero.  When `-m88110' is
  641.      specified, both `-mcheck-zero-division' and
  642.      `-mno-check-zero-division' are ignored, and no explicit checks for
  643.      zero-valued divisors are generated.
  644. `-muse-div-instruction'
  645.      Use the div instruction for signed integer division on the MC88100
  646.      processor.  By default, the div instruction is not used.
  647.      On the MC88100 processor the signed integer division instruction
  648.      div) traps to the operating system on a negative operand.  The
  649.      operating system transparently completes the operation, but at a
  650.      large cost in execution time.  By default, when compiling code
  651.      that might be run on an MC88100 processor, GNU C emulates signed
  652.      integer division using the unsigned integer division instruction
  653.      divu), thereby avoiding the large penalty of a trap to the
  654.      operating system.  Such emulation has its own, smaller, execution
  655.      cost in both time and space.  To the extent that your code's
  656.      important signed integer division operations are performed on two
  657.      nonnegative operands, it may be desirable to use the div
  658.      instruction directly.
  659.      On the MC88110 processor the div instruction (also known as the
  660.      divs instruction) processes negative operands without trapping to
  661.      the operating system.  When `-m88110' is specified,
  662.      `-muse-div-instruction' is ignored, and the div instruction is used
  663.      for signed integer division.
  664.      Note that the result of dividing INT_MIN by -1 is undefined.  In
  665.      particular, the behavior of such a division with and without
  666.      `-muse-div-instruction'  may differ.
  667. `-mtrap-large-shift'
  668. `-mhandle-large-shift'
  669.      Include code to detect bit-shifts of more than 31 bits;
  670.      respectively, trap such shifts or emit code to handle them
  671.      properly.  By default GNU CC makes no special provision for large
  672.      bit shifts.
  673. `-mwarn-passed-structs'
  674.      Warn when a function passes a struct as an argument or result.
  675.      Structure-passing conventions have changed during the evolution of
  676.      the C language, and are often the source of portability problems.
  677.      By default, GNU CC issues no such warning.
  678. File: gcc.info,  Node: RS/6000 and PowerPC Options,  Next: RT Options,  Prev: M88K Options,  Up: Submodel Options
  679. IBM RS/6000 and PowerPC Options
  680. -------------------------------
  681.    These `-m' options are defined for the IBM RS/6000 and PowerPC:
  682. `-mpower'
  683. `-mno-power'
  684. `-mpower2'
  685. `-mno-power2'
  686. `-mpowerpc'
  687. `-mno-powerpc'
  688. `-mpowerpc-gpopt'
  689. `-mno-powerpc-gpopt'
  690. `-mpowerpc-gfxopt'
  691. `-mno-powerpc-gfxopt'
  692.      GNU CC supports two related instruction set architectures for the
  693.      RS/6000 and PowerPC.  The "POWER" instruction set are those
  694.      instructions supported by the `rios' chip set used in the original
  695.      RS/6000 systems and the "PowerPC" instruction set is the
  696.      architecture of the Motorola MPC6xx microprocessors.  The PowerPC
  697.      architecture defines 64-bit instructions, but they are not
  698.      supported by any current processors.
  699.      Neither architecture is a subset of the other.  However there is a
  700.      large common subset of instructions supported by both.  An MQ
  701.      register is included in processors supporting the POWER
  702.      architecture.
  703.      You use these options to specify which instructions are available
  704.      on the processor you are using.  The default value of these
  705.      options is determined when configuring GNU CC.  Specifying the
  706.      `-mcpu=CPU_TYPE' overrides the specification of these options.  We
  707.      recommend you use that option rather than these.
  708.      The `-mpower' option allows GNU CC to generate instructions that
  709.      are found only in the POWER architecture and to use the MQ
  710.      register.  Specifying `-mpower2' implies `-power' and also allows
  711.      GNU CC to generate instructions that are present in the POWER2
  712.      architecture but not the original POWER architecture.
  713.      The `-mpowerpc' option allows GNU CC to generate instructions that
  714.      are found only in the 32-bit subset of the PowerPC architecture.
  715.      Specifying `-mpowerpc-gpopt' implies `-mpowerpc' and also allows
  716.      GNU CC to use the optional PowerPC architecture instructions in the
  717.      General Purpose group, including floating-point square root.
  718.      Specifying `-mpowerpc-gfxopt' implies `-mpowerpc' and also allows
  719.      GNU CC to use the optional PowerPC architecture instructions in
  720.      the Graphics group, including floating-point select.
  721.      If you specify both `-mno-power' and `-mno-powerpc', GNU CC will
  722.      use only the instructions in the common subset of both
  723.      architectures plus some special AIX common-mode calls, and will
  724.      not use the MQ register.  Specifying both `-mpower' and `-mpowerpc'
  725.      permits GNU CC to use any instruction from either architecture and
  726.      to allow use of the MQ register; specify this for the Motorola
  727.      MPC601.
  728. `-mnew-mnemonics'
  729. `-mold-mnemonics'
  730.      Select which mnemonics to use in the generated assembler code.
  731.      `-mnew-mnemonics' requests output that uses the assembler mnemonics
  732.      defined for the PowerPC architecture, while `-mold-mnemonics'
  733.      requests the assembler mnemonics defined for the POWER
  734.      architecture.  Instructions defined in only one architecture have
  735.      only one mnemonic; GNU CC uses that mnemonic irrespective of which
  736.      of these options is specified.
  737.      PowerPC assemblers support both the old and new mnemonics, as will
  738.      later POWER assemblers.  Current POWER assemblers only support the
  739.      old mnemonics.  Specify `-mnew-mnemonics' if you have an assembler
  740.      that supports them, otherwise specify `-mold-mnemonics'.
  741.      The default value of these options depends on how GNU CC was
  742.      configured.  Specifying `-mcpu=CPU_TYPE' sometimes overrides the
  743.      value of these option.  Unless you are building a cross-compiler,
  744.      you should normally not specify either `-mnew-mnemonics' or
  745.      `-mold-mnemonics', but should instead accept the default.
  746. `-mcpu=CPU_TYPE'
  747.      Set architecture type, register usage, choice of mnemonics, and
  748.      instruction scheduling parameters for machine type CPU_TYPE.  By
  749.      default, CPU_TYPE is the target system defined when GNU CC was
  750.      configured.  Supported values for CPU_TYPE are `rios1', `rios2',
  751.      `rsc', `601', `603', `604', `power', `powerpc', `403', and
  752.      `common'.  `-mcpu=power' and `-mcpu=powerpc' specify generic POWER
  753.      and pure PowerPC (i.e., not MPC601) architecture machine types,
  754.      with an appropriate, generic processor model assumed for
  755.      scheduling purposes.
  756.      Specifying `-mcpu=rios1', `-mcpu=rios2', `-mcpu=rsc', or
  757.      `-mcpu=power' enables the `-mpower' option and disables the
  758.      `-mpowerpc' option; `-mcpu=601' enables both the `-mpower' and
  759.      `-mpowerpc' options; `-mcpu=603', `-mcpu=604', `-mcpu=403', and
  760.      `-mcpu=powerpc' enable the `-mpowerpc' option and disable the
  761.      `-mpower' option; `-mcpu=common' disables both the `-mpower' and
  762.      `-mpowerpc' options.
  763.      To generate code that will operate on all members of the RS/6000
  764.      and PowerPC families, specify `-mcpu=common'.  In that case, GNU CC
  765.      will use only the instructions in the common subset of both
  766.      architectures plus some special AIX common-mode calls, and will
  767.      not use the MQ register.  GNU CC assumes a generic processor model
  768.      for scheduling purposes.
  769.      Specifying `-mcpu=rios1', `-mcpu=rios2', `-mcpu=rsc', or
  770.      `-mcpu=power' also disables the `new-mnemonics' option.
  771.      Specifying `-mcpu=601', `-mcpu=603', `-mcpu=604', `403', or
  772.      `-mcpu=powerpc' also enables the `new-mnemonics' option.
  773. `-mfull-toc'
  774. `-mno-fp-in-toc'
  775. `-mno-sum-in-toc'
  776. `-mminimal-toc'
  777.      Modify generation of the TOC (Table Of Contents), which is created
  778.      for every executable file.  The `-mfull-toc' option is selected by
  779.      default.  In that case, GNU CC will allocate at least one TOC
  780.      entry for each unique non-automatic variable reference in your
  781.      program.  GNU CC will also place floating-point constants in the
  782.      TOC.  However, only 16,384 entries are available in the TOC.
  783.      If you receive a linker error message that saying you have
  784.      overflowed the available TOC space, you can reduce the amount of
  785.      TOC space used with the `-mno-fp-in-toc' and `-mno-sum-in-toc'
  786.      options.  `-mno-fp-in-toc' prevents GNU CC from putting
  787.      floating-point constants in the TOC and `-mno-sum-in-toc' forces
  788.      GNU CC to generate code to calculate the sum of an address and a
  789.      constant at run-time instead of putting that sum into the TOC.
  790.      You may specify one or both of these options.  Each causes GNU CC
  791.      to produce very slightly slower and larger code at the expense of
  792.      conserving TOC space.
  793.      If you still run out of space in the TOC even when you specify
  794.      both of these options, specify `-mminimal-toc' instead.  This
  795.      option causes GNU CC to make only one TOC entry for every file.
  796.      When you specify this option, GNU CC will produce code that is
  797.      slower and larger but which uses extremely little TOC space.  You
  798.      may wish to use this option only on files that contain less
  799.      frequently executed code.
  800. `-msoft-float'
  801. `-mhard-float'
  802.      Generate code that does not use (uses) the floating-point register
  803.      set.  Software floating point emulation is provided if you use the
  804.      `-msoft-float' option, and pass the option to GNU CC when linking.
  805. `-mmultiple'
  806. `-mno-multiple'
  807.      Generate code that uses (does not use) the load multiple word
  808.      instructions and the store multiple word instructions.  These
  809.      instructions are generated by default on POWER systems, and not
  810.      generated on PowerPC systems.  Do not use `-mmultiple' on little
  811.      endian PowerPC systems, since those instructions do not work when
  812.      the processor is in little endian mode.
  813. `-mstring'
  814. `-mno-string'
  815.      Generate code that uses (does not use) the load string
  816.      instructions and the store string word instructions to save
  817.      multiple registers and do small block moves.  These instructions
  818.      are generated by default on POWER systems, anod not generated on
  819.      PowerPC systems.  Do not use `-mstring' on little endian PowerPC
  820.      systems, since those instructions do not work when the processor
  821.      is in little endian mode.
  822. `-mno-bit-align'
  823. `-mbit-align'
  824.      On System V.4 and embedded PowerPC systems do not (do) force
  825.      structures and unions that contain bit fields to be aligned to the
  826.      base type of the bit field.
  827.      For example, by default a structure containing nothing but 8
  828.      `unsigned' bitfields of length 1 would be aligned to a 4 byte
  829.      boundary and have a size of 4 bytes.  By using `-mno-bit-align',
  830.      the structure would be aligned to a 1 byte boundary and be one
  831.      byte in size.
  832. `-mno-strict-align'
  833. `-mstrict-align'
  834.      On System V.4 and embedded PowerPC systems do not (do) assume that
  835.      unaligned memory references will be handled by the system.
  836. `-mrelocatable'
  837. `-mno-relocatable'
  838.      On embedded PowerPC systems generate code that allows (does not
  839.      allow) the program to be relocated to a different address at
  840.      runtime.
  841. `-mno-toc'
  842. `-mtoc'
  843.      On System V.4 and embedded PowerPC systems do not (do) assume that
  844.      register 2 contains a pointer to a global area pointing to the
  845.      addresses used in the program.
  846. `-mno-traceback'
  847. `-mtraceback'
  848.      On embedded PowerPC systems do not (do) generate a traceback tag
  849.      before the start of the function.  This tag can be used by the
  850.      debugger to identify where the start of a function is.
  851. `-mlittle'
  852. `-mlittle-endian'
  853.      On System V.4 and embedded PowerPC systems compile code for the
  854.      processor in little endian mode.  The `-mlittle-endian' option is
  855.      the same as `-mlittle'.
  856. `-mbig'
  857. `-mbig-endian'
  858.      On System V.4 and embedded PowerPC systems compile code for the
  859.      processor in big endian mode.  The `-mbig-endian' option is the
  860.      same as `-mbig'.
  861. `-mcall-sysv'
  862.      On System V.4 and embedded PowerPC systems compile code using
  863.      calling conventions that adheres to the March 1995 draft of the
  864.      System V Application Binary Interface, PowerPC processor
  865.      supplement.  This is the default unless you configured GCC using
  866.      `powerpc-*-eabiaix'.
  867. `-mcall-aix'
  868.      On System V.4 and embedded PowerPC systems compile code using
  869.      calling conventions that are similar to those used on AIX.  This
  870.      is the default if you configured GCC using `powerpc-*-eabiaix'.
  871. `-mprototype'
  872. `-mno-prototype'
  873.      On System V.4 and embedded PowerPC systems assume that all calls to
  874.      variable argument functions are properly prototyped.  Otherwise,
  875.      the compiler must insert an instruction before every non
  876.      prototyped call to set or clear bit 6 of the condition code
  877.      register (CR) to indicate whether floating point values were
  878.      passed in the floating point registers in case the function takes
  879.      a variable arguments.  With `-mprototype', only calls to
  880.      prototyped variable argument functions will set or clear the bit.
  881. File: gcc.info,  Node: RT Options,  Next: MIPS Options,  Prev: RS/6000 and PowerPC Options,  Up: Submodel Options
  882. IBM RT Options
  883. --------------
  884.    These `-m' options are defined for the IBM RT PC:
  885. `-min-line-mul'
  886.      Use an in-line code sequence for integer multiplies.  This is the
  887.      default.
  888. `-mcall-lib-mul'
  889.      Call `lmul$$' for integer multiples.
  890. `-mfull-fp-blocks'
  891.      Generate full-size floating point data blocks, including the
  892.      minimum amount of scratch space recommended by IBM.  This is the
  893.      default.
  894. `-mminimum-fp-blocks'
  895.      Do not include extra scratch space in floating point data blocks.
  896.      This results in smaller code, but slower execution, since scratch
  897.      space must be allocated dynamically.
  898. `-mfp-arg-in-fpregs'
  899.      Use a calling sequence incompatible with the IBM calling
  900.      convention in which floating point arguments are passed in
  901.      floating point registers.  Note that `varargs.h' and `stdargs.h'
  902.      will not work with floating point operands if this option is
  903.      specified.
  904. `-mfp-arg-in-gregs'
  905.      Use the normal calling convention for floating point arguments.
  906.      This is the default.
  907. `-mhc-struct-return'
  908.      Return structures of more than one word in memory, rather than in a
  909.      register.  This provides compatibility with the MetaWare HighC (hc)
  910.      compiler.  Use the option `-fpcc-struct-return' for compatibility
  911.      with the Portable C Compiler (pcc).
  912. `-mnohc-struct-return'
  913.      Return some structures of more than one word in registers, when
  914.      convenient.  This is the default.  For compatibility with the
  915.      IBM-supplied compilers, use the option `-fpcc-struct-return' or the
  916.      option `-mhc-struct-return'.
  917.