StackThreads/MP: version 0.77 User's Guide
stgcc
(stg++
) is a simple script that drives compilation. It
retains the same interface as gcc
(stg++
); it accepts the same
set of command line options, except for those that fundamentally
conflict with execution scheme of StackThreads/MP. The following
descriptions about stgcc
also apply to stg++
.
stgcc
is not a preprocessor or a compiler that understands
C/C++ syntax and translates C/C++ programs in non-trivial ways. In fact,
it feeds given C/C++ programs directly to gcc
, passing command line
(almost) as is. As a consequence, you can use almost all command line
options and non-standard extensions supported by gcc
.
What is stgcc
then? It is a postprocessor of
gcc
. Whatever options you gave to stgcc
, it lets gcc
to
generate assembly code and postprocess the assembly. The postprocessor
is written in an AWK script and does the following jobs:
stlink.awk
) to
collect tables for all object files (Therefor it is mandatory to call
stgcc
to generate final executable).
Options of gcc
that specifies where to stop compilation process
(which are -E
, -S
, and -c
) are also supported.
Compilation transparently proceeds, if necessary, by compiling the
postprocessed assembly file into an object file and by linking object
files into executable.
There are other minor things that stgcc
do:
-I$ST_DIR
to gcc
, so that standard
include files are automatically searched.