Subversion Repositories tendra.SVN

Rev

Rev 2 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!-- Crown Copyright (c) 1998 -->
<HTML>
<HEAD>
<TITLE>tcc User's Guide: tcc Reference Guide</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#400080" ALINK="#FF0000">
<A NAME=S49>
<H1>tcc User's Guide</H1>
<H3>January 1998</H3>
<IMG SRC="../images/no_next.gif" ALT="next section">
<A HREF="tcc7.html"><IMG SRC="../images/prev.gif" ALT="previous section"></A>
<A HREF="tcc1.html"><IMG SRC="../images/top.gif" ALT="current document"></A>
<A HREF="../index.html"><IMG SRC="../images/home.gif" ALT="TenDRA home page">
</A>
<IMG SRC="../images/no_index.gif" ALT="document index"><P>
<HR>
<DL>
<DT><A HREF="#S50"><B>7.1</B> - Input and Output Files</A><DD>
<DT><A HREF="#S51"><B>7.2</B> - Compilation Phases</A><DD>
<DT><A HREF="#S52"><B>7.3</B> - Command-line Options</A><DD>
<DT><A HREF="#S53"><B>7.4</B> - Compilation Modes</A><DD>
<DT><A HREF="#S54"><B>7.5</B> - Supported APIs</A><DD>
<DT><A HREF="#S55"><B>7.6</B> - Environment Identifiers</A><DD>
<DT><A HREF="#S56"><B>7.7</B> - Standard Environments</A><DD>
</DL>

<HR>
<H1>7.  tcc Reference Guide</H1>
<A NAME=S50>
<HR><H2>7.1.  Input and Output Files</H2>
<CODE>tcc</CODE> identifies the file type of the input files it is
passed by means of their file suffix. The recognised file suffixes
are as follows:<BR><IMG SRC="table8.gif"><BR>
<P>
Each file type is assigned an identifying letter, usually corresponding
to its file suffix, which may be used in various command-line options.
For example, <B>-Fs</B> instructs <CODE>tcc</CODE> to halt the compilation
after creating the assembly source files, and is therefore equivalent
to <B>-S</B>. Similarly <B>-Po </B>instructs it to preserve any binary
object files it creates. There are a couple of special file type codes
which may be used with the <B>-P</B> option. The option <B>-Pa</B>
causes all intermediate files to be created, whereas <B>-Ph</B> causes
the start-up file, <CODE>tcc_startup.h</CODE>, used by <CODE>tcc</CODE>
to be preserved. The <B>-P</B> option can also be used to specify
that intermediate files of various forms should not be preserved.
For example, the option<B> -P-o</B> indicates that binary object files
should not be preserved.<P>
Most output file names are derived from the input file names with
a simple substitution of file suffix, however certain output files
(and other files) have default names. These are as follows<BR>
<IMG SRC="table9.gif"><BR>
:<P>
If there is a single output file, its name may be specified using
the <B>-o</B> option. The default output filenames can also be overridden.
For example, <B>-doj b.j</B> sets the default merged TDF capsule name
to <CODE>b.j</CODE>.<P>
<A NAME=S51>
<HR><H2>7.2.  Compilation Phases</H2>
The various compilation phases under the control of <CODE>tcc</CODE>
may be summarised as follows:<BR><IMG SRC="table10.gif"><BR>
<P>
Each compilation phase is assigned a code letter which is used to
identify that phase in various command-line options. For example,
in order to pass the <B>-x</B> option to <CODE>tdfc</CODE> the <B>-Wc,
-x</B> command-line option may be used. Similarly, to set the <CODE>tld</CODE>
executable an option of the form <B>-EL: /usr/local/bin/tld</B> may
be used.<P>
<A NAME=S52>
<HR><H2>7.3.  Command-line Options</H2>
The following options are accepted by <CODE>tcc</CODE>. They can be
given by command-line options or the <CODE>TCCOPTS</CODE> system variable.
The spaces in the option descriptions are optional, they show where
two-part or multi-part options can be split over more than one command-line
argument.<BR><IMG SRC="table1.gif"><BR>
<BR><IMG SRC="table12.gif"><BR>
<P>
The following two tables list the producer and archiver options which
can be passed using the<BR>
<B>-Wc, </B><I>opt</I> and <B>-WJ,</B><I> opt</I> options, respectively.<BR>
<IMG SRC="table7.gif"><BR>
<BR><IMG SRC="table11.gif"><BR>
<P>
<P>
<A NAME=S53>
<HR><H2>7.4.  Compilation Modes</H2>
The built-in compilation modes are as follows:<P>
<UL>
<LI><CODE>Xs</CODE> (&quot;strict checks&quot;) denotes strict ISO/ANSI
C with most extra checks enabled as warnings.<P>
<LI><CODE>Xp</CODE> (&quot;partial checks&quot;) denotes strict ISO/ANSI
C with some extra checks enabled.<P>
<LI><CODE>Xc</CODE> (&quot;conformance&quot;) denotes strict ISO/ANSI
C with no extra checks enabled (this is default).<P>
<LI><CODE>Xa</CODE> (&quot;ANSI-ish&quot;) denotes ISO/ANSI C with
syntactic relaxations and no extra checks.<P>
<LI><CODE>Xt</CODE> (&quot;traditional&quot;) denotes traditional
C with no extra checks.<P>
</UL>
The mode <CODE>Xs</CODE> is specified by passing the <B>-Xs</B> command-line
option to <CODE>tcc</CODE>, and so on.<P>
<A NAME=S54>
<HR><H2>7.5.  Supported APIs</H2>
The following standard APIs are supported in the form of TenDRA headers:<BR>
<IMG SRC="table2.gif"><BR>
<P>
Each API is specified to <CODE>tcc</CODE> by means of an environment
with the same name as the API. Thus, for example, <B>-Yposix</B> specifies
POSIX 1003.1. APIs are divided into two types, base APIs, such as
POSIX 1003.1, and extension APIs, such as the X11 (Release 5) Toolkit.
A program API consists of a base API plus an number of extension APIs,
for example, POSIX plus the X11 Toolkit. This example would be specified
by means of the options <B>-Yposix -Yx5_t</B>, in that order (base
APIs override the previous API, extension APIs add to it).<P>
Information on the current API may be printed by passing the <B>-info</B>
option to <CODE>tcc</CODE>.<P>
<A NAME=S55>
<HR><H2>7.6.  Environment Identifiers</H2>
The following <CODE>tcc</CODE> environment identifiers are recognised:<BR>
<IMG SRC="table15.gif"><BR>
<P>
<CODE>*</CODE> stands for any of the allowed environment modifiers
<CODE>+</CODE>, <CODE>&lt;</CODE> or <CODE>&gt;</CODE>.<P>
<A NAME=S56>
<HR><H2>7.7.  Standard Environments</H2>
In addition to the environments implementing the supported APIs (see
section 7.5. on page 31</A>), the following environments are standard:<BR>
<IMG SRC="table16.gif"><BR>
<P>
<P>
<P>
<HR>
<P><I>Part of the <A HREF="../index.html">TenDRA Web</A>.<BR>Crown
Copyright &copy; 1998.</I></P>
</BODY>
</HTML>