cc.cfg
Purpose
Defines values used by the C compiler.
Description
The cc.cfg file defines values used by the cc program to
run compilers. Normally, the cc.cfg file contains
entries only for the C compiler provided with the system.
Entries are made to this file to support C compilers for
other systems as they are added.
This file is an attribute file. The name you specify
when you run the cc program (it can be linked to several
difference names) determines which stanza of the cc.cfg
file is used. Normally, the cc program runs as cc;
therefore, the first stanza is almost always selected.
If the scc program (standalone C compiler) is run, then
the scc stanza is selected. If the fcc program (floating
point) is selected, then the fcc stanza is selected. If
the vcc program (a.out-to-toc conversion) is selected,
then the vcc stanza is selected.
You can specify the following attributes:
as The path name to be used for the assembler.
asflags A string of values, separated by commas, to
be passed to the assembler.
asopt A string naming optional flags that, if
encountered on the cc command line, should be
passed to the assembler. See description of
the cppopt field.
ccom The path name to be used for the compiler.
For a one-program compiler, this is the only
compiler program provided. For a two-program
compiler, this is the parser for the front
end (also known as c0).
ccomflags A string of values, separated by commas, to
be passed to the compiler.
ccomopt A string naming optional flags that, if
encountered on the cc command line, should be
passed to the compiler. See oppopt.
cgen The path name to be used for the code gener-
ator of a two-program compiler (also known as
c1).
cgenflags A string of values, separated by commas, to
be passed to the code generator. If a one-
program compiler is used, these are appended
to ccomflags.
cgenopt A string naming optional flags that, if
encountered on the cc commands line, should
be passed to the code generator. See cppopt.
copt The path name to be used for the peephole
optimizer of a compiler with an explicit
peephole program (also known as c2).
coptflags A string of values, separated by commas, to
be passed to the peephole optimizer.
coptopt A string naming optional flags that, if
encountered on the cc command line, should be
passed to the peephole optimizer. See
cppopt.
cpp The path name to be used for the pre-
processor.
cppflags A string of flags, separated by commas, to be
passed to the preprocessor.
cppopt A string naming optional flags that, if
encountered on the cc command line, should be
passed to the preprocessor. The string is
formatted for getopt() subroutine, as a con-
catenation of flag letters, with a letter
followed by a : (colon) if the corresponding
flag takes a parameter.
crt, mcrt The path name of the object file passed as
the first parameter to the link editor. In
the presence of the -p flag to cc, the mcrt
value is used; otherwise the crt value is
used. The defaults are /lib/crt0.o and
/lib/mcrt0.o.
csuffix The suffix for C source programs, default c.
hsuffix A second suffix for C source (enabled by
using the -h flag to the cc command), default
h.
ld The path name to be used for the link editor.
ldflags A string of values, separated by commas, to
be passed to the link editor. These are in
addition to those implicitly provided as
described in the cc command.
ldopt A string naming optional flags that, when
encountered on the cc command line, to be
passed to the link editor. See cppopt.
libraries Flags, separated by commas, to be passed as
the last parameters to the link editor as the
the default is libraries, the default is
-lrts,-lc.
osuffix The suffix for object files, the default is
o.
ssuffix The suffix for assembler programs, the
default is s.
use Values for attributes are taken from the
named stanza in addition to the local stanza.
For single-valued attributes, values in the
use stanza apply if no value is provided in
the local stanza (or default stanza). For
comma-separated lists, the values from the
use stanza are added to the values from the
local stanza.
Example
* CC configuration file:
default:
cpp = /lib/cpp
* standard cc
cc:
use = DEFLT
crt = /lib/crt0.o
mcrt = /lib/mcrt0.o
libraries = -lrts,-lc
ldflags = -n,-T0x10000000,-K
* direct floating point accelerator cc
fcc:
use = DEFLT
crt = /lib/crt0.o
mcrt = /lib/mcrt0.o
libraries = -lrts,-lfm,-lfc
ccomflags = -f
ldflags = -n,-T0x10000000,-K
* standard standalone cc
scc:
use = DEFLT
crt = /lib/crt2.o
cppflags = -DSTANDALONE
libraries = -l2
ldflags = -H4,-Y4
* atoc
vcc:
ccom = /lib/ccom
ccomopt = -O
copt = /lib/copt
as = /bin/as
ld = /bin/ld
cppflags = -Daiws,-DAIX
ldflags = -r,-X,-R4,-H4,-Y4,-T0x60
crt = /usr/lib/vrmcrt.o
* common definitions
DEFLT:
ccom = /lib/ccom
ccomopt = Of
copt = /lib/copt
as = /bin/as
ld = /bin/ld
cppflags = -Daiws,-DAIX
ldflags = -e,start,-X
File
/etc/cc.cfg
Related Information
In this book: "getopt" and "attributes."
The as, cc, ccp, and ld commands in AIX Operating System
Commands Reference.