The c99 utility shall conform to the Base Definitions volume of
POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines, except
that:
* Options can be interspersed with operands.
* The order of specifying the -L
and -l
options, and the order
of specifying -l
options with respect to pathname operands is
significant.
* Conforming applications shall specify each option separately;
that is, grouping option letters (for example, -cO
) need not
be recognized by all implementations.
The following options shall be supported:
-c
Suppress the link-edit phase of the compilation, and do
not remove any object files that are produced.
-D
name[=
value]
Define name as if by a C-language #define
directive. If
no =value is given, a value of 1 shall be used. The -D
option has lower precedence than the -U
option. That
is, if name is used in both a -U
and a -D
option, name
shall be undefined regardless of the order of the
options. Additional implementation-defined names may be
provided by the compiler. Implementations shall support
at least 2048 bytes of -D
definitions and 256 names.
-E
Copy C-language source files to standard output,
executing all preprocessor directives; no compilation
shall be performed. If any operand is not a text file,
the effects are unspecified.
-g
Produce symbolic information in the object or
executable files; the nature of this information is
unspecified, and may be modified by implementation-
defined interactions with other options.
-I
directory
Change the algorithm for searching for headers whose
names are not absolute pathnames to look in the
directory named by the directory pathname before
looking in the usual places. Thus, headers whose names
are enclosed in double-quotes (""
) shall be searched
for first in the directory of the file with the
#include
line, then in directories named in -I
options,
and last in the usual places. For headers whose names
are enclosed in angle brackets ("<>"
), the header shall
be searched for only in directories named in -I
options
and then in the usual places. Directories named in -I
options shall be searched in the order specified. If
the -I
option is used to specify a directory that is
one of the usual places searched by default, the
results are unspecified. Implementations shall support
at least ten instances of this option in a single c99
command invocation.
-L
directory
Change the algorithm of searching for the libraries
named in the -l
objects to look in the directory named
by the directory pathname before looking in the usual
places. Directories named in -L
options shall be
searched in the order specified. If the -L
option is
used to specify a directory that is one of the usual
places searched by default, the results are
unspecified. Implementations shall support at least ten
instances of this option in a single c99 command
invocation. If a directory specified by a -L
option
contains files with names starting with any of the
strings "libc."
, "libl."
, "libpthread."
, "libm."
,
"librt."
, "libtrace."
, "libxnet."
, or "liby."
, the
results are unspecified.
-l
library
Search the library named liblibrary.a
. A library shall
be searched when its name is encountered, so the
placement of a -l
option is significant. Several
standard libraries can be specified in this manner, as
described in the EXTENDED DESCRIPTION section.
Implementations may recognize implementation-defined
suffixes other than .a
as denoting libraries.
-O
optlevel
Specify the level of code optimization. If the optlevel
option-argument is the digit '0'
, all special code
optimizations shall be disabled. If it is the digit
'1'
, the nature of the optimization is unspecified. If
the -O
option is omitted, the nature of the system's
default optimization is unspecified. It is unspecified
whether code generated in the presence of the -O
0
option is the same as that generated when -O
is
omitted. Other optlevel values may be supported.
-o
outfile
Use the pathname outfile, instead of the default a.out
,
for the executable file produced. If the -o
option is
present with -c
or -E
, the result is unspecified.
-s
Produce object or executable files, or both, from which
symbolic and other information not required for proper
execution using the exec family defined in the System
Interfaces volume of POSIX.1‐2017 has been removed
(stripped). If both -g
and -s
options are present, the
action taken is unspecified.
-U
name Remove any initial definition of name.
Multiple instances of the -D
, -I
, -L
, -l
, and -U
options can be
specified.