cc.1

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1 代码 · 共 751 行 · 第 1/2 页

1
751
字号
.TH cc 1 RISC.SH Namecc \- RISC C compiler.SH Syntax.B cc[ .I option ] ... .I file ....SH DescriptionThe .PN cccommand invokes the RISC .I ucodeC compiler.  It produces RISC object code in RISC extended .I coffformat (the default), binary or symbolic.IR ucode ,.I ucodeobject filesand binary or symbolic assembly language.  .PPThe .PN cccommand accepts the following arguments:.IP \(bu 5Arguments ending in .c are interpreted as C source programs.  Theyare compiled, and the resulting object file has the same nameas the source program except .o is substituted for .c.  If asingle C source program is compiled and loaded at once, the .o file is deleted..IP \(bu 5Arguments ending in .s are interpreted as assembly source programs.When they are assembled, they produce a .o file. .IP \(bu 5Arguments ending in .i are interpreted as C source after beingprocessed by the C preprocessor.  They are compiled withoutbeing processed by the C preprocessor..PPIf the highest level of optimization is specified (with the.B \-O3flag) or only \fIucode\fP object files are to be produced (with the.B \-jflag) each C source file is compiled into a.I ucodeobject file. The.I ucodeobject file is left in a file whose name consists of the last componentof the source with .u substituted for .c..PPThe following suffixes aid compiler development, but are notgenerally used: .B, .O., .S, and .M.  These arguments are interpretedas binary.IR ucode ,produced by the front end, optimizer, ucode object file splitter, and ucodemerger respectively.  Arguments whose names end with .U are assumed to besymbolic.IR ucode .Arguments whose names end with .G are assumed to be binary assemblylanguage, which is produced by the code generator and the symbolic to binaryassembler..PPFiles that are assumed to be binary.IR ucode ,symbolic.IR ucode ,or binary assembly language by the suffix conventions are also assumed tohave their corresponding symbol table in a file with a .T suffix..PPThe .PN cccommand always defines the C preprocessor macro.B LANGUAGE_Cwhen a .c file is being compiled.The.PN cccommand defines the C preprocessor macro.B LANGUAGE_ASSEMBLYwhen a .s file is compiled..SH OptionsThe following options are interpreted by.MS cc 1 .See.MS ld 1for load-time options..TP 15.B \-cSuppress the loading phase of the compilation and forcean object file to be produced even if only one program is compiled..TP 15.B \-g0Do not produce symbol table information for symbolicdebugging.  This is the default..TP 15.B \-g1Produce debugger symbol table information. This option limitsoptimization, but some optimizations that affect debugger accuracy mightbe performed. The debugger symbol table is built before optimizationsand cannot reflect the optimizations..TP 15.BR \-g " or " \-g2Produce debugger symbol table information and inhibit optimizationsthat limit full symbolic debugging. The debugger symbol table isaccurate..TP 15.B \-g3Produce debugger symbol table. This option does not limit optimizations,so the symbol table may be inaccurate. The symbol table is built beforeoptimizations and cannot reflect the optimizations..TP 15.B \-LChange the algorithm of searching for.BI lib x \&.aor.BI lib x \&.bto.B neverlook in the default directories.  This is useful when the defaultdirectoriesfor libraries should not be searched and only the directories specifiedby the .MS ld 1 option.BI \-L dirare to be searched..TP 15.B \-wSuppress warning messages..TP 15.B \-p0Do not permit profiling.  This is the default.If loading happens, the standard runtime startup routine .RB ( crt0.o )is used and the profiling libraries are not searched..TP 15.BR \-p1 " or " \-pSet up for profiling by periodically sampling the value of the programcounter.  This option only affects the loading.When loading happens, this option replaces the standard runtime startup routinewith the profiling runtime startup routine.RB ( mcrt0.o )and searches the level 1 profiling library.RB ( libprof1.a ).When profiling happens, the startup routine calls.MS monstartup 3and produces a file.I mon.outthat contains execution-profiling data for use with the postprocessor.MS prof 1 ..TP 15.B \-O0Turn off all optimizations..TP 15.B \-O1Turn on all optimizations that complete fast.  This is the default..TP 15.BR \-O " or " \-O2Invoke the global.I ucodeoptimizer..TP 15.B \-O3Perform all optimizations, including global register allocation.  This option must precede all source file arguments.  With this option, a.I ucodeobject file is created for each C source file and left in a .u file.The newly created ucode object files, the ucode object files specified onthe command line, the runtime startup routine, and all the runtime librariesare ucode linked.  Optimization is performed on the resulting ucode linked file and then it is linked as normal producing an a.out file.  A resulting .o file is not left from the ucode linked result.In fact.B \-ccannot be specified with.BR \-O3 ..TP 15.BI \-feedback " file"Use with the.B \-cordoption to specify the feedback file.  This.I fileis produced by.MS prof 1with its.B \-feedbackoption from an execution of the program produced by.MS pixie 1 . .TP 15.B \-cordRun the procedure-rearrangeron the resulting file after linking.  The rearrangement is performedto reduce the cache conflicts of the program's text.  The outputis left in the file specified by the.BI \-o " output"option or a.out by default.  At least one.B \-feedback.I filemust be specified..TP 15.B \-jCompile the specified source programs, and leave the.I ucodeobject file output in corresponding files with the .u suffix..TP 15.BI \-ko " output"Name the output file created by the ucode loader as.I output.This file is not removed.If this file is compiled, the object file is left ina file whose name consists of.I outputwith the suffix changed to an .o.  If.I outputhas no suffix, an .o suffix is appended to.I output..TP 15.B \-kPass options that start with a.B \-kto the ucode loader.  This option is used to specify ucode libraries(with.BI \-kl x) and other ucode loader options..TP 15.B \-SCompile the specified source programs and leave the symbolicassembly language output in corresponding files suffixed with .s..TP 15.B \-PRun only the C macro preprocessor and put the result for each source fileusing suffix convention (for example, .c and .s)in a corresponding .i file.The .i file does not have number lines (#) in it.This sets the .B \-cppoption..TP 15.B \-ERun only the C macro preprocessoron the files (regardless of any suffix or not), and send the result to thestandard output.This sets the .B \-cppoption..TP 15.B \-EmRuns only the macro preprocessor on the named C programs andproduces the makefile dependencies..TP 15.BI \-o " output"Name the final output file.IR output .If this option is used, the file a.out is unaffected..TP 15.BI \-D name=def.br.ns.TP 15.BI \-D \*SnameDefine the.I nameto the C macro preprocessor,as if by`#define'.If a definition is not given, the name is defined as 1..TP 15.BI \-U \*SnameRemove any initial definition of.IR name ..TP 15.BI \-I \*SdirSearch for #include fileswhose names do not begin with a slash (/) in the following order: (1) inthe directory of the .I dirargument, (2) in the directories specified by .B \-Ioptions, (3) in the standard directory.RB ( /usr/include )..TP 15.B \-IDo not search for #include in the standard directory.RB ( /usr/include )..TP 15.B \-MSpecifies the floating point type to be used for double-precisionfloating point and is passed on to.MS ld 1as the map option..TP 15.B \-W1,MSame a \-M, except it is POSIX compliant..TP 15.BI \-G " num"Specify the maximum size, in bytes, of a data item that is to be accessed fromthe global pointer.  The.I numargument is interpreted as a decimal number.  If.I numis zero, data is not accessed from the global pointer.  The defaultvalue for.I numis 8 bytes..TP 15.B \-vPrint the passes as they execute with their arguments and their input and outputfiles.Also prints resource usage in the C shell.I timeformat..TP 15.B \-VPrint the version of the driver and the versions of all passes.  This is donewith the.MS what 1command..TP 15.B \-stdProduce warnings for things that are not standard in thelanguage..TP 15.BI \-Y environmentCompiles C programs for \fIenvironment\fP.  If \fIenvironment\fP isSYSTEM_FIVE or is omitted, it defines SYSTEM_FIVE for the preprocessor,.PN cpp .If the loader is invoked, it specifies that the System V version of theC runtime library is used.  Also, if the math library is specifiedwith the \fB\-lm\fR option, the System V version is used.  If \fIenvironment\fP is POSIX, it defines POSIX for the preprocessor.  Ifthe environment variable PROG_ENV has the value SYSTEM_FIVE or POSIX,the effect is the same as when specifying the corresponding \fB\-Y\fIenvironment\fR option to.PN cc .The \fB\-Y\fP option overrides the PROG_ENV variable; \fB\-YBSD\fP can be used tooverride all special actions..TP 15.B \-cppRun the C macro preprocessor on C and assembly source files before compiling.This is the default for.MS cc l ..TP 15.B \-nocppDo not run the C macro preprocessor on C and assembly source files beforecompiling..TP 15.BI \-Olimit " num"Specify the maximum size, in basic blocks, of a routine that will be optimizedby the global optimizer.  If a routine has more than the specified number of basic blocks, it cannot be optimized and a message is printed.  A.B \-O, \-O2,or.B \-O3must be used to specify the global optimizer.  The argument must also be specified. The argument.I numis interpreted as a decimal number.  The default value for.I numis 500 basic blocks..TP 15.B \-signedCauses all.I chardeclarations to be.I "signed char"declarations. This is the default..TP 15.B \-unsignedCauses all.I chardeclarations to be.I "unsigned char"declarations.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?