CC.CFG(5,F) AIX Technical Reference CC.CFG(5,F)
-------------------------------------------------------------------------------
cc.cfg
PURPOSE
Defines values used by the C, FORTRAN, and Pascal compilers.
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.
Besides the default stanza, AIX provides the stanza "posix" as a way for
application programs to compile programs written to be strictly conformant to
the POSIX 1003.1 standard, as defined in the Portable Operating System
Interface for Computer Environments (POSIX), IEEE 1003.1-1988. Applications
compiled with "cc -F:posix" will be compiled with the symbol _POSIX_SOURCE
defined. This symbol hides all symbols in POSIX-defined header files which are
not defined by the POSIX 1003.1 standard. Compiling an application in this way
will guarantee that the application doesn't make use of any AIX extensions and
hence is a portable application. Additionally, the hiding of AIX extensions
guarantees that these extensions will not conflict with variables, data types
and other data structures which the application has defined. Consult the POSIX
1003.1 standard for details on how to write a strictly-conforming POSIX
application.
This file is an attribute file. The name you specify when you run the cc
program (it can be linked to several different 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.
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 C compiler front end; this is the
parser (vsc).
ccomflags A string of values, separated by commas, to be passed to the C
compiler.
Processed November 7, 1990 CC.CFG(5,F) 1
CC.CFG(5,F) AIX Technical Reference CC.CFG(5,F)
ccomopt A string naming optional flags that, if encountered on the cc command
line, should be passed to the C compiler. See cppopt.
cform The path name to be used for the code formatter (vspass3).
Note: The code generator and the code formatter do not accept
optional flags.
cgen The path name to be used for the code generator (vspass2).
cpp The path name to be used for the preprocessor.
cppflags The following C-preprocessor symbols are predefined for use by
application development:
_AIX Defined on all AIX platforms.
AIX Defined on all AIX platforms.
u370 Defined on AIX/370 machines.
AIX370 Defined on AIX/370 machines.
i386 Defined on AIX PS/2 machines.
_I386 Defined on AIX/PS/2 machines.
NLS Usable with NLS library routines.
_HIGHC_ Code conforms to the High C compiler standard.
_POSIX_SOURCE Code conforms to POSIX standard.
_STDC_ Code conforms to ANSI C standard.
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 concatenation 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.
crtn The path name of the object file passed as the parameter after the
library flags to the link editor. This object file is necessary
whenever shared libraries are being linked. The default is
/lib/crtn.o.
csuffix The suffix for C source programs, the default is c.
dis Pathname to use for the disassembler.
fcom The path name to be used for the FORTRAN compiler front end (vsfort).
fcomflags A string of values, separated by commas, to be passed to the FORTRAN
compiler.
Processed November 7, 1990 CC.CFG(5,F) 2
CC.CFG(5,F) AIX Technical Reference CC.CFG(5,F)
fcomopt A string naming optional flags that, if encountered on the cc command
line, should be passed to the FORTRAN compiler.
flib The path name to be used for the FORTRAN Library.
fsuffix The suffix for VS FORTRAN source programs, the default is f.
hsuffix A second suffix for C source (enabled by using the -h flag to the cc
command), the default is h.
hcpass1 First pass of the High C Compiler. This is the parser.
hcpass2 Second pass of the High C Compiler. This takes intermediate code
generated by a High C Compiler and produces object code.
hcopt A string naming option flags that, if encountered on the cc command
line, should be passed to the High C Compiler.
hcflags A string of values, separated by commas, to be passed on to the High
C Compiler.
hcansi Directory containing ANSI libraries. Used only if -Hansi flag is
turned on.
hcinline Inline code pass of High C Compiler.
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 default libraries, the default is -lrts,-lc.
osuffix The suffix for object files, the default is o.
pcom The path name to be used for the Pascal compiler front end
(vspascal).
pcomflags A string of values, separated by commas, to be passed to the Pascal
compiler.
pcomopt A string naming optional flags that, if encountered on the cc command
line, should be passed to the Pascal compiler.
plib The path name to be used for the Pascal Library.
Processed November 7, 1990 CC.CFG(5,F) 3
CC.CFG(5,F) AIX Technical Reference CC.CFG(5,F)
psuffix The suffix for VS Pascal source programs, the default is p.
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/crt1.o
crtn = /lib/crtn.o
mcrt = /lib/mcrt1.o
libraries = -lrts,-lc
* common definitions
DEFLT:
ccom = /lib/vsc
ccomopt = ""
fcom = /lib/vsfort
fcomopt = ""
pcom = /lib/vspascal
pcomopt = ""
cgen = /lib/vspass2
cform = /lib/vspass3
as = /bin/as
ld = /bin/ld
cppflags = D_AIX,-Daiws,-DAIX,-DNLS
ldflags = -K,-T0x00400000
hcpass1 = /lib/hc1com
hcpass2 = /lib/hc2com
hcopt = " "
hcflags = " "
hansi = /lib
hcinline = /lib/inline
FILE
/etc/cc.cfg
Processed November 7, 1990 CC.CFG(5,F) 4
CC.CFG(5,F) AIX Technical Reference CC.CFG(5,F)
RELATED INFORMATION
In this book: "getopt" and "attributes."
The as, cc, and ld commands in AIX Operating System Commands Reference.
Processed November 7, 1990 CC.CFG(5,F) 5