cproc(1)
| CPROC(1) | General Commands Manual | CPROC(1) |
NAME
cproc — C11
compiler
SYNOPSIS
cproc |
[options] sources... |
DESCRIPTION
cproc is a C11 compiler using QBE as
backend. It supports ISO C11, some features from the upcoming C23, and some
GNU C extensions.
When invoked without any options, cproc
will preprocess, compile, and link sources... and
generate an executable a.out file.
The following options are available:
-c- Compile sources to object files rather than linking them.
-Dmacro[=value]- Define macro to value as if by a preprocessor #define. If value is not given, macro is defined to 1.
-E- Preprocess the input files and print the output rather than compiling.
-Ipath- Append path to the list of directories to be searched for headers.
-Lpath- Append path to the list of directories to be searched for libraries.
-llibrary- Link library to the executable. If library is a relative path, it will be searched through the compiler search paths.
-ooutput- Write the output to output. By default, output is
written to a.out. Or, if
-cis used, the output file is determined by replacing the source file extension with .o. Or, if-Eor-emit-qbeis used, the output is written to standard output. -s- Strip the symbol table from the generated executable.
-Umacro- Undefine a pre-defined macro.
-v- Print the commands run as part of the compile pipeline.
-xformat- Force
cprocto interpret subsequent source files as format. By default,cprocwill determine source code language from the known file extensions. This option forces a different format which can be one of “none”, “c”, “c-header”, “cpp-output”, “qbe”, “assembler”, “assembler-with-cpp”. -Wa,args...,-Wl,args...,-Wp,args...- For each of these options, pass additional args...
to the assembler, linker, or preprocessor respectively. The list of
arguments is delimited by commas.
For example,
-Wl,--gc-sectionswill forward the option--gc-sectionsto the linker. -static- Link the executable statically.
-nostdlib- Do not use standard library and startup files when linking.
-nostdinc- Do not search default compiler include paths when compiling.
-pthread- This is a short hand of
-lpthread. -g,-O,-pipe,-pedantic- These options are available for compatibility with most common compilers but are currently ineffective.
AUTHORS
cproc was written by
Michael Forney
<mforney@mforney.org>.
| July 22, 2026 | Linux 6.12.85-6.12-alt1 |
