tcc User's Guide

January 1998

next section
previous section current document TenDRA home page document index


7.1 - Input and Output Files
7.2 - Compilation Phases
7.3 - Command-line Options
7.4 - Compilation Modes
7.5 - Supported APIs
7.6 - Environment Identifiers
7.7 - Standard Environments

7. tcc Reference Guide


7.1. Input and Output Files

tcc identifies the file type of the input files it is passed by means of their file suffix. The recognised file suffixes are as follows:

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, -Fs instructs tcc to halt the compilation after creating the assembly source files, and is therefore equivalent to -S. Similarly -Po 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 -P option. The option -Pa causes all intermediate files to be created, whereas -Ph causes the start-up file, tcc_startup.h, used by tcc to be preserved. The -P option can also be used to specify that intermediate files of various forms should not be preserved. For example, the option -P-o indicates that binary object files should not be preserved.

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

:

If there is a single output file, its name may be specified using the -o option. The default output filenames can also be overridden. For example, -doj b.j sets the default merged TDF capsule name to b.j.


7.2. Compilation Phases

The various compilation phases under the control of tcc may be summarised as follows:

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 -x option to tdfc the -Wc, -x command-line option may be used. Similarly, to set the tld executable an option of the form -EL: /usr/local/bin/tld may be used.


7.3. Command-line Options

The following options are accepted by tcc. They can be given by command-line options or the TCCOPTS 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.



The following two tables list the producer and archiver options which can be passed using the
-Wc, opt and -WJ, opt options, respectively.




7.4. Compilation Modes

The built-in compilation modes are as follows:

The mode Xs is specified by passing the -Xs command-line option to tcc, and so on.


7.5. Supported APIs

The following standard APIs are supported in the form of TenDRA headers:

Each API is specified to tcc by means of an environment with the same name as the API. Thus, for example, -Yposix 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 -Yposix -Yx5_t, in that order (base APIs override the previous API, extension APIs add to it).

Information on the current API may be printed by passing the -info option to tcc.


7.6. Environment Identifiers

The following tcc environment identifiers are recognised:

* stands for any of the allowed environment modifiers +, < or >.


7.7. Standard Environments

In addition to the environments implementing the supported APIs (see section 7.5. on page 31), the following environments are standard:


Part of the TenDRA Web.
Crown Copyright © 1998.