[Main]
Title=GCC Command-Line Options
Subsections=SEC3, SEC4, SEC6, SEC8, SEC9, SEC10, SEC11, SEC12, SEC14, SEC15, SEC16, SEC44, SEC45, history, gnugpl/gnugpl, gnugpl/gnufdl, gnugpl/funding

[Top]
This part of the documentation is a modified version of the
<A HREF="http://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html">Command-Line Options</A>
section of the <A HREF="http://gcc.gnu.org/onlinedocs/gcc/">GCC Manual</A>.
Therefore it is licensed under the
<A HREF="$$INFOLINK(gnugpl/gnufdl)">GNU Free Documentation License</A>.
<BR><BR>
This section describes the options supported by <CODE>gcc</CODE>,
the driver program of the GNU Compiler Collection, whose C compiler
and assembler are used here.  This program is called either by
<CODE>tigcc</CODE> or by the IDE.  <CODE>tigcc</CODE>
simulates some of these options itself, namely <B>'-E'</B>,
<B>'-S'</B>, and <B>'-c'</B>, and it also has some additional ones.
In the IDE, there is an item in the project settings where you can
set the options described here, with some exceptions, including the
switches mentioned above.
<BR><BR>
TIGCC normally does preprocessing, compilation, assembly and linking
all in one step, and finally produces a file which is executable on
the calculator.  The &quot;overall options&quot; allow you to stop this
process at an intermediate stage.  For example, the <B>'-c'</B> option
says not to run the linker.  Then the output consists of object files
output by the assembler.
<BR><BR>
Other options are passed on to one stage of processing.  Some options
control the preprocessor and others the compiler itself.  Yet other
options control the assembler and linker; most of these are not
documented here, since you rarely need to use any of them.
In fact, only those options which may be more or less useful with TIGCC
are mentioned here (although we didn't check whether all of them are
really usable in TIGCC).  For more info about standard options that are
recognized by the compiler, read the
<A HREF="http://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html">official manual</A>.
<BR><BR>
We suggest that you use the <B>'-O2'</B> switch in all of your
compilations; it increases speed and decreases the program size at the
cost of compilation time.
<BR><BR>
<CODE>tigcc</CODE> accepts options and file names as operands.  Many
options have multi-letter names; therefore multiple single-letter options
may <I>not</I> be grouped: <B>'-dr'</B> is very different from <B>'-d
-r'</B>.
<BR><BR>
You can mix options and other arguments.  For the most part, the order
you use doesn't matter.  Order does matter when you use several options
of the same kind; for example, if you specify <B>'-L'</B> more than once,
the directories are searched in the order specified.
<BR><BR>
Many options have long names starting with <B>'-f'</B> or with
<B>'-W'</B> - for example, <B>'-fforce-mem'</B>,
<B>'-fstrength-reduce'</B>, <B>'-Wformat'</B> and so on.  Most of
these have both positive and negative forms; the negative form of
<B>'-ffoo'</B> would be <B>'-fno-foo'</B>.  This manual documents
only one of these two forms, whichever one is not the default.

[Bottom]
Original author: Free Software Foundation, Inc.
<BR>
Authors of the modifications: Zeljko Juric, Sebastian Reichelt, and Kevin Kofler
<BR>
Published by the TIGCC Team.
<BR>
See the <A HREF="$$LINK(history)">History</A> section for details and copyright information.
<BR><BR>
Permission is granted to copy, distribute and/or modify this document
under the terms of the <A HREF="$$INFOLINK(gnugpl/gnufdl)">GNU Free Documentation License</A>, Version 1.1 or any
later version published by the Free Software Foundation; with the Invariant
Sections being "<A HREF="$$INFOLINK(gnugpl)">GNU General Public License</A>" and "<A HREF="$$INFOLINK(gnugpl/funding)">Funding Free Software</A>", the
Front-Cover texts being (a) (see below), and with the Back-Cover Texts being
(b) (see below).  A copy of the license is included in the section entitled
"<A HREF="$$INFOLINK(gnugpl/gnufdl)">GNU Free Documentation License</A>".
<BR><BR>
(a) The FSF's Front-Cover Text is:
<BR><BR>
A GNU Manual
<BR><BR>
(b) The FSF's Back-Cover Text is:
<BR><BR>
You have freedom to copy and modify this GNU Manual, like GNU software.
Copies published by the Free Software Foundation raise funds for GNU
development.
