pcc man page
cc — front-end to the C compiler
|cc|| [-cEgkMPStvX] [-B |
The cc utility provides a front-end to the “portable C compiler”. Multiple files may be given on the command line. Unrecognized options are all sent directly to ld(1).
Filenames that end with .c are passed via cpp(1) → ccom(1) → as(1) → ld(1).
Filenames that end with .i are passed via ccom(1) → as(1) → ld(1).
Filenames that end with .s are passed via as(1) → ld(1).
Filenames that end with .S are passed via cpp(1) → as(1) → ld(1).
Filenames that end with .o are passed directly to ld(1).
The options are as follows:
- Define alternate prefix path for cpp(1), ccom(1), as(1), or ld(1) executables.
- Passed to the cpp(1) preprocessor to not discard comments.
- Stop after generating object code with as(1). Do not link. The resulting object output is saved as a filename with a “.o” suffix unless -o option is used. Note: cannot be combined with -o if multiple files are given.
- Passed to the cpp(1) preprocessor to define
macrowith an optional
- Debug options.
flagsis a string of characters, which signify the following actions.
- Cause the preprocessor to output a list of macro definitions.
any unknown flags are ignored.
- Stop after preprocessing with cpp(1). Do not compile, assemble, or link. Output is sent to standard output unless the -o option is used.
- Assume a freestanding environment.
- Generate PIC code.
- Tells C compiler to generate PIC code and tells assembler that PIC code has been generated.
- Tell the compiler to treat ‘char’ types as if they were unsigned unless explicitly defined otherwise. -fsigned-char can be used to signify the opposite behaviour. The default for the ‘char’ type depends on the compiler target architecture.
- Tell the compiler to wrap functions with code which checks at runtime that a stack overflow has not occurred. When stack protection is in effect, the __SSP__ macro will be defined.
- Send -g flag to ccom(1) to create debug output. Debug information output can be disabled with -g0.
- Passed to the cpp(1) preprocessor to add header search directory to override system defaults.
- Tells the cpp(1) preprocessor to include the
pathas a system header directory for the cpp(1) preprocessor.
- Generate PIC code. See -fpic option.
- Passed to the linker, to add
pathto the list of directories searched for shared libraries.
- Pass -M flag to cpp(1) to generate dependencies for make(1).
- Target-dependent options. Multiple -m options can be given, the following are supported:
- -mlittle-endian -mbig-endian -mfpe=fpa -mfpe=vpf -msoft-float -march=armv1 -march=armv2 -march=armv2a -march=armv3 -march=armv4 -march=armv4t -march=armv4tej -march=armv5 -march=armv6 -march=armv6t2 -march=armv6kz -march=armv6k -march=armv7
- -mlittle-endian -mbig-endian -mhard-float -msoft-float
- Do not link with the system default libraries (libc, etc.)
- Do not link with the system startup files (crt0.c, etc.)
- Do not use the system include paths (/usr/include, etc.)
- Do not link with the system default libraries or startup files.
- Enable compiler optimizations. Currently, for levels higher than zero, this defines __OPTIMIZE__ in the cpp(1) preprocessor, and passes -xdce, -xdeljumps, -xtemps and -xinline to ccom(1). If no level is given the optimization level is increased, or optimizations can be disabled using -O0.
- Save result to
- Inhibit generation of line markers in preprocessor output. This is sometimes useful when running the preprocessor on something other than C code.
- Enable profiling on the generated executable.
- Defines the _PTHREADS preprocessor identifier for cpp(1), and adds -lpthread to the ld(1) linker arguments.
- Stop after compilation by ccom(1). Do not assemble and do not link. The resulting assembler-language output is saved as a filename with a “.s” suffix unless the -o option is used. Note: cannot be combined with -o if multiple files are given.
- Create a shared object of the result. Tells the linker not to generate an executable.
- Do not use dynamic linkage. By default, it will link using the dynamic linker options and/or shared objects for the platform.
- Passed to cpp(1) to suppress some default macro definitions and enable use of traditional C preprocessor syntax.
- Passes to the cpp(1) preprocessor to remove the initial macro definition.
- Outputs the version of cc and shows commands as they are run with their command line arguments.
- As per -v except that the commands are not run, and the arguments will be quoted if they contain unusual characters or spaces.
- Comma separated list of options for the assembler.
- Comma separated list of options for the compiler.
- Comma separated list of options for the linker.
- Comma separated list of options for the preprocessor.
- Don't remove temporary files on exit.
- GCC compatibility option; specify the language in use rather than interpreting the filename extension. Currently known language values are none, c, c++, assembler and assembler-with-cpp. Any unknown -x options are passed to ccom(1).
A few macros are predefined by cc when sent to cpp(1).
- Set to the major version of pcc(1). These macros can be used to select code based on pcc(1) compatibility. See the -v option.
- Set to the minor version.
- Set to the minor-minor version — the number after the minor version.
- Defined when -pthread switch is used.
- Defined when input files have a .S suffix, or if the -xassembler-with-cpp option is specified.
Also system- and/or machine-dependent macros may also be predefined; for example: __NetBSD__, __ELF__, and __i386__.
as(1), ccom(1), cpp(1), ld(1)
The cc command comes from the original Portable C Compiler by, written in the late 70's.
This product includes software developed or owned by Caldera International, Inc.
Explore man page connections for pcc(1).
p++(1) and pcpp(1) are aliases of pcc(1).