Subversion Repositories tendra.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
<!-- Crown Copyright (c) 1998 -->
2
<HTML>
3
<HEAD>
4
<TITLE>tcc User's Guide: tcc Reference Guide</TITLE>
5
</HEAD>
6
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#400080" ALINK="#FF0000">
7
<A NAME=S49>
8
<H1>tcc User's Guide</H1>
9
<H3>January 1998</H3>
10
<IMG SRC="../images/no_next.gif" ALT="next section">
11
<A HREF="tcc7.html"><IMG SRC="../images/prev.gif" ALT="previous section"></A>
12
<A HREF="tcc1.html"><IMG SRC="../images/top.gif" ALT="current document"></A>
13
<A HREF="../index.html"><IMG SRC="../images/home.gif" ALT="TenDRA home page">
14
</A>
15
<IMG SRC="../images/no_index.gif" ALT="document index"><P>
16
<HR>
17
<DL>
18
<DT><A HREF="#S50"><B>7.1</B> - Input and Output Files</A><DD>
19
<DT><A HREF="#S51"><B>7.2</B> - Compilation Phases</A><DD>
20
<DT><A HREF="#S52"><B>7.3</B> - Command-line Options</A><DD>
21
<DT><A HREF="#S53"><B>7.4</B> - Compilation Modes</A><DD>
22
<DT><A HREF="#S54"><B>7.5</B> - Supported APIs</A><DD>
23
<DT><A HREF="#S55"><B>7.6</B> - Environment Identifiers</A><DD>
24
<DT><A HREF="#S56"><B>7.7</B> - Standard Environments</A><DD>
25
</DL>
26
 
27
<HR>
28
<H1>7.  tcc Reference Guide</H1>
29
<A NAME=S50>
30
<HR><H2>7.1.  Input and Output Files</H2>
31
<CODE>tcc</CODE> identifies the file type of the input files it is
32
passed by means of their file suffix. The recognised file suffixes
33
are as follows:<BR><IMG SRC="table8.gif"><BR>
34
<P>
35
Each file type is assigned an identifying letter, usually corresponding
36
to its file suffix, which may be used in various command-line options.
37
For example, <B>-Fs</B> instructs <CODE>tcc</CODE> to halt the compilation
38
after creating the assembly source files, and is therefore equivalent
39
to <B>-S</B>. Similarly <B>-Po </B>instructs it to preserve any binary
40
object files it creates. There are a couple of special file type codes
41
which may be used with the <B>-P</B> option. The option <B>-Pa</B>
42
causes all intermediate files to be created, whereas <B>-Ph</B> causes
43
the start-up file, <CODE>tcc_startup.h</CODE>, used by <CODE>tcc</CODE>
44
to be preserved. The <B>-P</B> option can also be used to specify
45
that intermediate files of various forms should not be preserved.
46
For example, the option<B> -P-o</B> indicates that binary object files
47
should not be preserved.<P>
48
Most output file names are derived from the input file names with
49
a simple substitution of file suffix, however certain output files
50
(and other files) have default names. These are as follows<BR>
51
<IMG SRC="table9.gif"><BR>
52
:<P>
53
If there is a single output file, its name may be specified using
54
the <B>-o</B> option. The default output filenames can also be overridden.
55
For example, <B>-doj b.j</B> sets the default merged TDF capsule name
56
to <CODE>b.j</CODE>.<P>
57
<A NAME=S51>
58
<HR><H2>7.2.  Compilation Phases</H2>
59
The various compilation phases under the control of <CODE>tcc</CODE>
60
may be summarised as follows:<BR><IMG SRC="table10.gif"><BR>
61
<P>
62
Each compilation phase is assigned a code letter which is used to
63
identify that phase in various command-line options. For example,
64
in order to pass the <B>-x</B> option to <CODE>tdfc</CODE> the <B>-Wc,
65
-x</B> command-line option may be used. Similarly, to set the <CODE>tld</CODE>
66
executable an option of the form <B>-EL: /usr/local/bin/tld</B> may
67
be used.<P>
68
<A NAME=S52>
69
<HR><H2>7.3.  Command-line Options</H2>
70
The following options are accepted by <CODE>tcc</CODE>. They can be
71
given by command-line options or the <CODE>TCCOPTS</CODE> system variable.
72
The spaces in the option descriptions are optional, they show where
73
two-part or multi-part options can be split over more than one command-line
74
argument.<BR><IMG SRC="table1.gif"><BR>
75
<BR><IMG SRC="table12.gif"><BR>
76
<P>
77
The following two tables list the producer and archiver options which
78
can be passed using the<BR>
79
<B>-Wc, </B><I>opt</I> and <B>-WJ,</B><I> opt</I> options, respectively.<BR>
80
<IMG SRC="table7.gif"><BR>
81
<BR><IMG SRC="table11.gif"><BR>
82
<P>
83
<P>
84
<A NAME=S53>
85
<HR><H2>7.4.  Compilation Modes</H2>
86
The built-in compilation modes are as follows:<P>
87
<UL>
88
<LI><CODE>Xs</CODE> (&quot;strict checks&quot;) denotes strict ISO/ANSI
89
C with most extra checks enabled as warnings.<P>
90
<LI><CODE>Xp</CODE> (&quot;partial checks&quot;) denotes strict ISO/ANSI
91
C with some extra checks enabled.<P>
92
<LI><CODE>Xc</CODE> (&quot;conformance&quot;) denotes strict ISO/ANSI
93
C with no extra checks enabled (this is default).<P>
94
<LI><CODE>Xa</CODE> (&quot;ANSI-ish&quot;) denotes ISO/ANSI C with
95
syntactic relaxations and no extra checks.<P>
96
<LI><CODE>Xt</CODE> (&quot;traditional&quot;) denotes traditional
97
C with no extra checks.<P>
98
</UL>
99
The mode <CODE>Xs</CODE> is specified by passing the <B>-Xs</B> command-line
100
option to <CODE>tcc</CODE>, and so on.<P>
101
<A NAME=S54>
102
<HR><H2>7.5.  Supported APIs</H2>
103
The following standard APIs are supported in the form of TenDRA headers:<BR>
104
<IMG SRC="table2.gif"><BR>
105
<P>
106
Each API is specified to <CODE>tcc</CODE> by means of an environment
107
with the same name as the API. Thus, for example, <B>-Yposix</B> specifies
108
POSIX 1003.1. APIs are divided into two types, base APIs, such as
109
POSIX 1003.1, and extension APIs, such as the X11 (Release 5) Toolkit.
110
A program API consists of a base API plus an number of extension APIs,
111
for example, POSIX plus the X11 Toolkit. This example would be specified
112
by means of the options <B>-Yposix -Yx5_t</B>, in that order (base
113
APIs override the previous API, extension APIs add to it).<P>
114
Information on the current API may be printed by passing the <B>-info</B>
115
option to <CODE>tcc</CODE>.<P>
116
<A NAME=S55>
117
<HR><H2>7.6.  Environment Identifiers</H2>
118
The following <CODE>tcc</CODE> environment identifiers are recognised:<BR>
119
<IMG SRC="table15.gif"><BR>
120
<P>
121
<CODE>*</CODE> stands for any of the allowed environment modifiers
122
<CODE>+</CODE>, <CODE>&lt;</CODE> or <CODE>&gt;</CODE>.<P>
123
<A NAME=S56>
124
<HR><H2>7.7.  Standard Environments</H2>
125
In addition to the environments implementing the supported APIs (see
126
section 7.5. on page 31</A>), the following environments are standard:<BR>
127
<IMG SRC="table16.gif"><BR>
128
<P>
129
<P>
130
<P>
131
<HR>
132
<P><I>Part of the <A HREF="../index.html">TenDRA Web</A>.<BR>Crown
133
Copyright &copy; 1998.</I></P>
134
</BODY>
135
</HTML>